On 2020-11-20 14:26, Holger Bruch wrote: > Erfreulicherweise haben Cambio und Stadtmobil Stuttgart reagiert. Cambio > gestattet die Nutzung ihrer Auskunfts-API, um Carsharing-Stationen in OSM zu > übernehmen, Mail siehe unten.
super, ich habe auch gleich eine Station gefunden die hier in Bielefeld noch nicht erfasst war. Schade beim Cambio-Api nur, dass zwar in der JSON-Antwort zu finden ist welche Fahrzeugarten an den jeweiligen Stationen zu finden sind, nicht aber die Anzahl. Aber irgendwas ist ja immer ;) PS: hier das quick&dirty PHP Script mit dem ich das Cambio-Format in OSM XML gewandelt habe um die Daten in JSOM laden zu können: <?php $in = json_decode(file_get_contents("stations.json"), true); $minlat = 90; $maxlat = -90; $minlon = 180; $maxlon = -180; $out = []; foreach($in as $station) { $lat = $station["geoposition"]["latitude"]; $lon = $station["geoposition"]["longitude"]; $minlat = min($minlat, $lat); $maxlat = max($maxlat, $lat); $minlon = min($minlon, $lon); $maxlon = max($maxlon, $lon); $out[] = ["lat" => $lat, "lon" => $lon, "name" => $station["name"]]; } $id = -1; echo "<?xml version='1.0' encoding='UTF-8'?>\n"; echo "<osm version='0.6' generator='cambio2osm.php'>\n"; echo " <bounds minlat='$minlat' minlon='$minlon' maxlat='$maxlat' maxlon='$maxlon'/>\n"; foreach ($out as $node) { echo " <node id='$id' lat='$node[lat]' lon='$node[lon]'>\n"; echo " <tag k='amenity' v='car_sharing'/>\n"; echo " <tag k='name' v='$node[name]'/>\n"; echo " </node>\n"; $id--; } echo "</osm>\n"; -- hartmut _______________________________________________ Talk-de mailing list Talk-de@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk-de