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!
<!-- Left out some data to keep it short -->
<Placemark>
<name>PLACEHOLDER_NAME</name>
<visibility>1</visibility>
<address>PLACEHOLDER_ADDRESS</address>
<description><span><b>2</b> connectors with 22kW and Type 2 connector<span><br/><span><b>2</b> available connectors<span><br/><span><b>0</b> occupied connectors<span><br/></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 -->
{
"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
]
}
}
]
}
> 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