OpenStreetMap is a collaborative, open-source mapping platform that provides freely accessible geographic data, maintained by a global community of contributors.
This application uses osmnx to retrieve path data from OpenStreetMap via the Overpass API, converting the paths into LineString format. The extracted paths are then saved as a GeoJSON file compatible with Geotrek.
Geotrek-Admin documentation.
docker build -t import_paths . --no-cache- Retrieve your user ID:
id - Run a container based on the created Docker image:
docker run -d -p 8000:8000 -v $(pwd)/var:/app/var:rw --user {USER_ID} --name app import_paths
Replace {USER_ID} with your actual user ID.
Restart the existing container with:
docker start appTo stop the running container, use:
docker stop appPaths can be downloaded using the Django management command.
The desired boundary can be specified using either a bounding box or a polygon.
Polygons should be provided in .wkt or .geojson format.
This file must be saved in the var/boundary directory.
Use the following command to execute Django management commands inside the running container:
docker exec app COMMANDpython manage.py download OUTPUT_FILE -b BBOX [-n NETWORK_TYPE]Parameters
- OUTPUT_FILE: path of your output file with the geojson extension:
/app/var/boundary/filename.geojson. The output file will be delivered in thevar/export/directory. - BBOX: bounding box coordinates in WGS84:
minlon,minlat,maxlon,maxlat - NETWORK_TYPE (optional): type of paths to download.
alldrivebikewalk(default)
python manage.py download OUTPUT_FILE -p POLYGON_FILE [-n NETWORK_TYPE]Parameters
OUTPUT_FILE: path of your output file with the geojson extension: /app/var/boundary/filename.geojson.
The output file will be delivered in the var/export/ directory.
POLYGON_FILE: WKT or GeoJSON filename defining the polygon boundary.
- NETWORK_TYPE (optional): type of paths to download.
alldrivebikewalk(default)