Skip to content

Latest commit

 

History

History
73 lines (51 loc) · 1.66 KB

README.md

File metadata and controls

73 lines (51 loc) · 1.66 KB

Open Moon Map

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.

Install

Requirements: Python 3.9.

pip install -r requirements.txt
pip install git+https://github.com/enzet/map-machine
pip install .

Get your own open Moon map

Preview

Construct OSM XML file

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.

Draw map with Map Machine

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:

  1. Draw tiles for zoom levels 0—4: map-machine tile -i moon.osm -z 0-4.
  2. Run Map Machine tile server: map-machine server.
  3. Open data/leaflet.html in browser.

Process other astronomical bodies

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

OSM XML file extension

Resulting OSM XML file has additional XML element object with equator attribute, that contains object's equator length in meters.