[Mapserver-users] How to import mysql data in mapscript
Attri, Abhishek
aattri at cba.ua.edu
Tue May 4 14:51:15 PDT 2004
Thanks a lot Eric!
Abhishek
-----Original Message-----
From: Eric Bridger [mailto:eric at gomoos.org]
Sent: Tuesday, May 04, 2004 2:19 PM
To: Attri, Abhishek
Cc: Mapserver List
Subject: Re: [Mapserver-users] How to import mysql data in mapscript
This is certainly possible using mapscript. But you must ensure that
there is at least one key value in common between your shapes and your
database. queryByPoint, or queryByRect, etc will return to you the
contents of you shape files DBF file. If one of those is a key value,
such as country code, you can then use it to query your MySQL database.
Conversely you can loop thru all you shapes and check each one for a
matching country code (key value) and then set attributes on the shape,
such as hightlight, etc.
On Tue, 2004-05-04 at 13:36, Attri, Abhishek wrote:
> Hi all,
>
>
>
> Please let me know if it's possible at all. I am trying to import data
> (which is not shape data, but just simple data like population of all
> counties of a state) from a MySQL database, and query the shapefiles
for
> "Counties" based on the fields in the MySQL database. The shapefiles
> and the results from the MySQL query have nothing in common. They are
> two totally different data sources. How can I integrate them?
>
>
>
> Has anyone done something like this? If yes, then how will you set the
> values of 'data', 'classitem' and 'setexpression' in the layer and
> class objects?
>
> If that's not possible, what else can be done to achieve the above
> purpose?
>
>
>
> I have tried a lot of combinations to import data, and query the
result
> set, but was not successful to create the layer based on MySQL data.
> Please help!
>
>
>
> With thanks,
>
>
>
> Abhishek
>
>
>
>
>
>
>
>
>
More information about the MapServer-users
mailing list