duplicate labels problem using mapserver ka-map

Steve Lime Steve.Lime at DNR.STATE.MN.US
Wed Sep 27 15:21:26 EDT 2006


Labeling tiled maps is a challenging problem. We have some ideas on how
to improve things, but they are just ideas at this point. I think for
now the only way to gaurantee 1 label would be to pre-compute a single
label position and store that as a point layer. There a couple of ways
to do that:

  - if you have Arcview or whatever you can typically save labels as a
shapefile
  - you could render the whole US as one relatively large image, and
using MapScript could convert the label cache to a shapefile (converting
pixel coordinates to map coordinates)
  - if using PostGIS perhaps the getCentroid method would help although
centroids are not always good label points
  - in 4.10, MapScript has all the GEOS methods exposed which might be
helpful

I'm sure others might have ideas too.

Steve

>>> Ujjwal Chowdhury <uchowdhury at YAHOO.COM> 9/27/2006 12:00:07 PM >>>
Hi,
 
I am using ka-map and mapserver to draw US state level maps. I am
labelling the states with the names e.g CA. I noticed that duplicate
labels are appearing on the map for many of the states. I guess the
tiling done by ka-map is causing mapserver to do this. How do you make
sure there is just one label for each state ?
 
Thanks
UC

 		
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 



More information about the mapserver-users mailing list