Hi,
The issue seems to be about decomposing polygons to their constituents, much
like normalising a database schema.
In fact, using Postgis with a normalised data structure, managing this is
relatively trivial. Polygons & polygon classes (categories) are a typical many
to many relationship, which is handled very well in a relational database.
Decompose all your polygons in a Postgis table, with a suitable primary key.
Some polygons (regions of overlap) will be members of more than one class.
Build a table with a list of unique classes describing all possible classes.
Build a table (relation) with the keys of polygons in one column & classes in
another. Thus each class can relate to many polygons & each polygon can be in
more than one class (eg: polygons of overlaps)
Your mapfile can use separate layers to plot one class per layer, using a query
on the database to return the appropriate polygons, or you can define multiple
classes in a single layer.
Your problem is that mapserver only renders polygons. It does not divide
polygons & crop them by areas of overlap with other polygons. So you need a
tool to manage the fully decomposed polygons, so that, for example, two
overlapping polygons are actually provided to mapserver as three separate
polygons, the overlapping region as one polygon & the two non-overlapping parts
as separate polygons.
Also note that depending on your requirements, you could have a map layer
defined by an SQL in Postgis which returned the overlapping region calculated
on the fly in a spatial query, so you could render the two polygons first, then
overlay the overlap... if that makes sense...
If you have areas where many polygons overlap, then it can be managed, but may
get a bit complex...
HTH,
Brent Wood
If polygons overlap, then the area of overlap is a polygon in it's own right.
--- On Tue, 12/22/09, Peter Hopfgartner wrote:
> From: Peter Hopfgartner
> Subject: Re: [mapserver-users] RE: Rendering overlapping data
> To: "Ludwig Kniprath"
> Cc: mapserver-users@lists.osgeo.org
> Date: Tuesday, December 22, 2009, 9:38 PM
> Ludwig Kniprath wrote:
> > I dont't think, Mapserver has the out-of-the-box
> possibility to render the overlapping parts of polygons in a
> special way. Perhaps you could try to create a separate
> layer (f. e. in Postgis with a special geo-query), that just
> shows these overlapping parts. But also then I think its
> difficult to query and to render the case, that three or
> more polygons do overlap.
> >
> > Ludwig
> >
> >
> Hi Ludwig,
>
> out of curiosity:
>
> How do other software packages handle this case?
>
> Are there some best practices? For example dividing the
> intersection area into stripes and cycle through the colors
> of the overlapping data?
>
> Does GeoServer have some way to visualize overlapping
> data?
>
> Would it make sense to collect some requirements to
> formulate an RFC?
>
> Regards,
>
> Peter
> >> Message: 2
> >> Date: Mon, 21 Dec 2009 17:22:44 +0100
> >> From: Peter Hopfgartner
> >> Subject: [mapserver-users] Rendering overlapping
> data
> >> To: mapserver-users@lists.osgeo.org
> >> Cc: d'Orio Pietro
> >> Message-ID: <4b2fa0d4.7020...@r3-gis.com>
> >> Content-Type: text/plain; charset=ISO-8859-1;
> format=flowed
> >>
> >> Dear list members
> >>
> >> We would like to visualize a layer with data,
> where polygons with different classes may overlap. Using
> transparency, "new" colors are introduced, e.g. if I overlap
> a blue and a red polygon I get an violet one.
> >>
> >> Is there a way to show overlapping polygons in
> stripes with cycling colors, or as a checker board? How do
> people handle this?
> >>
> >> Regards,
> >>
> >> Peter
> >>
> >> --
> >> Dott. Peter Hopfgartner
> >>
> >> R3 GIS Srl - GmbH
> >> Via Johann Kravogl-Str. 2
> >> I-39012 Meran/Merano (BZ)
> >> Email: peter.hopfgart...@r3-gis.com
> >> Tel. : +39 0473 494949
> >> Fax : +39 0473 069902
> >> www : http://www.r3-gis.com
> >>
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> >
>
>
> --
> Dott. Peter Hopfgartner
>
> R3 GIS Srl - GmbH
> Via Johann Kravogl-Str. 2
> I-39012 Meran/Merano (BZ)
> Email: peter.hopfgart...@r3-gis.com
> Tel. : +39 0473 494949
> Fax : +39 0473 069902
> www : http://www.r3-gis.com
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users