Skip to content

enzet/OpenMoonMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Small research project on using OpenStreetMap XML format to create the open map for Moon

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published