0

I am building a geojson with gdal and the ogr tool. I am doing something like to retrieve places of one particular country.

ogr2ogr -f GeoJSON -where "adm0_a3 = 'CODEISO3OFMYCOUNTRY'" places.json ne_10m_populated_places.shp

Then I am drawing all of them using d3. The point is that I want to get only official cities, instead of any other kind of small cities or village or anything else.

Can anyone explain to me how I can achieve that- I mean querying it just to retrieve official cities in these places?

Thanks in advance

Lars Kotthoff
  • 107,425
  • 16
  • 204
  • 204
ackuser
  • 5,681
  • 5
  • 40
  • 48
  • You might want to have a look at [*OGR SQL*](http://www.gdal.org/ogr_sql.html) as suggested by [*"ogr2ogr: don't import properties on each feature?"*](http://gis.stackexchange.com/a/130952) – altocumulus May 02 '16 at 09:05
  • Yes, I agree but the point is that I don't know which attribute in the features recognizes a places as a official city...And well I am quite new on this and I was unable to find any good doc about it... – ackuser May 02 '16 at 09:44

0 Answers0