Giter VIP home page Giter VIP logo

chargingstations2geojson's Introduction

ChargingStations2GeoJson

Converts the Dataset of public EV charging stations in Luxembourg into a format (GeoJSON) that is more suited for importing in OpenStreetMap. This Dataset is provided by Chargy.lu and published under the Creative Commons Zero License on the Luxembourgish Data Platform.

The import process is documented on the OpenStreetMap Wiki Page.

⭐ This project has been featured as a best-practice re-use in the Luxembourg Factsheet published in the 2018 European Open Data Maturity Report!

Tagging Scheme

Input:

<!-- Left out some data to keep it short -->
<Placemark>
    <name>PLACEHOLDER_NAME</name>
    <visibility>1</visibility>
    <address>PLACEHOLDER_ADDRESS</address>
    <description>&lt;span&gt;&lt;b&gt;2&lt;/b&gt; connectors with 22kW and Type 2 connector&lt;span&gt;&lt;br/&gt;&lt;span&gt;&lt;b&gt;2&lt;/b&gt; available connectors&lt;span&gt;&lt;br/&gt;&lt;span&gt;&lt;b&gt;0&lt;/b&gt; occupied connectors&lt;span&gt;&lt;br/&gt;</description>
    <styleUrl>#AVAILABLE</styleUrl>
    <ExtendedData>
        <Data name="CPnum">
            <displayName>Number of chargingpoints</displayName>
            <value>2</value>
        </Data>
        <Data name="chargingdevice">
            <displayName>Charging device</displayName>
            <value>{"name":"PLACEHOLDER_ID","numberOfConnectors":2,"chargingPointList":[{"id":51566,"maxchspeed":22.0,"connector":1,"description":"AVAILABLE"},{"id":51603,"maxchspeed":22.0,"connector":2,"description":"AVAILABLE"}]}</value>
        </Data>
    </ExtendedData>
    <Point>
        <altitudeMode>clampToGround</altitudeMode>
        <coordinates>123,456</coordinates>
    </Point>
</Placemark>
<!-- Left out some data to keep it short -->

Output:

{
   "type":"FeatureCollection",
   "features":[
      {
         "type":"Feature",
         "properties":{
            "operator":"Chargy",
            "amenity":"charging_station",
            "name":"PLACEHOLDER_NAME",
            "brand":"Chargy",
            "opening_hours":"24/7",
            "car":"yes",
            "phone":"PLACEHOLDER_PHONE",
            "authentication:membership_card":"yes",
            "devices":1,
            "socket:type2:output":"22kW",
            "socket:type2":2,
            "capacity":2
         },
         "geometry":{
            "type":"Point",
            "coordinates":[
               123,
               456
            ]
         }
      }
   ]
}

Usage

Preparing the data

> python3 ChargingStations2GeoJson.py --help

usage: ChargingStations2GeoJson.py [-h] [-o [OUTFILE]] [-v] [-s] [INFILE]

Convert the Chargy KML Dataset into GeoJSON Points

positional arguments:
  INFILE                KML File from Chargy. If unset, the most recent file
                        will be pulled from the OpenData Portal

optional arguments:
  -h, --help            show this help message and exit
  -o [OUTFILE], --outfile [OUTFILE]
                        Overrides the default filename for the exported
                        GeoJSON file
  -v, --verbose         Overrides the default LogLevel
  -s, --strict          Enables strict mode. Halt execution if any unexpected
                        value is found.

> python3 ChargingStations2GeoJson.py

chargingstations2geojson's People

Contributors

davidmoraisferreira avatar dependabot-preview[bot] avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

erros2107

chargingstations2geojson's Issues

Export to OSM XML

Currently only GeoJSON Export is supported.
It would be neat if the data could be exported as OSM XML.

A flag could be used to choose what format to export.

Set operational_status

Figure out what the field description describes, and what exactly the meaning of OFFLINE is.

Filter out existing charging stations

Currently all charging stations from the dataset are exported into the output file.
It would be nice to be able to filter out nodes that already exist in OSM and didn't change from the previous import.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.