2011/9/22 Håvard Wahl Kongsgård <haavard.kongsga...@gmail.com>:
> Hi, I have a problem with overlapping points(identical XY). Googling I
> found that Arcgis has a useful tool "Disperse Markers" which expands
> clustered(overlapping points)
> http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1313&pid=1306&topicname=Disperse_Markers_(Cartography)
> . Is a similar feature available in geoserver/openlayers for expanding
> point clusters on the fly? The math behind it must be very simple, so
> the alternative is to created a new geom in postigs with expanded
> clusters.

There is a little trick you can employ. Text symbolizers in GeoServer
can be associated
to a graphic, which in the original intention was the "road plate", a
background graphic
that would be moved along with the label

Now, if your label is empty space you can use label displacement to
actually move away
the points in a controlled way.
The downside if you want is that if a new position cannot be found,
not even by moving
it around within the specified distance, the point won't be painted at all.

Here is an example map with cities:
http://demo1.geo-solutions.it/playground/GeoSolutions/wms?LAYERS=GeoSolutions%3Acities&STYLES=stars&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-0.59257250976506,38.661416015626,24.887332275391,51.617299804688&WIDTH=649&HEIGHT=330

and here is the same with the trick above:
http://demo1.geo-solutions.it/playground/GeoSolutions/wms?LAYERS=GeoSolutions%3Acities&STYLES=displace&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-0.59257250976506,38.661416015626,24.887332275391,51.617299804688&WIDTH=649&HEIGHT=330

I guess you'll need to play a bit with it to get it right, but it may work.
The full style is here:
http://demo1.geo-solutions.it/playground/styles/displace.sld

Cheers
Andrea


-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to