Join shape and dbms data: OGR?

joÿffffffffffe3o Antunes bluetuna_goes_skying at YAHOO.CO.UK
Fri Feb 4 12:46:58 EST 2005


Hi everybody,

this issue is very intreresting for me, beacause I need to create thematic maps based on queries issued to a database, so let's say that my thematic map should be based on views (which in the end can become temporary tables if needed..)

The only thing is my database engine is MySQL...

So my question is: Is there a similar way to connect to a MySQL table so that I can use a field of this table as a classitem for the layer?

Thanks in advance for your support..

JP

Bart van den Eijnden <bartvde at XS4ALL.NL> wrote:
Hi Emil,

the problem with the OGR shapefile connector is (or was) that it does not
use the spatial index (qix) files, so it isn't very fast ...

Question for Frank:
Or did this change as well with the current version :) ? I know you were
planning on doing this ...

Best regards,
Bart

On Tue, 16 Nov 2004 08:21:20 +0100, Emil Zegers
wrote:

> Hello Michael,
>
> I have a question for you about this approach: when using this kind of
> join were you able to classify data based on the joined attributes and
> display this in the map image?
>
> I'm asking this because with normal join operation it is not possible to
> create thematic maps based on the joined attributes.
>
> If classifcation works based on this approach the enhancement request I
> put in bugzilla (http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=674)
> can be closed.
>
> I would be very happy if classifying on joined attributes works this way
> (had no time to test this approach yet).
>
> Regards,
>
> Emil Zegers
>
>
> Hi Frank,
>
> thanks for your answer. It is working perfectly now.
>
> For the moment it is only one table i want to join to the geometry of
> the shp-file, so at first
> sight performance is good, but i will play with the indexes a little.
>
> For all who have to use a similar approach here's a mapfile snipplet:
>
> LAYER
> ...
> CONNECTIONTYPE OGR
> CONNECTION "c:\mstest\data\fnpf.shp" # shapefile holding only
> geometry and PID in .dbf
> DATA "SELECT * FROM fnpf LEFT JOIN 'ODBC:fnp'.fnp ON
> fnpf.PID=fnp.PID"
> # join to systemDSN fnp (here msaccess-db "fnp.mdb" with table
> fnp) on attribute PID,
> # now all fields of the db are also accessible for mapserver, e.g.
> "AZJAHR"
> LABELITEM "AZJAHR"
> ...
> END
>
> Thanks, Michael
>
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/


---------------------------------
 ALL-NEW Yahoo! Messenger - all new features - even more fun!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050204/926ed925/attachment.html


More information about the mapserver-users mailing list