[Mapserver-dev] MySQL feature data joins
Steve Lime
steve.lime at dnr.state.mn.us
Thu Jun 17 00:38:36 EDT 2004
Joins are query only, that is once you'd got your feature(s) then joins
are ok. You can't use joined data to classify a map. The reason is
performance (and it gets a bit complicated to code given the way layers
work), joins can be quite slow.
The alternative is to use MapScript (equally slow), perhaps OGR with
point data, use PostGIS, or pre-process your data a bit.
Sorry,
Steve
>>> Stephen Woodbridge <woodbri at swoodbridge.com> 06/16/04 2:47 PM >>>
David Horowitz wrote:
> Hello all,
>
> I'm writing an application which gets its spatial data from shapefiles
but its feature data from a SQL data source (either MySQL or Oracle). I
have read the Wiki topic "JoinDatasources" but did not find its
explanation of how to go about this sufficient. Any help here would be
appreciated.
>
> To be more specific, I have all my data loaded into a MySQL database
(using the shp2mysql tool). Supposing the source shapefile is
"statemap.shp" and the feature column I wanted to access in my database
was called "title" what would my mapfile entry look like? Is using a
join the way to go about solving this problem?
I have a similar situation where all my spatial data is in shapefiles
and I have Summary File 1 data in MySQL. How would I set up a layer to
to JOIN MYSQL_ZIPCODE to DBF_ZIPCODE attributes and then specify
MYSQL_INCOME as the CLASSITEM so I can color polygons based on INCOME
values from Summary File 1.
I read the docs on this but the details were not obvious and there was a
phrase about MYSQL JOINs only being supported in a query template which
did not make any sense to me.
-Steve
_______________________________________________
Mapserver-dev mailing list
Mapserver-dev at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
More information about the mapserver-dev
mailing list