Convert Generate Service Areas service reponse (saPolygons) to Feature Layer polygons

131
0
05-08-2024 04:50 AM
Labels (1)
gis_bCapell
New Contributor III

I have ran 15 locations through the generate service areas service:

service = r"https://route.arcgis.com/arcgis/rest/services/World/ServiceAreas/NAServer/ServiceArea_World/solveServiceArea"

 and received the response containg the json features (geometry and attribute) (below trimmed to mee character limit). 

Now I need to know how to convert this into feature layer geometry. 

Thanks!

```{'fieldAliases': {'ObjectID': 'ObjectID', 'FacilityID': 'FacilityID', 'Name': 'Name', 'FromBreak': 'FromBreak', 'ToBreak': 'ToBreak', 'Shape_Length': 'Shape_Length', 'Shape_Area': 'Shape_Area'}, 'geometryType': 'esriGeometryPolygon', 'spatialReference': {'wkid': 102005, 'latestWkid': 102005}, 'fields': [{'name': 'ObjectID', 'type': 'esriFieldTypeOID', 'alias': 'ObjectID'}, {'name': 'FacilityID', 'type': 'esriFieldTypeInteger', 'alias': 'FacilityID'}, {'name': 'Name', 'type': 'esriFieldTypeString', 'alias': 'Name', 'length': 1024}, {'name': 'FromBreak', 'type': 'esriFieldTypeDouble', 'alias': 'FromBreak'}, {'name': 'ToBreak', 'type': 'esriFieldTypeDouble', 'alias': 'ToBreak'}, {'name': 'Shape_Length', 'type': 'esriFieldTypeDouble', 'alias': 'Shape_Length'}, {'name': 'Shape_Area', 'type': 'esriFieldTypeDouble', 'alias': 'Shape_Area'}], 'features': [{'attributes': {'ObjectID': 1, 'FacilityID': 1, 'Name': 'Location 1 : 0 - 240', 'FromBreak': 0, 'ToBreak': 240, 'Shape_Length': 5173660.831583397, 'Shape_Area': 328481308575.9043}, 'geometry': {'rings': [[[-1312332.5557999983, 752296.6974999998], [-1312178.6213000007, 752203.3154000007], [-1312143.7613000013, 752203.6569999997], [-1311104.2335, 751324.2951999996], [-1308812.5579999983, 749435.8509]]]} ```

Tags (1)
0 Kudos
0 Replies