is it possible to get the location of a point feature as an attribute? I want to use the custom url scheme of Survey123 to prepopulate my Survey with attributes from Collector. I couldn't find a way to do so for the location.
Thanks in advance
If you are using Collector to "collect" new points, you could set-up your feature layer to capture GPS metadata fields which include latitude and longitude fields. For an existing feature, you could use the REST API to populate latitude and longitude fields from the point's geometry. Are you using AGOL or server/portal?
I use an acgis server. I don't get get the way the provided link helps me to get the data in my attribute fields.
If you have the fields in your feature to collect the GPS metadata (for example, the ESRIGNSS_LATITUDE and
ESRIGNSS_LONGITUDE fields), Collector will pull this data from your internal/external GPS receiver. You can configure these fields to be displayed in Collector's pop-up, and you might be able use these fields to construct your link for Survey123. This would be an option for new points that you are adding to your feature.
For existing data, you would need to extract the latitude/longitude from the geometry using a tool like Add Geometry Attributes. You can also do this using a python script with "projectAs" (see example script in this thread).
I have been experimenting with Collector and GPS metadata and have used the latitude/longitude fields to create a hyperlink to another ESRI app called Trek2There. The link looks like:
If you "Collect Here" instead of collecting at the GPS location, the latitude/longitude metadata will be missing because the fix is invalid. In these situations, I have been able to update the latitude/longitude fields. So, you should be able to hyperlink from Collector to Survey123.
Ah, I see my error. I named the attributes correct but I did collect the points via map. The location attributes don't seem to populate if you use the map to set the point manually.
If I use the GPS to get my coordinate everything works fine. Is there a way to get the field also populated when I set the coordinate via map?
Next thing is the fact that the values get saved with a semicolon 48,090765. Probably because I am in Europe. The Survey123 app seperates the input coordinates with a comma and wants to look the coordinate like this 48.090765.
I got an idea to bypass this problem abd will update if I did sucessfully.
In your case, since you are using Server, you might be able to use the Add Geometry tool to populate latitude and longitude fields named POINT_X and POINT_Y. If you are not "collecting" features, but working with an existing set of point features, this is the method I would suggest.
In my testing, I was using AGOL. I would query the geometry of each point and use ".projectAs" to obtain the latitude and longitude and then update the appropriate fields. A python script would automate this process and use the REST API.