[gdal-dev] how correctly to use the -where parameter in ogr2ogr
Helmut Kudrnovsky
hellik at web.de
Fri Nov 20 12:51:43 PST 2015
Helmut Kudrnovsky wrote
> hi,
>
> maybe a too simple question...
>
> given the natural earth data ne_10m_admin_0_countries.shp, I want to
> reproject from EPSG 4326 to EPSG 3035, but only the europe countries.
>
> in the shapefile there is a coloumn called CONTINENT with content like
> e.g. Europe, Asia etc.
>
> trying this command
>
> ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:3035 -where 'CONTINENT = "Europe"'
> ne_10m_admin_0_countries_europe_epsg3035.shp ne_10m_admin_0_countries.shp
> FAILURE:
> Unable to open datasource `Europe'' with the following drivers.
>
> any hints?
to answer my own question, it's just changing around the quotes:
ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:3035 -where "CONTINENT = 'Europe'"
ne_10m_admin_0_countries_europe_epsg3035.shp ne_10m_admin_0_countries.shp
sorry for the noise.
-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/how-correctly-to-use-the-where-parameter-in-ogr2ogr-tp5237738p5237739.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list