uWaterloo / OpenData

Help and Support for University of Waterloo Open Data Initiative
https://api.uwaterloo.ca
90 stars 12 forks source link

Latitudes and Longitudes are flipped in Locations/geojson endpoint #207

Closed jmccarth closed 4 years ago

jmccarth commented 4 years ago

The /v3/Locations/geojson endpoint returns geojson with the x and y coordinates in the wrong order as part of the geometry definition.

{"type":"Feature","properties":{"buildingId":"57","buildingCode":"EV3","parentBuildingCode":null,"buildingName":"Environment 3","alternateBuildingNames":null,"latitude":43.468159,"longitude":-80.543376},"geometry":{"type":"Point","coordinates":[43.468159,-80.543376]}}

GeoJSON expects the coordinates to be in x, y order (which is longitude, latitude), but the returned value is in y, x order (latitude, longitude).

This results in the locations appearing like this (using geojson.io as an example): image

sbobkin commented 4 years ago

@jmccarth I believe this is resolved now; can you confirm please?

jmccarth commented 4 years ago

@sbobkin Yep, that did the trick. Looks good now. Thanks.

sbobkin commented 4 years ago

Good to hear @jmccarth let me know if you find any other issues while you make the transition.