clarify geof:length vs geof:perimeter
Opened this issue · 0 comments
I find the descriptions of length and perimeter, and the difference between them, unclear:
geof:perimeter returns the perimeter of geom in the unit specified by the unit parameter for areal geometries. For non-areal geometries the result is equivalent to geof:hasLength.
- geof:hasLength should be geof:length
- since geof:length is also applicable to areal features ("length of the boundary of a polygon"), what is the difference?
- if the polygon has holes, are they added to the perimeter?
The function geof:metricLength returns the length of geom in meters. The longest length from any one dimension is returned. This is for example the length of a line from its beginning point to its endpoint or the length of the boundary of a polygon. This function is similar to geof:length but does not need a specification of measurement unit.
- "longest length from any one dimension" sounds like the diameter of a feature. What's the purpose of this sentence? I think delete it
- "length of the boundary of a polygon": this is the textbook definition of "perimeter", isn't it?
The function geof:length returns the length of geom. The longest length from any one dimension is returned. This function is similar to geof:metricLength, which does not need a specification of measurement unit.
- Following the example of
metricPerimeter
, move the substantive part of the definition frommetricLength
tolength
. This way you avoid any discrepancies between the definitions oflength
andmetricLength