{"id":21581420,"url":"https://github.com/dlr-eoc/osm-ogr-tools","last_synced_at":"2025-04-10T18:53:23.637Z","repository":{"id":91893702,"uuid":"155388118","full_name":"dlr-eoc/osm-ogr-tools","owner":"dlr-eoc","description":"Tools for working with OSM data","archived":false,"fork":false,"pushed_at":"2019-04-12T10:15:41.000Z","size":106,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T16:41:16.835Z","etag":null,"topics":["geodata","geospatial","ogr","openstreetmap","osm"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlr-eoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-30T13:15:29.000Z","updated_at":"2024-08-06T11:09:59.000Z","dependencies_parsed_at":"2023-09-25T02:09:04.183Z","dependency_job_id":null,"html_url":"https://github.com/dlr-eoc/osm-ogr-tools","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"b70e1b413f74dc1362d2b7acade56e51aab73079"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlr-eoc%2Fosm-ogr-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlr-eoc%2Fosm-ogr-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlr-eoc%2Fosm-ogr-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlr-eoc%2Fosm-ogr-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlr-eoc","download_url":"https://codeload.github.com/dlr-eoc/osm-ogr-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248275254,"owners_count":21076554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geodata","geospatial","ogr","openstreetmap","osm"],"created_at":"2024-11-24T14:12:27.835Z","updated_at":"2025-04-10T18:53:23.610Z","avatar_url":"https://github.com/dlr-eoc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# osm-ogr-tools\n\nTools for working with OSM data. Most of these tools are based on [osmium-tool](https://github.com/osmcode/osmium-tool) and\nthe [libosmium library](https://github.com/osmcode/libosmium).\n\nCurrently the tools can be viewed as an extension to the functionality provided by\nthe `osmium` tools. So please also refer to the [osmium tool manual](https://osmcode.org/osmium-tool/manual.html).\n\n## Included tools and libraries\n\n### osm_extract.py\n\nWrapper to combine `osm2ogr_with_tags` and `osmium extract` and add the feature to filter OSM\ndata using complete vector datasets.\n\n![](doc/osm_extract_diagram.png)\n\nThis script can also be imported as a python module into own programs, just copy it into your source tree or\nmodify your `sys.path` to import it from its intallation directory. It provides the `osm_ogr_extract` function.\n\n\n    usage: osm_extract.py [-h] [--geofilter GEOFILTER] [-f FORMAT_NAME]\n                          [-l LAYER_NAME] [--length] [-w] [-t [TAGS [TAGS ...]]]\n                          [-s STRATEGY]\n                          osm_input_file ogr_output_file\n\n    Extract geographical subsets from an OSM-PBF file and export the data to a GIS\n    format.\n\n    positional arguments:\n      osm_input_file        OSM input file\n      ogr_output_file       OGR output file\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --geofilter GEOFILTER\n                            Vector-dataset to use as a spatial filter. Geometry\n                            type must be polygon or multipolygon. (default: None)\n      -f FORMAT_NAME, --format_name FORMAT_NAME\n                            Outputformat. For a list of supported formats see the\n                            output of the \"ogrinfo --formats\" command. (default:\n                            ESRI Shapefile)\n      -l LAYER_NAME, --layer_name LAYER_NAME\n                            Layer name of the exported layer. (default: export)\n      --length              Add a field containing the length of features. This\n                            option only applies when ways are exported. The units\n                            are meters. (default: False)\n      -w, --ways            Convert ways instead of nodes. Default is nodes.\n                            (default: False)\n      -t [TAGS [TAGS ...]], --tags [TAGS [TAGS ...]]\n                            Tags to create columns for. (default: None)\n      -s STRATEGY, --strategy STRATEGY\n                            Strategy to create geographical extracts. See the\n                            \"osmium extract\" manual for more on this topic.\n                            (default: complete_ways)\n\n\n### osm2ogr_with_tags\n\n    osm2ogr_with_tags (version 0.1.0)\n\n    Convert OSM data to OGR formats. This tools allows to export arbitary tags to\n    OGR fields.\n\n    Options:\n\n    Input/Output:\n      -i [ --inputfile ] arg    Name of the OSM input file\n      -o [ --outputfile ] arg   Name of the OSM output file\n      -f [ --format_name ] arg  Outputformat. For a list of supported formats see\n                                the output of the \"ogrinfo --formats\" command. The\n                                default is \"ESRI Shapefile\".\n      -l [ --layer_name ] arg   Layer name of the exported layer. The default is\n                                \"export\".\n      -t [ --tag ] arg          Tags to create columns for. This option may be\n                                repeated multiple times to add more than one tag.\n      -w [ --ways ]             Convert ways instead of nodes. Default is nodes.\n      --length                  Add a field containing the length of features. The\n                                name of the field will be \"osm_length\". This option\n                                only applies when ways are exported. The units are\n                                meters.\n\n    General:\n      -h [ --help ]             Print help message.\n      -v [ --version ]          Print version and exit.\n      -p [ --progress ]         Display a progress bar showing the percentage of\n                                the inputfile which has been processed. As PBF\n                                files are sorted by type, the output can be a bit\n                                misleading, but gives a general idea of the\n                                progress made.\n\n\n## Building this software\n\nInstall the dependencies (this command is ubuntu specific):\n\n    apt-get install build-essential g++ libosmium2-dev cmake libgdal-dev \\\n            libboost-program-options-dev python3 python3-gdal osmium-tool\n\n\nBuild:\n\n    cd osm-ogr-tools\n    mkdir build\n    cd build\n    cmake ..\n    make\n\nAfter the build, for a system-wide installation:\n\n\n    sudo make install\n\n\nThis will also install the python scripts.\n\n# Legal and Licensing\n\nThis software is licensed under the [Apache 2.0 License](LICENSE.txt).\n\n(c) 2018 German Aerospace Center (DLR); German Remote Sensing Data Center; Department: Geo-Risks and Civil Security\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlr-eoc%2Fosm-ogr-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlr-eoc%2Fosm-ogr-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlr-eoc%2Fosm-ogr-tools/lists"}