{"id":19010857,"url":"https://github.com/osmcode/osm-area-tools","last_synced_at":"2025-04-22T23:22:56.261Z","repository":{"id":145468651,"uuid":"57161989","full_name":"osmcode/osm-area-tools","owner":"osmcode","description":"OSM Area Tools","archived":false,"fork":false,"pushed_at":"2024-12-16T19:04:56.000Z","size":127,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-17T14:39:01.385Z","etag":null,"topics":["c-plus-plus","openstreetmap"],"latest_commit_sha":null,"homepage":"https://osmcode.org/osm-area-tools/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osmcode.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-04-26T21:08:37.000Z","updated_at":"2024-12-16T18:59:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"c48edd8b-ed74-42e2-9f79-aa5019a939ac","html_url":"https://github.com/osmcode/osm-area-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmcode%2Fosm-area-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmcode%2Fosm-area-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmcode%2Fosm-area-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmcode%2Fosm-area-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osmcode","download_url":"https://codeload.github.com/osmcode/osm-area-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250338589,"owners_count":21414212,"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":["c-plus-plus","openstreetmap"],"created_at":"2024-11-08T19:12:43.082Z","updated_at":"2025-04-22T23:22:56.244Z","avatar_url":"https://github.com/osmcode.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# OSM Area Tools\n\nOpenStreetMap doesn't have anything like an *Area*, *Polygon* or *MultiPolygon*\nbasic data type. Instead, areas are modelled as closed ways or using a relation\ntagged with `type=multipolygon` or `type=boundary`. This makes the data hard to\nedit and use, but it is the way it is.\n\nThis repository contains several programs based on the\n[libosmium](https://github.com/osmcode/libsomium) library that help with\nunderstanding what areas there are in OSM by creating statistics or other\ninformation from the OSM data. Some programs assemble areas from the\nnodes, ways, and relations.\n\nThe programs in this repository are not meant to be used by end users, they are\nfor developers or mappers who want to understand what's in the OSM data and\nmaybe fix (some of) it.\n\n\n## Naming Conventions\n\nOsmium/OSM Area Tools uses the following naming conventions:\n\n* Area: A Polygon or MultiPolygon with tags created from a closed way or\n  an Area Relation.\n* Area Relation: Any kind of relation that can be turned into an area,\n  a Multipolygon Relation or a Boundary Relation.\n* Multipolygon Relation: A relation tagged `type=multipolygon`.\n* Boundary Relation: A relation tagged `type=boundary`.\n* Assembling: The process of creating an Area from the basic OSM objects.\n* Polygon: A type of geometry (as defined by the Simple Feature Definition)\n  with one outer ring and zero or more inner rings.\n* MultiPolygon: A collection of polygons (with one or more outer rings and\n  zero or more inner rings).\n\n\n## Programs\n\n[![Build Status](https://github.com/osmcode/osm-area-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/osmcode/osm-area-tools/actions)\n\n\n### `oat_closed_way_filter`\n\nCopy only closed ways from input file to output file.\n\n### `oat_complex_areas`\n\nFind all \"simple\" and \"complex\" areas and write their IDs to the output files.\nComplex areas are those where the boundary meets itself somewhere, i.e. they\nhave a node more than once in the boundary. Simple areas are all others.\n\n### `oat_create_areas`\n\nAssembles areas from their parts and optionally checks them for validity. Can\nwrite the areas to a Spatialite database including all the problems encountered\non the way.\n\n### `oat_failed_area_tags`\n\nCreates areas but only looks at those areas which could not be built due to\ngeometry problems. Creates some tag statistics on stdout.\n\n### `oat_find_problems`\n\nFind problematic data with respect to area creation. This program does not try\nto actually build the areas, it just looks at the data and flags some obvious\nproblems.\n\n### `oat_large_areas`\n\nLook at the largest area relations in the input OSM file in terms of the number\nof ways or nodes they contain. Creates a Sqlite database with information about\nthose relations and an OSM file containing those relations.\n\n### `oat_mercator`\n\nAssembles areas from their parts, projects them to Mercator (3857) and checks\nthem for validity. Can write the areas to a Spatialite database including all\nthe problems encountered on the way.\n\n### `oat_problem_report`\n\nCreate areas and report all problems encountered into shapefiles. The areas\nthemselves are not kept.\n\n### `oat_sizes`\n\nPrints sizes of some C++ structures used in assembling areas from their parts.\nThis is only interesting for C++ developers optimizing the code.\n\n### `oat_stats`\n\nCreate some statistics from an OSM file related to areas. This program will\nnot actually assemble the areas, just look at the objects potentially making\nup the areas. The results are stored in an Sqlite database.\n\n\n## Prerequisites\n\nYou need a C++14 compliant compiler. You also need the following libraries:\n\n    Osmium Library\n        Need at least version 2.15.4\n        https://osmcode.org/libosmium\n\n    Protozero\n        Need at least version 1.6.3\n        https://github.com/mapbox/protozero\n        Debian/Ubuntu: libprotozero-dev\n\n    gdalcpp\n        https://github.com/joto/gdalcpp\n        Also included in the libosmium repository.\n\n    bz2lib (for reading and writing bzipped files)\n        http://www.bzip.org/\n        Debian/Ubuntu: libbz2-dev\n\n    CMake (for building)\n        https://cmake.org/\n        Debian/Ubuntu: cmake\n\n    Expat (for parsing XML files)\n        https://libexpat.github.io/\n        Debian/Ubuntu: libexpat1-dev\n        openSUSE: libexpat-devel\n\n    GDAL/OGR\n        https://gdal.org/\n        Debian/Ubuntu: libgdal-dev\n\n    GEOS\n        https://trac.osgeo.org/geos/\n        Debian/Ubuntu: libgeos++-dev\n\n    Sqlite\n        https://sqlite.org/\n        Debian/Ubuntu: libsqlite3-dev\n\n    zlib (for PBF support)\n        https://www.zlib.net/\n        Debian/Ubuntu: zlib1g-dev\n        openSUSE: zlib-devel\n\n\n## Building\n\nBuild like any CMake program by creating a build directory and running `cmake`\nand then `make` as follows:\n\n    mkdir build\n    cd build\n    cmake ..\n    make\n\nTo set the build type call cmake with `-DCMAKE_BUILD_TYPE=type`. Possible\nvalues are empty, Debug, Release, RelWithDebInfo, MinSizeRel, and Dev. The\ndefaults is RelWithDebInfo.\n\n\n## License\n\nCopyright (C) 2016-2024  Jochen Topf \u003cjochen@topf.org\u003e\n\nThis program is available under the GNU GENERAL PUBLIC LICENSE Version 3.\nSee the file LICENSE.txt for the complete text of the license.\n\n\n## Authors\n\nThis program was written and is maintained by Jochen Topf \u003cjochen@topf.org\u003e.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosmcode%2Fosm-area-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosmcode%2Fosm-area-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosmcode%2Fosm-area-tools/lists"}