[Mapserver-users] Joining geospatial data to attribute dataa s basis for layer defi nition

Steve Lime steve.lime at dnr.state.mn.us
Fri Oct 10 11:11:46 PDT 2003


Other than the OGR method mention by Dan in another reply the only thing
I can think
of would be done using MapScript. You could associate features with
other data sources
and draw them accordingly in that envrionment. I had done something
similar a while back
with a shapefile and a MySQL table. It's not still running but it
worked ok. Doing a join like
that for every map is just incredibly expensive.

Other ideas would revolve around production of special web products.
I.e. build a special
dataset periodically from the spatial and non-spatial data. People do
this all the time in the
database world with de-normalized data marts and wharehouses and much
of the time it
makes sense for GIS data as well.

Steve

>>> "Pryor, Clayton J" <CJPRYOR at sandia.gov> 10/9/2003 11:04:21 AM >>>

I agree with Sean's comments below (please see the very bottom of this
message) and I discussed this approach with our GIS/database expert. 
For
the sake of evaluation, he has agree to build a view for us.  I will
use the
same view for the MapServer application and the ArcIMS application.

However, I would still like to know if there are any MapServer options
out
there for dynamically joining geospatial data to non-geospatial data to
use
as the basis for a layer where the non-geospatial data is used to
render the
geospatial data with different colors.

Any other ideas out there?

Thanks,

Clay

-----Original Message-----
From: Sean Gillies [mailto:sgillies at frii.com] 
Sent: Tuesday, October 07, 2003 9:03 AM
To: Pryor, Clayton J
Cc: 'mapserver-users at lists.gis.umn.edu'; Detry, Rich
Subject: Re: [Mapserver-users] Joining geospatial data to attribute
data
as basis for layer defi nition


On Tuesday, October 7, 2003, at 08:19  AM, Pryor, Clayton J wrote:

>
> Hi all,
>
> I am building a prototype application in MapServer to evaluate
whether 
> we
> should migrate from ArcIMS or not.  One of the requirements of this
> application is to render colors of geospatial data based on
attributes 
> in a
> table outside of the geospatial data.  In ArcIMS I defined these
types 
> of
> layers as a SPATIALQUERY in the layer definition (as shown below).
>
...
> In my review of the MapServer documentation and discussions, I found
a 
> post
> in 2001 that addresses the subject.  In part, it reads as follows:
>
> "No joins are supported for classification purposes.  You can only
use
> directly attached attributes.  This was done for performance
reasons."
>
> I have a few questions.
>
> 1)  Is this statement still true?
>
> 2)  What exactly are "directly attached attributes?"  I did a search

> for
> this term and could find nothing.  I am assuming this means that the
> attributes must be part of the geospatial data table.
>
> 3)  How would you go about defining the equivalent to the above
ArcIMS 
> layer
> definition in a MapServer application?  In this question, I am 
> concerned
> about the join.  I have seen examples of how to reference a singe 
> geospatial
> table and how to set up color classifications based on attribute 
> values.
>
> 4)  One thing I haven't explored is the possibility of handling the 
> join at
> the database level and then referencing the resulting join in the
map
> definition.  Will that work?
>
> Thanks in advance for any help.
>
> Sincerely,
>
> Clay
>

Clay,

Go in the direction that you mention in your #4.  Even if MapServer
was
enhanced to allow joins for classification, it's highly doubtful that 
the
implementation would ever match the performance of a join in your
RDBMS.

cheers,
Sean

--
Sean Gillies
sgillies at frii dot com
http://www.frii.com/~sgillies 


_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list