Place "Longitude must be greater than or equal to -180" error

Hi Team,

I’ve tried the forum but I’ve been told this is a genuine bug. https://forum.inaturalist.org/t/place-longitude-must-be-greater-than-or-equal-to-180/8319/10

I have spent some time trying to map a place but I keep getting the “Longitude must be greater than or equal to -180” error. I’ve also tried uploading a KML from Google Earth and still received this error.

Please help.

Greg

Your longitude should be 153.0314064717 (positive number). I think that should fix it.

1 Like

Are you using a kml file? If you share it, we could take a look.

Thanks all. No KML file. I don’t know what that is. I’ve just drawn it.

Do you recommend KML?

@gregtasney I’m guessing the place you are trying to draw must cross the -180 longitude line (on or near where the International Date Line runs). Longitude values can only be between -180 and +180, and the system should handle this appropriately when drawing across that line, so this may be a bug.

KML is a spatial feature format that comes from Google Earth. If you have Google Earth Pro, I think you can draw your place polygon there, then export it as a KML file. You can then upload the KML to iNaturalist to attempt creating your place.

If this workaround is successful, then your issue when trying to draw it directly should probably be submitted as a bug report.

yup. i just tried to create a place in the iNat place page by drawing a box that encompasses the eastern Fiji Islands, which span the +/-180 deg line, and i got the same error.

that said, the place did seem to be created, although it looks funny in the place page (https://www.inaturalist.org/places/145745), and it seems to pick up only observations only on the side with the negative longitudes (https://www.inaturalist.org/observations?place_id=145745).

so i went back to the place page and downloaded the KML file from the system, opened it in a text editor:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
  
  <Document>
    <Placemark>
  <name>pisum place test Border</name>
  <styleUrl>https://www.inaturalist.org/assets/index.kml#place</styleUrl>
<MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates>-181.7742919921875,-15.88631935640978 -179.0771484375,-15.88631935640978 -179.088134765625,-17.323371664099753 -181.8402099609375,-17.260433005542946 -181.7742919921875,-15.88631935640978</coordinates></LinearRing></outerBoundaryIs></Polygon></MultiGeometry></Placemark>

  </Document>
</kml>

… and then fixed the bad longitudes (by adding 360 to longitudes less than -180):

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
  
  <Document>
    <Placemark>
  <name>pisum place test Border</name>
  <styleUrl>https://www.inaturalist.org/assets/index.kml#place</styleUrl>
<MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates>178.22570078125,-15.88631935640978 -179.0771484375,-15.88631935640978 -179.088134765625,-17.323371664099753 178.1597900390625,-17.260433005542946 178.2257080078125‬,-15.88631935640978</coordinates></LinearRing></outerBoundaryIs></Polygon></MultiGeometry></Placemark>

  </Document>
</kml>

after saving and reloading, the system didn’t like that either because it looks like it’s being interpreted as encompassing the whole rest of the world in between those lattitudes (which is wrong).

so i tried one more time by adding 360 to all longitudes, and i come back to the -180 error:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
  
  <Document>
    <Placemark>
  <name>pisum place test Border</name>
  <styleUrl>https://www.inaturalist.org/assets/index.kml#place</styleUrl>
<MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates>178.22570078125,-15.88631935640978 180.9228515625‬,-15.88631935640978 180.911865234375‬,-17.323371664099753 178.1597900390625,-17.260433005542946 178.2257080078125‬,-15.88631935640978</coordinates></LinearRing></outerBoundaryIs></Polygon></MultiGeometry></Placemark>

  </Document>
</kml>

so i agree that this is probably a bug.

i think the workaround for now is to either create 2 places or create a single multipolygon place where the first polygon stops at 180 and then other polygon picks up from there.

1 Like

Alright I tried the KML file from Google Earth and I got the same error. Far out. So frustrating. I better report it as a bug.

the title of your place in the bug report suggested that it might be entirely on the Australian mainland, which doesn’t span the antimeridian (180 deg long). but since you were still reporting that you were getting an error, i tried a couple of things. in the place page, the default map starts with the prime meridian (0 deg long) at in the middle, and the antimeridian at both the right and left sides of the map. this means that, roughly, the left side of the map includes the Americas, and the right side includes Europe, Africa, Asia, Australia.

  1. if i zoom in and to pan to the the right side of the existing map to draw a box around Brisbane (in Australia) as my place, that place is created just fine.
  2. if instead i pan to the left (thereby crossing the antimeridian and bringing Australia into view from the left side of the map) and zoom in to draw a box around Brisbane as my place, that place reports the -180 error.

so i guess this means that when you create a new place by drawing a polygon in the place page, you can’t pan across the antimeridian, even if your place doesn’t actually span the antimeridian. in other words, if you’re not spanning the antimeridian, and you’ve been doing method 2 above to create your place, try doing method 1 instead.

this still seems like a bug, but at least you should be able to easily work around it in this situation, i think.

1 Like

FWIW this has happened to me intermittently ever since I joined mid 2018, and last happened about a week ago.

I just start again unfortunately. No adjustment or re-entering of co-ords makes any difference.