On 11/23/05, robert fritz <[EMAIL PROTECTED]> wrote:
> Hello,
>
> it is possible to join a layer to an odbc database. i use the join to an 
> access database::
>
>
> GROUP "G_BPLiv"
> NAME "BPLiv"
> TYPE POLYGON
> STATUS ON
> CONNECTIONTYPE OGR
> CONNECTION "D:\MS_Data\fgt\data\shapes\satzungen\bplaene_iv.shp"
>
> DATA "SELECT * FROM bplaene_iv LEFT JOIN 'ODBC:satz_blp'.satzungen ON 
> bplaene_iv.DB_ID = Satzungen.SATZUNGSID"

Robert,

I think this should work.  I would suggest you
test it first with ogrinfo and see if that works.

eg.

ogrinfo -ro D:\MS_Data\fgt\data\shapes\satzungen\bplaene_iv.shp \
      -sql "select ..."

If the Satzungen.SATZUNGSID field isn't indexed performance will
be very poor.  In any event performance isn't likely to be great if you are
dealing with a very large number of features, since a new SELECT on
a particular ID will be issued to the ODBC datasource for each record
selected from the shapefile.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

Reply via email to