[gdal-dev] Re: Joining a shape file with a DBF file with ogr2ogr
Stephen Woodbridge
woodbri at swoodbridge.com
Wed Apr 29 23:23:16 EDT 2009
Yewondwossen Assefa wrote:
> Hi,
>
> I have a fairly large shape file (shp, shx, dbf) and a fairly small DBF
> file. I would like to do a join on a specific field, with the expected
> result being a small shape file (same number of records as my small dbf
> file). There are a couple of ways from what I can see that I could
> achieve this. one would be:
> - do a LEFT JOIN with the small dbf. This would result in creating a
> big shape file (+ attributes from the small dbf). I could then do
> another ogr2ogr and trim the data based on empty records.
> Although this works well, It is a bit slow for my needs (even if both
> DBFs are indexed).
>
> Could some one suggest a better way of achieving this?
>
> Thanks
>
How about using postGIS?
Yeah, I know this is the gdal list, but hey ... I'm just saying!
-Steve
More information about the gdal-dev
mailing list