overturetoosm


Nameoverturetoosm JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryTranslate the Overture maps schema to OpenStreetMap tags.
upload_time2024-09-21 14:29:26
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords mapping openstreetmap osm overture overture maps
VCS
bugtrack_url
requirements pydantic pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Overture to OSM

![GitHub License](https://img.shields.io/github/license/whubsch/overturetoosm)
![GitHub last commit](https://img.shields.io/github/last-commit/whubsch/overturetoosm)
![PyPI - Version](https://img.shields.io/pypi/v/overturetoosm)
![Pepy Total Downlods](https://img.shields.io/pepy/dt/overturetoosm)

This Python project translates objects from the Overture maps schema to the OpenStreetMap (OSM) tagging scheme. The goal is to provide a seamless way to convert map data from Overture's format to a format that can be utilized within the OSM ecosystem. The package currently only supports Overture's `places`, `buildings`, and `addresses` layers. You can improve the Overture categorization that this package uses for the `places` layer by editing [the Overture categories page](https://wiki.openstreetmap.org/wiki/Overture_categories) on the OSM Wiki or submitting a pull request to the [tags.json](https://github.com/whubsch/overturetoosm/blob/main/scripts/tags.json) file.

There is also a Pydantic model for the `transportation` layer's `segment` object via `overturetoosm.segments.SegmentProperties`, but the conversion to OSM tags is not yet supported because of the Overture schema's complexity.

The package also allows you to use the module directly from the command line.
With the `overturemaps` Python package installed, you can download and convert
Overture data to OSM in two lines of code.

```bash
$ python -m overturemaps download --bbox=-71.068,42.353,-71.058,42.363 \\
  -f geojson --type=place -o boston.geojson
$ python -m overturetoosm place -i boston.geojson --in-place --confidence 0.9
```

> [!NOTE]
> Use of this package does not absolve you from following OSM's [import guidelines](https://wiki.openstreetmap.org/wiki/Import/Guidelines).

## Table of Contents

- [Features](#features)
- [Usage](#usage)
- [Docs](#docs)
- [License](#license)

## Features

- Translate Overture map places to OSM tags.
- Handle various map object types, including buildings and points of interest.
- Ensure compatibility with OSM data structures and conventions.

## Usage

This package is meant to work with GeoJSON files containing Overture maps data, including those produced by the [overturemaps](https://pypi.org/project/overturemaps/) Python package.

```console
pip install overturetoosm
```

You will probably for the most part be handling features from a GeoJSON or other file, but for demonstration purposes I'll define it inline:

```python
>>> import overturetoosm
>>> overture = {
        "id": "123",
        "version": 1,
        "update_time": "2022-01-01T00:00:00Z",
        "sources": [
            {
                "property": "property1",
                "dataset": "dataset1",
                "confidence": 0.8,
            }
        ],
        "names": {
            "primary": "Primary Name",
        },
        "categories": {"main": "restaurant"},
        "confidence": 0.8,
        "addresses": [
            {
                "freeform": "123 E Main Blvd",
                "locality": "City",
                "postcode": "12345",
                "region": "CA",
                "country": "US",
            }
        ],
    }
>>> output = overturetoosm.process_place(overture)
{
        "name": "Primary Name",
        "addr:street_address": "123 E Main Blvd",
        "addr:city": "City",
        "addr:postcode": "12345",
        "addr:state": "CA",
        "addr:country": "US",
        "source": "dataset1 via overturetoosm",
        "amenity": "restaurant",
}
```

Note that the `addr:street_address` tag is not suitable for import into OSM, and thus will have to be parsed further. If you are working on `places` in the US, you can automatically parse the `addr:street_address` tag using the [atlus](https://pypi.org/project/atlus/) package, a separate project I've worked on.

```python
>>> import atlus
>>> atlus.get_address(output["addr:street_address"])[0]
{"addr:housenumber": "123", "addr:street": "East Main Boulevard"}
```

## Docs

The documentation for our package is available online at our [documentation page](https://whubsch.github.io/overturetoosm/index.html). We would greatly appreciate your contributions to help improve the auto-generated docs; please submit any updates or corrections via pull requests.

## License

This project is licensed under the MIT License. See the [LICENSE](https://github.com/whubsch/overturetoosm/blob/main/LICENSE.txt) file for details.

## See also

- [Overture Maps](https://docs.overturemaps.org/schema/)
- [OpenStreetMap](https://www.openstreetmap.org/)
- [Overture categories wiki page](https://wiki.openstreetmap.org/wiki/Overture_categories)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "overturetoosm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "mapping, openstreetmap, osm, overture, overture maps",
    "author": null,
    "author_email": "Will <wahubsch@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/07/3b/ad27add05e73f80f6d414845dd20a9ab9b4e7397e61053442af66ff9ceab/overturetoosm-0.3.0.tar.gz",
    "platform": null,
    "description": "# Overture to OSM\n\n![GitHub License](https://img.shields.io/github/license/whubsch/overturetoosm)\n![GitHub last commit](https://img.shields.io/github/last-commit/whubsch/overturetoosm)\n![PyPI - Version](https://img.shields.io/pypi/v/overturetoosm)\n![Pepy Total Downlods](https://img.shields.io/pepy/dt/overturetoosm)\n\nThis Python project translates objects from the Overture maps schema to the OpenStreetMap (OSM) tagging scheme. The goal is to provide a seamless way to convert map data from Overture's format to a format that can be utilized within the OSM ecosystem. The package currently only supports Overture's `places`, `buildings`, and `addresses` layers. You can improve the Overture categorization that this package uses for the `places` layer by editing [the Overture categories page](https://wiki.openstreetmap.org/wiki/Overture_categories) on the OSM Wiki or submitting a pull request to the [tags.json](https://github.com/whubsch/overturetoosm/blob/main/scripts/tags.json) file.\n\nThere is also a Pydantic model for the `transportation` layer's `segment` object via `overturetoosm.segments.SegmentProperties`, but the conversion to OSM tags is not yet supported because of the Overture schema's complexity.\n\nThe package also allows you to use the module directly from the command line.\nWith the `overturemaps` Python package installed, you can download and convert\nOverture data to OSM in two lines of code.\n\n```bash\n$ python -m overturemaps download --bbox=-71.068,42.353,-71.058,42.363 \\\\\n  -f geojson --type=place -o boston.geojson\n$ python -m overturetoosm place -i boston.geojson --in-place --confidence 0.9\n```\n\n> [!NOTE]\n> Use of this package does not absolve you from following OSM's [import guidelines](https://wiki.openstreetmap.org/wiki/Import/Guidelines).\n\n## Table of Contents\n\n- [Features](#features)\n- [Usage](#usage)\n- [Docs](#docs)\n- [License](#license)\n\n## Features\n\n- Translate Overture map places to OSM tags.\n- Handle various map object types, including buildings and points of interest.\n- Ensure compatibility with OSM data structures and conventions.\n\n## Usage\n\nThis package is meant to work with GeoJSON files containing Overture maps data, including those produced by the [overturemaps](https://pypi.org/project/overturemaps/) Python package.\n\n```console\npip install overturetoosm\n```\n\nYou will probably for the most part be handling features from a GeoJSON or other file, but for demonstration purposes I'll define it inline:\n\n```python\n>>> import overturetoosm\n>>> overture = {\n        \"id\": \"123\",\n        \"version\": 1,\n        \"update_time\": \"2022-01-01T00:00:00Z\",\n        \"sources\": [\n            {\n                \"property\": \"property1\",\n                \"dataset\": \"dataset1\",\n                \"confidence\": 0.8,\n            }\n        ],\n        \"names\": {\n            \"primary\": \"Primary Name\",\n        },\n        \"categories\": {\"main\": \"restaurant\"},\n        \"confidence\": 0.8,\n        \"addresses\": [\n            {\n                \"freeform\": \"123 E Main Blvd\",\n                \"locality\": \"City\",\n                \"postcode\": \"12345\",\n                \"region\": \"CA\",\n                \"country\": \"US\",\n            }\n        ],\n    }\n>>> output = overturetoosm.process_place(overture)\n{\n        \"name\": \"Primary Name\",\n        \"addr:street_address\": \"123 E Main Blvd\",\n        \"addr:city\": \"City\",\n        \"addr:postcode\": \"12345\",\n        \"addr:state\": \"CA\",\n        \"addr:country\": \"US\",\n        \"source\": \"dataset1 via overturetoosm\",\n        \"amenity\": \"restaurant\",\n}\n```\n\nNote that the `addr:street_address` tag is not suitable for import into OSM, and thus will have to be parsed further. If you are working on `places` in the US, you can automatically parse the `addr:street_address` tag using the [atlus](https://pypi.org/project/atlus/) package, a separate project I've worked on.\n\n```python\n>>> import atlus\n>>> atlus.get_address(output[\"addr:street_address\"])[0]\n{\"addr:housenumber\": \"123\", \"addr:street\": \"East Main Boulevard\"}\n```\n\n## Docs\n\nThe documentation for our package is available online at our [documentation page](https://whubsch.github.io/overturetoosm/index.html). We would greatly appreciate your contributions to help improve the auto-generated docs; please submit any updates or corrections via pull requests.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/whubsch/overturetoosm/blob/main/LICENSE.txt) file for details.\n\n## See also\n\n- [Overture Maps](https://docs.overturemaps.org/schema/)\n- [OpenStreetMap](https://www.openstreetmap.org/)\n- [Overture categories wiki page](https://wiki.openstreetmap.org/wiki/Overture_categories)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Translate the Overture maps schema to OpenStreetMap tags.",
    "version": "0.3.0",
    "project_urls": {
        "Documentation": "https://whubsch.github.io/overturetoosm/index.html",
        "Issues": "https://github.com/whubsch/overturetoosm/issues",
        "Source": "https://github.com/whubsch/overturetoosm"
    },
    "split_keywords": [
        "mapping",
        " openstreetmap",
        " osm",
        " overture",
        " overture maps"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c57f81ef2c117040cf50f862970f8b8a5adb4ea974fdb5dbdd4fa27964102ac",
                "md5": "55aa6e1ba8be53298d5ab398f3d7bf7d",
                "sha256": "6fdd56b5bba8881b7c2ac9b314d25626706c9c0d6c0bde4b3458164c2eb1416d"
            },
            "downloads": -1,
            "filename": "overturetoosm-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55aa6e1ba8be53298d5ab398f3d7bf7d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 30196,
            "upload_time": "2024-09-21T14:29:25",
            "upload_time_iso_8601": "2024-09-21T14:29:25.270099Z",
            "url": "https://files.pythonhosted.org/packages/3c/57/f81ef2c117040cf50f862970f8b8a5adb4ea974fdb5dbdd4fa27964102ac/overturetoosm-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "073bad27add05e73f80f6d414845dd20a9ab9b4e7397e61053442af66ff9ceab",
                "md5": "7088f1bf4cff2a6e9f4ddfdd50703771",
                "sha256": "2aaf7fc6785050382169bf1ad9fd0efbf9bfdd4438bad7a7c8097f950040fb3f"
            },
            "downloads": -1,
            "filename": "overturetoosm-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7088f1bf4cff2a6e9f4ddfdd50703771",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 391205,
            "upload_time": "2024-09-21T14:29:26",
            "upload_time_iso_8601": "2024-09-21T14:29:26.894435Z",
            "url": "https://files.pythonhosted.org/packages/07/3b/ad27add05e73f80f6d414845dd20a9ab9b4e7397e61053442af66ff9ceab/overturetoosm-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-21 14:29:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "whubsch",
    "github_project": "overturetoosm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2.8.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "8.3.2"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "overturetoosm"
}
        
Elapsed time: 0.31313s