https://github.com/lukasalexanderweber/replace-invalid-osm-ids
Update invalid (<1) Ids within a OSM file
https://github.com/lukasalexanderweber/replace-invalid-osm-ids
Last synced: 2 months ago
JSON representation
Update invalid (<1) Ids within a OSM file
- Host: GitHub
- URL: https://github.com/lukasalexanderweber/replace-invalid-osm-ids
- Owner: lukasalexanderweber
- License: mit
- Created: 2022-08-25T07:30:37.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-31T06:23:05.000Z (almost 3 years ago)
- Last Synced: 2025-01-29T21:54:58.935Z (4 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# replace-invalid-osm-ids
Update invalid (<1) Ids within a OSM fileEditors as JOSM store yet not existing OSM IDs as negatives.
However, tools like [osm2pgsql](https://github.com/openstreetmap/osm2pgsql/issues/1097) or [graphhopper](https://github.com/graphhopper/graphhopper) do not support such negative IDs.This script updates all invalid IDs to valid IDs.
## Usage
`python replace_invalid_osm_ids.py invalid.osm valid.osm`
invalid.osm
```xml
```
valid.osm
```xml
```