geomd
GeoMarkdown is a Markdown dialect for geodata. This package provides parsers and renderers that convert between GeoMarkdown and GeoJSON
Downloads & Community Adoption
Health & Engineering Analysis (5 Pillars)
1. Governance & Community100 / 200 ▾
2. PEP Metadata & Packaging200 / 200 ▾
3. Security & Supply Chain150 / 200 ▾
4. Documentation, SEO & Ecosystem105 / 200 ▾
5. Engineering, CI & Quality135 / 200 ▾
Official Documentation & Usage Guide — geomd
Show full original documentation (English README) ▾
geomd
GeoMarkdown is a Markdown dialect for geodata. This package provides parsers and renderers that convert between GeoMarkdown and GeoJSON
See the Specification for the full notation.
Quickstart
Walk through parsing and rendering in
notebooks/quickstart.ipynb.
Or, in three lines:
import geomd as gmd
markdown_str = """
# Barcelona Tour
## Park Güell
<!--
field_mapping:
- On map: geometry
-->
### Overview
A colorful park designed by Antoni Gaudí
### Address
Carrer d'Olot, Barcelona, Spain
### On map
```geometry
{"type": "Point", "coordinates": [2.1527, 41.4145]}
```
"""
# Convert from GeoMarkdown to GeoJSON
geojson_str = gmd.convert(
text=markdown_str,
src="geomd",
dst="geojson"
)
print(geojson_str)
Try it online
The quickest way to see geomd in action is the hosted demo:
The service takes a GeoJSON file, reads it, and renders it back as HTML. The example above uses barcelona_tour.geojson
The service accepts three query parameters:
| Parameter | Description | Example |
|---|---|---|
url |
Public URL of the source file | https://raw.githubusercontent.com/.../barcelona_tour.geojson |
src |
Source format | geojson |
dst |
Target format | html |
auto_contents |
Auto-generate table of contents (true/false, default: false) |
true |
contents_title |
Title of the table of contents (str, default: "Contents") |
Table of Contents |
The demo server also exposes an interactive Swagger UI where you can explore and test the available endpoints directly from your browser:
https://geomd.onrender.com/docs
Install
As a library
With uv (recommended):
uv add geomd
With pip:
pip install geomd
Development version
The latest unreleased code from main. May contain bugs, may
break without notice. Use only if you need a fix that hasn't
shipped to PyPI yet.
uv add "geomd @ git+https://github.com/spapulin/geomd.git"
pip install "geomd @ git+https://github.com/spapulin/geomd.git"
For reproducible installs, pin to a tag or commit:
uv add "geomd @ git+https://github.com/spapulin/[email protected]"
Specification
GeoMarkdown is defined by Specification. The spec is versioned independently of the package:
- Package:
geomdis the Python implementation. - Spec:
0.1.0is the notation.