[gdal-dev] Selecting features using ogrinfo
David J. Bakeman
dbakeman at comcast.net
Thu Mar 1 19:03:07 EST 2012
kungphil wrote:
> Hi
>
> I want to select a feature from a shapefile and extract the extent to then
> clip a raster. I thought I could use ogrinfo to select an individual
> feature but using the command below the reported extent is for the whole
> shapefile.
>
> ogrinfo -al -where GRID_ID=312 shapefile.shp
>
First what version of gdal and what OS are you running on?
I ran this on one of my shapefiles I'm running gdal 1.7.3 on linux
fedora core 14 and got just the matching feature back:
ogrinfo -al -where 'POLYID=5' polys.shp
> Help please!
>
> Phil
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Selecting-features-using-ogrinfo-tp4537990p4537990.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
More information about the gdal-dev
mailing list