[gdal-dev] Re: Selecting features using ogrinfo - 'ERROR 1: Not
enough tokens to complete expression.'
kungphil
phil.wilkes at dse.vic.gov.au
Thu Mar 1 19:29:29 EST 2012
Thanks for your post David, I am running GDAL 1.7.1 on Solaris 10.
I realised the extent for the selected feature is printed at the bottom.
I now have another/related issue. I am calling this from within Python and
I get an error 'ERROR 1: Not enough tokens to complete expression.' and its
prints extents for all features within the shapefile. Yet if I run the same
command from the command line then it works fine. I am using python2.6.
Code:
args = ['ogrinfo', '-al', '-where', '\'GRID_ID=312\'', 'shapefile.shp']
for line in str.split(str(subprocess.Popen(args,
stdout=subprocess.PIPE).communicate()[0]),'\n'):
print line
(Apologies for not posting code correctly as I can't remember the method!)
Many thanks, Phil
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Re-Selecting-features-using-ogrinfo-tp4538045p4538095.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list