Mapping X,Y to Lat Long

Hi All,

I’m trying to assign inverts to created pipes based on surface levels.

I’ve started by using a bounding box to pick up pipe start and end points and then get the x and y points. I then try to Map.XYtoLatLong and use Location.ByLatitudeAndLongitude to get the location to feed into Pipe.setinvertatlocation . However I get the warning:

“Warning: Location.ByLatitudeAndLongitude expects argument type(s) (double, double, string), but was called with (Function, Function, string).”

Does anyone know what I’m doing wrong?

The Map.XYToLatLon node needs a document input.

Thanks for picking this up. the current document is now referenced and the error appears

Warning: “Map.XYToLatLong operation failed.
The coordinate system conversion failed.
A point, a portion of a line segment or a portion of the region, is outside of the mathematical domain of the coordinate system.”

Sounds like the numbers are too big. Run a quick sanity check with a List.MaximumItem node to see if you have a crazy number that’s on Mars somewhere. Also confirm that everything is a valid number.