Small research project on using OpenStreetMap XML format to create open map of Moon and displaying this data with Map Machine.
Idea from Mapping the Moon wiki page.
Requirements: Python 3.9.
pip install -r requirements.txt
pip install git+https://github.com/enzet/map-machine
pip install .
Run
openmoonmap --body 405 --output moon.osm
to request objects on the surface of the Moon (Wikidata id
Q405) Wikidata through SPARQL, and parse
results into OSM XML file moon.osm
.
Using Map Machine one can draw SVG map moon.svg
:
map-machine render \
--input moon.osm \
--output moon.svg \
--zoom 2
or construct tiles for interactive map and run it:
- Draw tiles for zoom levels 0—4:
map-machine tile -i moon.osm -z 0-4
. - Run Map Machine tile server:
map-machine server
. - Open
data/leaflet.html
in browser.
The same process can be done for other astronomical bodies. To do so one should know its Wikidata identifier.
Example for Mars (Wikidata id Q111):
openmoonmap --body 111 --output mars.osm
Resulting OSM XML file has additional XML element object
with equator
attribute, that contains object's equator length in meters.