North America standard place (place_id=97394) has a strange definition, according to API

I’m not sure if there are any actual problems here, but the place definition returned by the API for the North America standard place (https://api.inaturalist.org/v1/places/97394) looks strange in several ways. Are these intentional?

#1

Below is a screenshot showing what the boundaries of the place look like. Most of it looks fine, but there are a couple of odd spots:

  • (A) On the left, in the middle of the Pacific Ocean, there’s Wake Island. I couldn’t locate any definitive sources that say if Wake Island should go in North America or Oceania, but it just seems like it would make sense for it to fall in Oceania since that’s where everything else in the whole region falls.
  • (B) On the right, east of Greenland, there’s a spot in the middle of the ocean which doesn’t seem to correspond any land that I can find on any map

#2

Here’s the bounding box returned from /v1/places/{id}:

"bounding_box_geojson": {
  "coordinates": [[
    [ 0.0132, 5.4508 ],
    [ 0.0132, 83.7083 ],
    [ -0.0033, 83.7083 ],
    [ -0.0033, 5.4508 ],
    [ 0.0132, 5.4508 ]
  ]],
  "type": "Polygon"
},

This definition looks quite odd. It could be interpreted as a very thin and tall rectangle sort of spanning a small area around part of the prime meridian, like so (in red):

… or it could be interpreted as a band going across most of the northern hemisphere excluding a small gap at the prime meridian, like so (in purple):

Neither of these looks like the kind of bounding box a human might draw around the continent. So i wonder if this is incorrect? Or is this just the way bounding boxes are defined when the continent spans the antimeridian (or something like that)?

#3

Here’s the bounding box area returned from /v1/places/{id}:

"bbox_area": 28171.40875125,

Based on https://forum.inaturalist.org/t/bbox-area-calculation-doesnt-use-the-correct-formula-for-square-degrees/23235, I think the bounding box area is supposed to be measured in square degrees.

Given that there are ~41253 sq deg in a sphere, a bounding box area of ~28171 sq deg (~68% of the surface of a sphere) doesn’t seem to correspond with either of the bounding box possibilities from #2.

EDIT: i re-read the other post that i referenced, and the area for the bounding box seems to simply be calculated currently as the lat degrees * the long degrees. so, assuming the purple box from #2 above is the “correct” interpretation of the bounding box, then 78.25 degrees lat * 360 degrees long = 28170, which matches the bounding box area returned by the API.

#4

Here’s the location (centroid?) of the place returned from /v1/places/{id}:

"location": "56.7732555574,-179.68825",

If I had been asked to draw a point in the middle of North America, I probably would have put it somewhere near the Canada/USA border, between Winnipeg and Fargo, or thereabouts. Instead, this point seems to be somewhere in the middle of the Bering Sea, north of the Aleutian Islands, which doesn’t seem to be a great representation of the location of North America.

1 Like

Since I’m not an admin, I can’t say for sure, but it looks like that tiny polygon in the North Atlantic/Arctic Ocean is driving the weird area and centroid. Though why the bounding box is spanning the whole globe around that tiny polygon is a mystery.

Geojson bounding box coordinates are given in this order: lower left, upper left, lower right, upper right, so your purple box is the box defined by the coordinates you listed. It’s weird that the first coordinate is repeated at the end. The centroid of the purple box is somewhere in the Bering Sea.

1 Like

yes, i also thought this might be the case, but i’m not certain. below is a picture that shows the bounding box / gap (in red) in relation to the (simplified) polygon as defined in the geojson in the /v1/places/{id} API response (in green) and the same polygon as returned as a /v1/places/{id}/{z}/{x}/{y}.png raster tile layer (in orange). it does look like the boundaries of the red do line up with a couple of the points in the orange (which i think would be an unsimplified polygon). so it’s possible there might be something about that original polygon that is defined strangely and could be causing problems… or it might be a coincidence.

yes. i think it’s strange. it might be just a minor thing that most people would never notice, but in a worst case, besides just making the metadata look weird, that strange bounding box might have impacts on geospatial indexes, which might not be a great thing, given how big that box seems to be.

i was hoping @loarie or others on the iNat team might eventually see this, and that it might lead them look at it a bit, if they haven’t already. it might be nothing, but…

3 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.