From 48be6a7923f66b21b4b3ff65020e541816b742ba Mon Sep 17 00:00:00 2001 From: Tykayn Date: Sat, 5 Aug 2023 22:57:22 +0200 Subject: [PATCH] up --- mapping_geojson_to_osm_tags/chargemap.ts | 8 ++++++-- .../osm_output/hurepoix_chargemap.osm | 5 +---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mapping_geojson_to_osm_tags/chargemap.ts b/mapping_geojson_to_osm_tags/chargemap.ts index 6f5d8b41..dd52db85 100644 --- a/mapping_geojson_to_osm_tags/chargemap.ts +++ b/mapping_geojson_to_osm_tags/chargemap.ts @@ -22,23 +22,27 @@ function convertChargemapFile(sourceFilePath: string) { let new_point: any = {...base_point} - if (item.type === 'point') { + if (item.type == 'point') { new_point.geometry.coordinates = [ item.properties?.lat, item.properties?.lng, ] - } else if (item.type === 'pool' && item.pool) { + } else if (item.type == 'pool' ) { new_point.geometry.coordinates = [ item.pool.gps_coordinates.lon, item.pool.gps_coordinates.lat, ] + console.log('new_point.geometry.coordinates', new_point.geometry.coordinates) } base_dataset.features.push(new_point) }) + + + console.log('base_dataset.features.length', base_dataset.features.length) if(base_dataset){ writeFile('hurepoix_geojson.json', JSON.stringify(base_dataset, null, 2)) diff --git a/mapping_geojson_to_osm_tags/osm_output/hurepoix_chargemap.osm b/mapping_geojson_to_osm_tags/osm_output/hurepoix_chargemap.osm index 68451cd2..6fb57192 100644 --- a/mapping_geojson_to_osm_tags/osm_output/hurepoix_chargemap.osm +++ b/mapping_geojson_to_osm_tags/osm_output/hurepoix_chargemap.osm @@ -1,4 +1 @@ - - - - \ No newline at end of file + \ No newline at end of file