0

The labpt slot of the SpatialPolygon object in the sp package is vaguely defined in the documentation as a point where a label is displayed for the polygon. I would like to know the calculation behind it and what are it's properties. Typically are we sure that it will be in the polygon or like a centroid it can be out of the polygon?

I found a function in the rgeos package computing a similarly named object but cannot figure out if it actually is the function used by sp.

cmbarbu
  • 4,354
  • 25
  • 45

1 Answers1

0

It is the centroid of the polygon with minor adaptations as well described in this answer to a question about coordinates() which actually extract labpt from SpatialPolygon objects.

Community
  • 1
  • 1
cmbarbu
  • 4,354
  • 25
  • 45