crossroads-schematization


Namecrossroads-schematization JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/jmtrivial/crossroads-schematization/
SummaryCrossroads schematization is a python tool that produces automatic schematization of intersections from OpenStreetMap.
upload_time2023-07-20 11:10:12
maintainer
docs_urlNone
authorJean-Marie Favreau
requires_python
licenseAGPL-3.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Crossroads schematization

Generate a schematization of an intersection from OpenStreetMap data.

## Installation

With pip, use the following command line to install crschem:

* ```pip install crossroads-schematization```

Dependancies:

Crossroads schematization depends on ```crmodel```, that implies the following cascading dependancies:

* [crossroadsdescriber](https://github.com/jeremyk6/crmodel/)
* [crossroads-segmentation](https://github.com/jmtrivial/crossroads-segmentation)
* OSMnx
* NetworkX, geopandas


## Usage

If you installed crossroads-schematization using pip, a console script is now available using ```get_crossroad_schematization```.
This script is also available in the examples folder (```PYTHONPATH=$PWD examples/get-crossroad-schematization.py```). You will find a complete description of the parameters using ```--help```.

## Pipeline

First compute for each branch two long edges *S1* and *S2* corresponding to the sidewalks:

* for each edge part of a branch, identify the corresponding polyline (continue a couple of 10 meters outside of the crossing)
* fit a long edge *E* on this polyline, starting from the beginning of the polyline (e.g. 50 meters for example), and with a fixed length in the exterior direction)
* estimate the width of the way (using the number of lanes, the classification of the way)
* reconstruct a linear description of the sidewalk by shifting *E* 
* if the branch is composed of more than one way, identify the two adjacent sidewalks and make them parallel

Each sidewalk is part of two branches (see crossroads-description by Jérémy Kalsron), thus is described by two long edges *[Sa_i, Sa_e]* and *[Sa_i, Sa_e]* (*e* for exterior, *i* for interior).

* we compute the intersection $m$ between *Sa* and *Sb*, and build a new representation with a polyline made of 3 points: *Sa_e*, *m*, *Sb_e*
* If a one of the original segments of the crossing intersects *Sa-m-Sb*, the sidewalk is described by a polyline made of 4 points: *Sa_e*, *Sa_i*, *Sb_i*, *Sb_e*

The inner part of the crossroad is computed by assembling all the sidewalks as a closed polyline (assembling each polyline at they extremity). From this region, we can apply a negative buffer to obtain the inner part of the road (with a white space between sidewalks and inner part of the road).

Each traffic island is available as a polygon from crossroads-description. We compute its compactness and size. A description is produced depending on these parameters:

* if the traffic island is large, the rendering is done as if it was bordered by sidewalks
* if the traffic island is small:
  * if the shape is compact, we describe it by a disc
  * if the shape is not compact, we describe it by two half discs connected by lines (a long shape)
  
Each pedestrian crossing is described by a dedicated pictogram, aligned with the corresponding edge from the initial data


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jmtrivial/crossroads-schematization/",
    "name": "crossroads-schematization",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jean-Marie Favreau",
    "author_email": "j-marie.favreau@uca.fr",
    "download_url": "https://files.pythonhosted.org/packages/59/e7/a00b00abe82ccdec7d8f5b29fae15691db2a57b2a60cd9be535a6c78179c/crossroads-schematization-0.3.2.tar.gz",
    "platform": null,
    "description": "# Crossroads schematization\n\nGenerate a schematization of an intersection from OpenStreetMap data.\n\n## Installation\n\nWith pip, use the following command line to install crschem:\n\n* ```pip install crossroads-schematization```\n\nDependancies:\n\nCrossroads schematization depends on ```crmodel```, that implies the following cascading dependancies:\n\n* [crossroadsdescriber](https://github.com/jeremyk6/crmodel/)\n* [crossroads-segmentation](https://github.com/jmtrivial/crossroads-segmentation)\n* OSMnx\n* NetworkX, geopandas\n\n\n## Usage\n\nIf you installed crossroads-schematization using pip, a console script is now available using ```get_crossroad_schematization```.\nThis script is also available in the examples folder (```PYTHONPATH=$PWD examples/get-crossroad-schematization.py```). You will find a complete description of the parameters using ```--help```.\n\n## Pipeline\n\nFirst compute for each branch two long edges *S1* and *S2* corresponding to the sidewalks:\n\n* for each edge part of a branch, identify the corresponding polyline (continue a couple of 10 meters outside of the crossing)\n* fit a long edge *E* on this polyline, starting from the beginning of the polyline (e.g. 50 meters for example), and with a fixed length in the exterior direction)\n* estimate the width of the way (using the number of lanes, the classification of the way)\n* reconstruct a linear description of the sidewalk by shifting *E* \n* if the branch is composed of more than one way, identify the two adjacent sidewalks and make them parallel\n\nEach sidewalk is part of two branches (see crossroads-description by J\u00e9r\u00e9my Kalsron), thus is described by two long edges *[Sa_i, Sa_e]* and *[Sa_i, Sa_e]* (*e* for exterior, *i* for interior).\n\n* we compute the intersection $m$ between *Sa* and *Sb*, and build a new representation with a polyline made of 3 points: *Sa_e*, *m*, *Sb_e*\n* If a one of the original segments of the crossing intersects *Sa-m-Sb*, the sidewalk is described by a polyline made of 4 points: *Sa_e*, *Sa_i*, *Sb_i*, *Sb_e*\n\nThe inner part of the crossroad is computed by assembling all the sidewalks as a closed polyline (assembling each polyline at they extremity). From this region, we can apply a negative buffer to obtain the inner part of the road (with a white space between sidewalks and inner part of the road).\n\nEach traffic island is available as a polygon from crossroads-description. We compute its compactness and size. A description is produced depending on these parameters:\n\n* if the traffic island is large, the rendering is done as if it was bordered by sidewalks\n* if the traffic island is small:\n  * if the shape is compact, we describe it by a disc\n  * if the shape is not compact, we describe it by two half discs connected by lines (a long shape)\n  \nEach pedestrian crossing is described by a dedicated pictogram, aligned with the corresponding edge from the initial data\n\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0",
    "summary": "Crossroads schematization is a python tool that produces automatic schematization of intersections from OpenStreetMap.",
    "version": "0.3.2",
    "project_urls": {
        "Homepage": "https://github.com/jmtrivial/crossroads-schematization/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59e7a00b00abe82ccdec7d8f5b29fae15691db2a57b2a60cd9be535a6c78179c",
                "md5": "bcb312b66e358d5a9733c2b842bba528",
                "sha256": "95dc3d9624f2fa00c64b6c7865f16298d2d55a511ee98133813c7ed9b40694f0"
            },
            "downloads": -1,
            "filename": "crossroads-schematization-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bcb312b66e358d5a9733c2b842bba528",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 90716,
            "upload_time": "2023-07-20T11:10:12",
            "upload_time_iso_8601": "2023-07-20T11:10:12.023602Z",
            "url": "https://files.pythonhosted.org/packages/59/e7/a00b00abe82ccdec7d8f5b29fae15691db2a57b2a60cd9be535a6c78179c/crossroads-schematization-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-20 11:10:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jmtrivial",
    "github_project": "crossroads-schematization",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "crossroads-schematization"
}
        
Elapsed time: 0.09322s