Skalski Artur - askals wrote:
I keep trying but no results... still can't figure out how to use ogr2ogr correctly to make index or spatial index on my shapefile, can someone help me please I'm trying to create index with this statement: ogr2ogr -f "ESRI Shapefile" streets.shp streets_plyline.shp -sql CREATE INDEX index ON streets USING (CITY_STREET) but this generates error1.. can someone point me how such command should look like correctly, how to make this index on shp. file

Artur,

If you just want to create an index on a file, use ogrinfo with the -sql
statement.

eg.
ogrinfo streets.shp -sql "CREATE SPATIAL INDEX index ON streets"

You might want to skim the Shapefile page for details.

  http://www.gdal.org/ogr/drv_shapefile.html

Note that the quotes are important.  The whole SQL statement has to be
treated as a single argument to the program.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org

Reply via email to