geometry.coordinates object has incompatible conflicting array types #272
Replies: 2 comments
-
Not a bug. This is fully conformant with the GeoJSON/RFC7946 standard for point and polygon geometry, respectively. |
Beta Was this translation helpful? Give feedback.
-
Understood, I will address my type-safe bewilderment with Internet Engineering Task Force (IETF). If I were to correct this issue by moving the object geometry to fully qualified name spaces for the endpoints ( multiple objects named geometry in different names spaces), can I assume that: https://api.weather.gov/stations/KNYC, will always return and https://api.weather.gov/gridpoints/HGX/64,92/forecast will always return Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The endpoint https://api.weather.gov/stations/KNYC has geometry.coordinates as a array[] where https://api.weather.gov/gridpoints/HGX/64,92/forecast has geometry.coordinates as a multidimensional array[,,]
even though its data is actually array[] nested in a multidimensional array [0,0,x]. What is the intent of the multidimensional data structure?
If the intent is to truly have multidimensional data its name should be different from coordinates that are [] and add polygon.coordinates[,,] instead of coordinates to prevent the collision and or name Point Coordinates as point.coordinates[] as these are interiorly different objects.
https://api.weather.gov/stations/KNYC
"geometry": {
"type": "Point",
"coordinates": [
-73.966669899999999,
40.783329999999999
]
https://api.weather.gov/gridpoints/HGX/64,92/forecast
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-95.380197499999994,
29.6908821
],
[
-95.380123999999995,
29.6681214
],
[
-95.353927299999995,
29.668182999999999
],
[
-95.353995699999999,
29.690943699999998
],
[
-95.380197499999994,
29.6908821
]
]
]
},
Beta Was this translation helpful? Give feedback.
All reactions