You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code in Point seems more complicated than necessary. It may be good to modify the constructor so that it's more clear how to structure data going into the class. For instance:
For context, this issue was originally reported against the 1.0.x branch. That code was heavily refactored in #33, which is now released as 1.1.0.
Changing the constructor signature to accept latitude and longitude separately would be a BC break and would also limit the ability to accept a third coordinate. Quoting the GeoJSON spec (RFC7946 3.1.1):
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.
Since Point is also used by various other constructors (all of which accept coordinate n-tuples), I don't think this is something we could feasible change.
The code in
Point
seems more complicated than necessary. It may be good to modify the constructor so that it's more clear how to structure data going into the class. For instance:The text was updated successfully, but these errors were encountered: