feat: fixes after testing with noisier data (#2)

* print a warning to console when invalid coordinates are present in dataset.
* rename cli to __main__ to allow calling as a python module
* move data validation to `io` module
This commit is contained in:
Miguel Sozinho Ramalho
2022-06-30 12:13:02 +01:00
committed by Felix Spöttel
parent 50f8a872e6
commit 729c2e49bf
4 changed files with 36 additions and 4 deletions

View File

@@ -64,8 +64,8 @@ class GeoJSONEncoder:
"cluster_id": cluster_id,
}
lon = props.pop("lon")
lat = props.pop("lat")
lon = float(props.pop("lon"))
lat = float(props.pop("lat"))
point = geojson.Point((lon, lat))
self.state.append(geojson.Feature(geometry=point, properties=props))