Circle Support For MapML

Peter Rushforth and I have been discussing various aspects of MapML in the Spatial Data On The Web Interest Group: https://w3c.github.io/sdw/ <https://w3c.github.io/sdw/> and he suggested I post this issue from our conversation here.

The question I raised was: how can I draw a circle using non-CSS units? For example, how can I draw a 10-metre radius circle around the Greenwich Observatory at 51.48N, 0.00E? This is a simple task using common web map Javascript APIs, e.g. Leaflet, but is not supported by MapML which seems like an oversight. While I acknowledge that calculating the vertex co-ordinates for a polygon-approximation to a circle is feasible, it’s also cumbersome.

There are a number of use cases where a circle, defined by its centre and radius, is the ideal symbol choice. It can represent an area of influence, e.g. the range of a lighthouse lamp or fog-horn, or an exclusion zone, e.g. a no-fly area around a mast or tall building. In each case, the location of the feature is known and the radius can be easily chosen, so a circle is an obvious choice.

MapML includes the geometry element: http://maps4html.github.io/MapML/spec/#the-geometry-element <http://maps4html.github.io/MapML/spec/#the-geometry-element> which mirrors GeoJSON's design, though doesn’t include circles. It’s interesting that the OpenLayers ol.geom interface also mirrors this design, with the notable addition of circles: http://openlayers.org/en/latest/apidoc/ol.geom.html <http://openlayers.org/en/latest/apidoc/ol.geom.html> and I think including a comparable ‘Circle’ to the geometry value list in MapML would be a valuable addition.

Also, there's a mismatch in the nomenclature and supported values between the geometry element in MapML and those of the area’s shape attribute in the new map element proposal: https://maps4html.github.io/HTML-Map-Element/spec/#attr-area-shape <https://maps4html.github.io/HTML-Map-Element/spec/#attr-area-shape>. Supported area shapes include circle and rectangle with no direct equivalents in MapML, markers are similar to points, lines are similar to linestrings, and only polygons are the same. I think this is likely to cause confusion, and should be made consistent.

I hope you find this helpful.

Rob Smith

Away Team
www.awayteam.co.uk <http://www.awayteam.co.uk/>

Received on Thursday, 18 January 2018 11:57:27 UTC