Hello,
I have found the following: https://www.arcgis.com/home/item.html?id=edc6d54479014a49941122acf1104cbe which suggests it could be used to get the distance to coast from a point. I would like to be able to give a lat / lng and it returns the distance. Is this doable with ArcGIS online?
Thanks
Hi charlie.grosvenor@bellandclements.com ,
When you add the layer to a web map in ArcGIS Online you can search for the lat lon location and click on the map to get the result:
You can also use the REST API, like this:
https://oceans2.arcgis.com/arcgis/rest/services/Distance_to_Coast/ImageServer/identify?geometry=%7B%22x%22%3A-75.569470%2C%22y%22%3A6.216607%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D&geometryType=esriGeometryPoint&mosaicRule=&renderingRule=&renderingRules=&pixelSize=&time=&returnGeometry=false&returnCatalogItems=false&f=html
This will return the result in the format you specify:
Thank you for the response. Have it working now. Do you know if its possible to get decimal values back. The API only seems to return whole numbers?
Hi bcgrosvenor ,
Is it a floating raster or integer?
I'm sorry, but yes the pixel type of the service is U16 (unsigned 16 bit integer, range 0 to 65535), so you will not obtain a decimal value.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.