Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/osmzoso/osm2sqlite
A command line tool for reading OpenStreetMap XML data into a SQLite database.
https://github.com/osmzoso/osm2sqlite
openstreetmap openstreetmap-data osm sqlite xml
Last synced: 5 days ago
JSON representation
A command line tool for reading OpenStreetMap XML data into a SQLite database.
- Host: GitHub
- URL: https://github.com/osmzoso/osm2sqlite
- Owner: osmzoso
- License: gpl-3.0
- Created: 2020-08-25T06:15:43.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-10T13:28:08.000Z (7 months ago)
- Last Synced: 2024-04-10T15:26:57.396Z (7 months ago)
- Topics: openstreetmap, openstreetmap-data, osm, sqlite, xml
- Language: Python
- Homepage:
- Size: 520 KB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# osm2sqlite
A simple command line tool for reading OpenStreetMap XML data into a SQLite database.
```
Usage:
osm2sqlite SQLITE_DATABASE OSM_XML_FILE [OPTION]...Options:
rtree Add R*Tree indexes
addr Add address tables
graph Add graph table
noindex Do not create indexes (not recommended)When OSM_XML_FILE is -, read standard input.
```The command
```
osm2sqlite output.db input.osm
```
reads the [OSM XML](https://wiki.openstreetmap.org/wiki/OSM_XML) file **input.osm**
and creates in the database **output.db** the tables.Some options can be used to create additional data.
The tables are described in the [documentation](doc/doc_osm2sqlite.md).
OSM data can be obtained from a provider such as [Geofabrik](https://download.geofabrik.de).
|[**Download the latest version**](https://github.com/osmzoso/osm2sqlite/releases/latest)|
|----------------------------------------------------------------------------------------|---
## Miscellaneous
There are two programme versions:
- a version in Python as a prototype (./src_py)
- a version in C (./src)Time measurement for **saarland.osm (700 MB)**:
Python : 2 minutes 36 seconds
C : 47 seconds---
Compiling the C version on Linux:
```
make
sudo make install
```
see also file **cross_compile_windows.sh**.