geo icon indicating copy to clipboard operation
geo copied to clipboard

GeoJSON coordinates are not check nor converted to a numeric value

Open LostKobrakai opened this issue 3 years ago • 0 comments

When creating a new integration a co-worker of mine sent coordinates as strings in the GeoJSON format. The spec is not really clear in defining the concrete JSON type required, but calling it decimal type.

A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.

I'd expect geo to either parse string values to float (or Decimal) or fail to decode if the coordinates are strings. The first option is likely more correct.

LostKobrakai avatar Sep 28 '22 15:09 LostKobrakai