I am trying to get weather data for places I am looking up with the 'geocode' and 'reverseGeocode' operations. I notice that they return IPoint objects, rather than latitude/longitude. Is there a way to convert an IPoint to an ILocation? The weather APIs I'm using need lat/long rather than x/y. Apologies if this is a dumb question I'm new to the APIs and not familiar with the coordinate systems!
Solved! Go to Solution.
Hi, if you're using the geocode function, the default is to return the X and Y in the WGS84 spatial reference (SRID: 4326), which is essentially lat/long. The X will be the longitude and the Y will be the latitude. You can also pass in a different spatial reference for it to return and it will return the X/Y in that spatial reference. But you should not need to do that since you want lat/long and that is the default.
Here is a tutorial that may help: https://developers.arcgis.com/arcgis-rest-js/geocode-and-search/search-for-an-address/
Hi, if you're using the geocode function, the default is to return the X and Y in the WGS84 spatial reference (SRID: 4326), which is essentially lat/long. The X will be the longitude and the Y will be the latitude. You can also pass in a different spatial reference for it to return and it will return the X/Y in that spatial reference. But you should not need to do that since you want lat/long and that is the default.
Here is a tutorial that may help: https://developers.arcgis.com/arcgis-rest-js/geocode-and-search/search-for-an-address/