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

sorry… would you mind storing your KML file in a place that doesn’t require a (Google) login to access? or even if you loaded it as a feature available to see in ArcGIS Online, that might provide an alternative look at the boundaries of your feature.

Here’s a copy of my test file, which was produced using google maps

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
	<name>Untitled layer</name>
	<StyleMap id="poly-000000-1200-77-nodesc">
		<Pair>
			<key>normal</key>
			<styleUrl>#poly-000000-1200-77-nodesc-normal</styleUrl>
		</Pair>
		<Pair>
			<key>highlight</key>
			<styleUrl>#poly-000000-1200-77-nodesc-highlight</styleUrl>
		</Pair>
	</StyleMap>
	<Style id="poly-000000-1200-77-nodesc-normal">
		<BalloonStyle>
			<text><![CDATA[<h3>$[name]</h3>]]></text>
		</BalloonStyle>
		<LineStyle>
			<color>ff000000</color>
			<width>1.2</width>
		</LineStyle>
		<PolyStyle>
			<color>4d000000</color>
		</PolyStyle>
	</Style>
	<Style id="poly-000000-1200-77-nodesc-highlight">175.
		<BalloonStyle>
			<text><![CDATA[<h3>$[name]</h3>]]></text>
		</BalloonStyle>
		<LineStyle>
			<color>ff000000</color>
			<width>1.8</width>
		</LineStyle>
		<PolyStyle>
			<color>4d000000</color>
		</PolyStyle>
	</Style>
	<Placemark>
		<name>SMM Boundary</name>
		<styleUrl>#poly-000000-1200-77-nodesc</styleUrl>
		<Polygon>
			<outerBoundaryIs>
				<LinearRing>
					<tessellate>1</tessellate>
					<coordinates>
						175.5407316,-38.0080691,0 175.5330511,-38.0149669,0 175.5282003,-38.0201059,0 175.5269987,-38.027273,0 175.5299169,-38.0370082,0 175.5378134,-38.041605,0 175.5391867,-38.0440384,0 175.549143,-38.0462014,0 175.5517179,-38.0551231,0 175.5649359,-38.0564748,0 175.5803854,-38.0594484,0 175.5953199,-38.0490403,0 175.6102545,-38.0422809,0 175.6109411,-38.0332224,0 175.614031,-38.0214583,0 175.6052763,-38.0129382,0 175.5973799,-38.0017118,0 175.5863935,-38.0052287,0 175.5809004,-37.9987359,0 175.5577261,-37.9967067,0 175.5525762,-37.9981948,0 175.5438215,-38.0031997,0 175.5407316,-38.0080691,0 
					</coordinates>
				</LinearRing>
			</outerBoundaryIs>
		</Polygon>
	</Placemark>
</Document>
</kml>
1 Like

hmmm… i don’t see anything obviously wrong nor do i have any problems loading this test kml file:

are you still getting the -180 deg error when loading that test file?

EDIT: hold on… i think i see what the issue is. you’ve already got a place set up for the Sanctuary Mountain (https://www.inaturalist.org/places/155094). it probably has boundaries defined by points with long <-180 deg due to it being drawn in the iNat polygon editor when going across the antimeridian (panning left on the map). as a result, it probably also has a representative point with long that is <-180. so even if you load a new kml that is valid, it’s the existing representative point that is probably causing issues. the solution is probably to manually input 0,0 as your representative point, then load the new kml. that should allow your kml to be loaded, and then the load process should automatically generate a new representative point.

1 Like

Thanks for that … It has now worked, but with a tweak …

  1. I went back into the Sanctuary Mountain Project, and deleted the link to the place file
  2. I went into the Place menu, and deleted the original place.
  3. I used the test KML file, and reloaded … bingo … loaded perfectly. I still don’t understand quite what is happening here. But now we have a place.
    so 4. Went back into the SM project and relinked to the place. So, good oh, all the observations should now get correctly collated.
    Thanks for your help,
    Much appreciated, do visit sometime, Maungatautari is pretty special
1 Like

Thanks for sleuthing this @pisum. I was able to consistently replicate this by zooming on the NZ on the left-hand side of the map, but not on the right-hand side. I filed a bug report here: https://github.com/inaturalist/inaturalist/issues/2755

2 Likes

Great to now know a workaround, thanks @tiwane!

just FYI – there’s a second related Github issue: https://github.com/inaturalist/inaturalist/issues/2861.

1 Like