Hello all,
I am looking for guidance and clarification re: accessing the GNSS metadata attachments collected with line and polygon features when using Field Maps.
After collecting features with GPS Metadata enabled using Field Maps, line and polygon features viewed in a web map have "_gnss_metadata.json" attachments with additional GPS metadata describing each of the feature vertices (essentially, all the same metadata that populates the attribute table of point features collected with the same configuration). I can click through to a web page with a "pretty print" option that displays the GNSS metadata JSON - but I cannot figure out where the JSON file actually is.
I would like to programmatically access these metadata files - e.g. using the API for Python if possible - for the purpose of creating point features in a new feature layer using some of the keys they contain (i.e. "esrignss_latitude", "esrignss_longitude", and "esrignss_altitude"), but I don't know where to access the attachments.
I searched the Feature Service and Web Map JSON Items of the relevant layers using ArcGIS Assistant, but did not see the metadata information stored there.
Any information re: where these metadata files live or how they can be programmatically accessed is greatly appreciated!
Additionally - what are the guidelines around cross-posting questions that may have overlap across communities? Can I copy this question over to the ArcGIS Online and API for Python communities?
I'm not sure if this is helpful or not but I added the GNSS metadata fields using the geoprocessing tool in Pro (you specify which feature class/layer to apply the metadata fields to). Then, in the contents pane, you can right click your hosted feature class/layer > choose data design > fields. This will allow to customize and/or rename, hide visibility, or edit any of the GNSS metadata fields. From there, you can open the map in Field Maps Designer and tighten up the attribute fields for streamlined collection workflows. After that, whatever is collected in Field Maps using the attributes will be reflected back in the attribute table of said hosted feature class/layer/s. It is a bit of a process, but works pretty well.
Thanks for your response @Debert ! I'll give this a shot, but do you know if it works for polygons and lines, or only points? I think I achieved the same outcome you outline here for including the metadata in point feature attributes, but I can't picture how it would work out for features with multiple vertices (there would need to be multiple attribute entries for each OID when features have multiple vertices).
You can use the ArcGIS API for Python to access the _gnss_metadata.json attachments via the AttachmentManager class in the arcgis.features.managers module.
For example, if you are interested in the gnss metadata for a single feature in your line or polygon layer, then determine the object ID of that feature and pass it to the download method. You will end up with a local copy of the JSON file which you can then parse to pull out the data of interest to you. Note that the json file will be stored locally under the specified "save_path" in a directory structure where the first level is the object ID and the second level is the attachment ID (e.g., <save_path>/1/1/_gnss_metadata.json.) You can also pass download a list of OIDs, if you want to download the _gnss_metadata.json file for a bunch of features at once, and they will be placed into the same directory structure under your save_path.
Thank you @PeterKnoop - I think this is what I'm looking for! I'll give it a try ASAP.