DBF to Shape OGR JOIN, PHP crashes

Frank Warmerdam warmerdam at POBOX.COM
Thu Sep 15 10:28:17 EDT 2005


On 9/15/05, Christopher R. Thorne <christhorne at sympatico.ca> wrote:
> Thanks Frank,
> I have a few more questions:
> 
> 1) Do I have to OGR index the shapefile (dbf) with the same id index as
> well? I already have given it a qix.

Christopher, 

You need to index the column in the dbf file that you are joining
so that records can be looked up efficiently.  This is an attribute
index and unrelated to the .qix file which is a spatial index. 

> 2) If I wanted to shp tileindex my shape file because the layer could be
> as large as 100 mb. where I would shp2tile the shape and index by using
> tile4ms. How would that work with an CONNECTIONTYPE OGR? AM I, even
> permitted to use TILEINDEX? If no, are there other options?

I don't see how you could treat your dataset as a single layer for
OGR join purposes if you have split it into many tiles. 
 
> 3) Can I OGR index a group of shape files (with the same attributes) and
> join that group with a DBF group (with the same attributes)?

It is the file you are joining onto your base layers that must be indexed.
So if you are joining a secondary dbf file that is what would need
the index on the column used in the join. 

But I am still not sure how you plan to join *to* a layer which is
split over many shapefile tiles.  At best you would likely need alot
of mapscript magic to make that work though I haven't considered 
the issue carefully.

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