Conversation
|
Test are missing |
index.js
Outdated
| parseFloat(steckbrief.longitude), | ||
| parseFloat(steckbrief.latitude) |
There was a problem hiding this comment.
I would suggest parsing and validating (for NaN for example) these before pushing into the geojson result.
Also I would vouch for not using parseFloat. The MDN page for parseFloat says one should use Number() instead
There was a problem hiding this comment.
What would you suggest if longitude or latitude is NaN? Throwing an error and rejecting? Or just returning some defaults?
There was a problem hiding this comment.
Just looked this up in the GeoJSON spec which says:
A Feature object has a member with the name "geometry". The value
of the geometry member SHALL be either a Geometry object as
defined above or, in the case that the Feature is unlocated, a JSON null value.
so setting the geometry to null would be according to the spec. The unparseable coordinate would appear in the properties anyway, right?
No description provided.