[gdal-dev] Accurate -spat for ogr2ogr

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Fri Oct 3 14:11:31 PDT 2014


Hi,

There are advanced options in ogr2ogr for clipping features to WKT or to a
clipping layer. However, there does not seem to be a way to only select
features without clipping them in a same way. A typical use case would be to
select features from global dataset by country borders. Could this be doable
and how? I have understood that -spat is doing a quick and not accurate
selection by feature BBOXes and "-spat [xmin ymin xmax ymax]|WKT|datasource"
would not be good. Perhaps it should be then something derived from 
"-clipsrc [xmin ymin xmax ymax]|WKT|datasource|spat_extent" like 

"-selectsrc [xmin ymin xmax ymax]|WKT|datasource"? And -selectdst could be
supported in a similar way.

-Jukka Rahkonen-




More information about the gdal-dev mailing list