Open atiannicelli opened 6 days ago
It seems there is a problem with changesets that contain only a point and that the min and max values of the coordinates are the same.
In the Django shell the wkt returns ther correct value, but the geojson returns the inverted values:
>>> a.bbox.wkt
'POLYGON ((121.0590157 14.6120371, 121.0590157 14.6120371, 121.0590157 14.6120371, 121.0590157 14.6120371, 121.0590157 14.6120371))'
>>> a.bbox.geojson
'{ "type": "Polygon", "coordinates": [ [ [ 14.6120371, 121.0590157 ], [ 14.6120371, 121.0590157 ], [ 14.6120371, 121.0590157 ], [ 14.6120371, 121.0590157 ], [ 14.6120371, 121.0590157 ] ] ] }'
I believe that I saw this same issue with bboxes that were not just one point. Are you sure it is only with changesets with a single point? Maybe multiple points would give you the same result?
When I download changesets using the
changesets
api the geometry of changesets is not correct. It seems that the lat and lon have been swapped. If I use the singularchangeset
api it works fine.When I download all the changesets that have been created from 2024-06-10 to 2024-06-11 I get a large json file with all the changesets. Here is an example of the command I use to download the changesets. Note: This command is repeated with different pages until I get them all for the day:
Here is an example of a changeset that I see in the output json file
Notice the coordinates [[ [14.6120371,121.0590157], [14.6120371,121.0590157], [14.6120371,121.0590157], [14.6120371,121.0590157], [14.6120371,121.0590157] ]]
this would indicate that 14 is the longitude and 121 is latitude, but 121 is not a valid latitude as latitude goes from -90 to 90.
Now let's say that I request this specific changeset using the
changeset
API I get the following:This API response is correct and tells me that the min lat is 14 and min lon is 121.
I believe that the
changesets
api or the utilities that it uses to produce the GEOJson coordinates must have a bug and have the lat and lon reversed.