[mapserver-users] Re: VS: Mapserver search performance

nikos at maich.gr nikos at maich.gr
Thu May 5 03:31:39 PDT 2011


 Hi,

 This comment is clipped of the web somwhere...


 "However, the OGR join support includes the ability to join against a 
 table in a different data source,
 potentially of a different format. This is indicated by qualifying the 
 secondary table name with a datasource name.
 In this case the secondary datasource is opened using normal OGR 
 semantics and utilized to
 access the secondary table untill the query result is no longer 
 needed."


 so, an example of ogr2ogr with different data source, in your case, 
 still a dbf...

 LANDUNIT is ths shapefile and its attribute dbf etc....
 second is the sole (different) dbf....
 OBJECTID is the field to join on
 out.shp is an output shp and dbf files


 ogr2ogr -sql "SELECT * FROM LANDUNIT LEFT JOIN 'second.dbf'.second ON 
 LANDUNIT.OBJECTID = second.OBJECTID" -f "ESRI Shapefile" out.shp 
 LANDUNIT.shp

 You can check the other switches of ogr2ogr so you may append, 
 overwrite or update...
 I have not followed this thread from the top, but you do know it takes 
 forever...
 If this is a one time thing ok, otherwise look eleswhere as others have 
 suggested...

 regards,

 nikos




More information about the MapServer-users mailing list