[Mapserver-users] OGR Join index
Frank Warmerdam
warmerdam at pobox.com
Fri Jun 18 13:35:25 PDT 2004
Richard Greenwood wrote:
> Very interesting! So I could use MapInfo to create indexes and OGR would
> use them? And if I wanted to use ORG's CREATE INDEX I would need to
> write a C or Python wrapper? i.e. There is no stand alone CREATE INDEX
> utility?
Richard,
Well, if you create the indexes with MapInfo, they won't be recognised because
there needs to be a little xml file that associates them.
You should create the indexes with the OGR "CREATE INDEX" command. This
can be accomplished with the ogrinfo utility which includes the ability
to execute arbitrary OGR SQL.
eg.
warmerda at gdal2200[214]% ogrinfo -ro . -sql "create index on polygon using eas_"
INFO: Open of `.'
using driver `ESRI Shapefile' successful.
warmerda at gdal2200[215]% ls -la
total 368
drwxr-xr-x 2 warmerda users 4096 Jun 18 16:34 .
drwxr-xr-x 53 warmerda users 4096 Jun 18 16:32 ..
-rw-r--r-- 1 warmerda users 159752 Jun 18 16:32 polygon.dbf
-rw-r--r-- 1 warmerda users 221 Jun 18 16:34 polygon.idm
-rw-r--r-- 1 warmerda users 8704 Jun 18 16:34 polygon.ind
-rw-r--r-- 1 warmerda users 175784 Jun 18 16:32 polygon.shp
-rw-r--r-- 1 warmerda users 3892 Jun 18 16:32 polygon.shx
Now that I think about it some more, I'm pretty certain that OGR doesn't even
take advantage of the indexes for mapfinfo format ... only for shapefiles right
now. The client in question needed it only for shapefiles.
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
More information about the MapServer-users
mailing list