Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enzet/openmoonmap
Small research project on using OpenStreetMap XML format to create the open map for Moon
https://github.com/enzet/openmoonmap
moon openstreetmap python
Last synced: about 1 month ago
JSON representation
Small research project on using OpenStreetMap XML format to create the open map for Moon
- Host: GitHub
- URL: https://github.com/enzet/openmoonmap
- Owner: enzet
- License: mit
- Created: 2021-08-30T22:23:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-08T20:48:35.000Z (over 2 years ago)
- Last Synced: 2023-02-27T12:27:48.695Z (almost 2 years ago)
- Topics: moon, openstreetmap, python
- Language: Python
- Homepage:
- Size: 162 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Open Moon Map
=============Small research project on using OpenStreetMap XML format to create open map of
Moon and displaying this data with
[Map Machine](https://github.com/enzet/map-machine).Idea from
[Mapping the Moon](https://wiki.openstreetmap.org/wiki/Mapping_the_Moon) wiki
page.Install
-------**Requirements**: Python 3.9.
```bash
pip install -r requirements.txt
pip install git+https://github.com/enzet/map-machine
pip install .
```Get your own open Moon map
--------------------------![Preview](doc/moon.png)
### Construct OSM XML file ###
Run
```bash
openmoonmap --body 405 --output moon.osm
```to request objects on the surface of the Moon (Wikidata id
[Q405](https://www.wikidata.org/wiki/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`:
```bash
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](https://www.wikidata.org/wiki/Q111)):
```bash
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.