Skip to content
GitHub

Malagasy Address

Check the data on a map

See the points, shapes and accepted area of the places data over Madagascar, and test what nearestPlace answers anywhere on the map.

Every place in the list has a point and an area, and nearestPlace only accepts a point inside a box around Madagascar. This map draws all of it, so you can check the data by eye: do the points sit where the places are, and does the accepted area cover the island?

Cursor -

Drag to move the map, scroll to zoom, click to ask for the nearest place.Open full screen

Layers

What nearestPlace answers

Click the map to see what nearestPlace answers there.

  • Accepted area (bounds): the dashed box. A point outside it makes nearestPlace throw OUT_OF_RANGE. It is a rectangle of whole degrees (latitude -26 to -11, longitude 43 to 51), not the real border.
  • Shapes: the boundaries of the COD-AB for every level, simplified so the page stays light. Choosing a level in the panel shows all its shapes and points. They are only drawn here: the libraries do not use shapes yet.
  • Base map: OpenStreetMap tiles under the data, loaded from the OpenStreetMap servers. Turn the layer off to work without them.
  • Points: the point the COD-AB gives for each place, one color per level. Zoom in to see the communes and the fokontany.

Click anywhere on the map. The panel shows what nearestPlace answers for that spot at the level you picked: the place with the nearest point, and the distance to it. It also shows the place whose shape contains the click. Near a boundary the two can differ: nearestPlace answers “nearest point”, not “contains”.

Found a point in the wrong place, or a place missing from the area? Please open an issue with the code of the place.

The points, names and areas come from the OCHA COD-AB for Madagascar (CC BY-IGO), rounded as described in the rules.