Re: Label Point of Polygons


 Thanks Doug for bringing this up again.

 If we can implement something like in [4] as a label point, it would be 

 The other problem we need to solve, is what happens when a single SVG 
 path is made of multiple polygons. Do we only expose the label point of 
 the biggest polygon or one for each sub-path? IMO this should be 

 I will see if I can invite OSGeo people to join the discussion.


 On Sun, 18 Nov 2012 17:17:13 -0500, Doug Schepers wrote:
> Hi, folks-
> During the SVG WG F2F in Rigi-Kaltbad, Switzerland, while discussing
> various topics around mapping, we had a diversion into some of the
> problems of labeling [1], including the idea of exposing the centroid
> of a polygon via a keyword and/or API, so authors could use it as a
> label point (among other uses).
> But, as noted during that meeting, the centroid is not always a good
> label point, because of what I'll call the "Florida Problem":
> sometimes, the centroid of a shape is outside the boundaries of the
> shape [2].
> There are various ways to improve this. One mapping app (Manifold)
> addresses this by having several different "centroids": Centroids;
> Centroids (Box); Centroids (Inner); and Centroids (Weight) [3]. Each
> has benefits and downsides, which means that none is totally suitable
> for a completely automated solution.
> But digging a bit more, I found an alternate model that seems fairly
> robust [4]. Basically, if you find the maximal inscribed circle 
> (i.e.,
> the largest circle that will fit into the polygon), the centerpoint 
> of
> that circle will have the best chance of being the ideal label point
> [5][6].
> However, this may (or may not) be computationally expensive... a
> little more digging suggested various techniques for doing this [6],
> including using Voronoi tessellation.
> I'm not sure of next steps here, but I thought I'd mention what I
> found so far, in case it inspires someone. I do think this is
> something that could be very useful, and not just for mapping.
> Thoughts?
> [1]
> [2]
> [3]
> [4]
> [5] 
> [6]
> Regards-
> -Doug

 Andreas Neumann
 Böschacherstrasse 10A
 8624 GrĂ¼t (Gossau ZH)

Received on Monday, 19 November 2012 10:22:22 UTC