[mapserver-users] label all parts of a multi-part polygon

Stephen Woodbridge woodbri at swoodbridge.com
Tue Aug 7 10:01:58 PDT 2012


On 8/7/2012 12:13 PM, Mark Volz wrote:
> Hello
>
> Is it possible to label all parts of a multi-part polygon?  Please
> see geomoose.lyonco.org/geomoose2/ArcMapLabel.jpg for an example of
> what I would like to do.

Mark,

I don't think you can do this directly, you might want to open a new 
ticket to add this as an enhancement. It should be triggered by some 
optional tag in the label block so it can be turned on.

One work-around if you are using PostGIS is:

DATA "the_geom from (select gid, attr1, attr2, etc 
(st_dump(the_geom)).geom as the_geom from mytable) using unique gid"

This has a problem in that gid will not be unique so you may will have a 
problem if you use this in a query instead of a draw. Otherwise you may 
need to modify the SQL to generate a unique id maybe doing some thing 
like gid*100+path where path is the count of which geom in the 
multipolygon geom represents.

-Steve



More information about the MapServer-users mailing list