gis:project-lat-lon
gis:project-lat-lon latitude longitude
Report the position, in NetLogo space, of the given latitude and longitude pair according to the current map projection and transformation.
Like the location-of primitive, the reported xcor and ycor
values are reported in a two-item list of [xcor ycor]
and an empty list if the specified point is outside of
the bounds of the netlogo world.
For instance:
let location-of-abbey-road-studios gis:project-lat-lon 51.5320787 -0.1802646
let abbey-road-xcor item 0 location-of-abbey-road-studios
let abbey-road-ycor item 1 location-of-abbey-road-studiosNote that this primitive assumes that the given lat/lon pair
are relative to the WGS84 datum/ellipsoid. If your
data is based on GPS observations or GeoJson files, then your
data is already relative to WGS84. If you are unsure about
what datum your data is, then you should probably just assume
it is WGS84 and use this primitive. However, if you do know
that your data is relative to a different datum and that
extra degree of precision is important to you (if you are,
say, comparing values from location-of and project-lat-lon)
then you should use project-lat-lon-from-ellipsoid and
specify the desired datum’s ellipsoid.