Article Tag: Shapely

Python geometry format conversion cheat-sheet


Posted on 2026-02-16, by Racum. Tags: Django GeoJSON GIS Python Shapely

If your GIS system is based on the Python/Django/DRF/PostGIS stack, it is very common to perform geometry format conversions between its different layers. This short article includes a cheat-sheet of the most common conversions needed.

Accessing the OpenStreetMap API with Python directly


Posted on 2024-04-16, by Racum. Tags: GIS OpenStreetMap JSON Python Shapely

On a previous article called "OpenStreetMap to GeoJSON", I explained how to extract Polygons from OSM using an online tool provided by from OSM France. And, on this article, I’ll explain how do that yourself directly using the OSM API and Python.

This also explains the basic concepts I used to write the osmexp tool, to export OSM elements into GeoJSON from the command-line.

Shapely example: Where to build cell-towers?


Posted on 2024-01-27, by Racum. Tags: GIS Python GeoJSON Shapely

This is a fun example of how to use Shapely to solve geographical problems. On this article I show how to cover a polygon with circles in a hexagonal pattern.