[Mapserver-users] OGR Join index
Richard Greenwood
rich at greenwoodmap.com
Sat Jun 19 11:13:58 PDT 2004
Frank Warmerdam wrote:
> Richard Greenwood wrote:
>
>> Totally cool! The indexes reduced execution time from over 2 minutes
>> to about 2 seconds. (Joining 12000 spatial rows to 300 attribute
>> rows). The index only seemed to be required on the attribute table.
>>
>> But of course, there's always one more question: I can not get ogrinfo
>> to create an index on just a dbf file. It seems to require the
>> associated shp and shx files also, even tho there is no spatial data
>> there. Ogrinfo recognizes the dbf, but fails to create an index. e.g.
>>
>> $ ogrinfo listing.DBF
>> INFO: Open of `listing.DBF'
>> using driver `ESRI Shapefile' successful.
>> 1: listing (None)
>>
>> $ ogrinfo -ro . -sql "create index on listing using Pidn"
>> INFO: Open of `.'
>> using driver `ESRI Shapefile' successful.
>> ERROR 1: CREATE INDEX ON failed, no such layer as `listing'.
>>
>> I don't see what functional purpose the shp and shx files server in a
>> table having no spatial data. Any insight here?
>
>
> Rich,
>
> This is working fine for me on a standalone .dbf file. What is your
> ogrinfo source? Are you on windows or linux? I did it directly on a dbf
> file with no .shp and .shx with no problem. I was on linux using a
> build-from-cvs but this area hasn't changed for a couple months as far as I
> know.
>
> Best regards,
Ahhhh. Apparently my problem was that I DID have an associated MapInfo
.tab and .ind. Sorry that I didn't mention this before. I suspect
ogrinfo was reluctant to overwrite the existing .ind file.
Once again - Thank you. I have been cc'ing the mapserver-users list
because join functionality has been discussed frequently in the past and
the OGR Join fills a very nice nitch between the RDBMS methods and the
more limited LAYER JOIN object.
Regards,
--
Richard Greenwood
www.greenwoodmap.com
More information about the MapServer-users
mailing list