[Gdal-dev] Shapefile spatial indexing

bartvde at xs4all.nl bartvde at xs4all.nl
Tue Jan 4 10:21:13 EST 2005


Hi Frank,

great! Can the spatial indexes also be created using shptree or must one
use the SQL CREATE SPATIAL INDEX syntax?

Best regards,
Bart

> Folks,
>
> I think I mentioned in the past that I was looking at implementing spatial
> indexing support for the OGR Shapefile driver.  Martin Chapman (and SANZ)
> have encouraged me to complete that work and it is now all in CVS.
>
> It is implemented using the same quadtree style format (.qix) used by
> UMN MapServer.  Indexes can be created and dropped with pseudo-SQL
> commands
> as noted in the updated shapefile driver document at:
>
>    http://gdal.maptools.org/ogr/drv_shapefile.html
>
> With the spatial index build for a 400MB 900000 feature line file (roads
> in Virginia) I was able to read back a 77000 feature subset in 5s as
> opposed
> to 64s without the spatial index.  I was able to read back a 1300 feature
> subset in 0.4s compared to 60s.  So the spatial index does give massive
> improvements for reading small spatial regions out of large datasets.
>
> If anyone tries out the new capability and runs into problems, please let
> me
> know.
>
> Thanks to SANZ for funding this work, and Steve Lime for his
> implementation
> in MapServer!
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at xserve.flids.com
> http://xserve.flids.com/mailman/listinfo/gdal-dev
>





More information about the Gdal-dev mailing list