Select to view content in your preferred language

`features.manage_data.overlay_layers` does not update my Service Feature Layer

216
0
07-16-2024 01:10 PM
BabakJfard
Occasional Contributor

Hello,

I have created a jupyter notebook in my ArcGIS Online to update my temperature feature layer daily. The code reads the source map from the Living Atlas and reads the boundary from a feature layer in my account. It also opens the target feature service layer from my account.

It then uses `features.manage_data.overlay_layers()` to cut the source layer into my boundary. I have set it so that it will overwrite the result into the target feature. It seems to be working fine, without any error or warning message, but my target feature service layer does not get updated. What is missing here? Thank you very much for your help

 

from arcgis.gis import GIS
gis = GIS("home")

# Title: National Weather Service 3-Day Min/Max Temperature Forecast | Type: Feature Service | Owner: esri_livefeeds2
source_layer = gis.content.get("0ae7cf18df0a4b4d9e7eea665f00500d")

# Title: Nebraska_Map | Type: Feature Service | Owner: babak.jfard_Unmc
boundary = gis.content.get("c0c8f91b03bb4df785d2ff813ccb0518")

# Title: Nebraska Maximum Daily Tmperature | Type: Feature Service | Owner: babak.jfard_Unmc
Feature_service = gis.content.get("10abdf7871414730a386d42dae2866a3")

from arcgis import features

features.manage_data.overlay_layers(source_layer, boundary, overlay_type='Intersect',
                                   output_name = Feature_service, context = {"overwrite": True})

 

Output:

```

{"cost": 4.24}
Out[16]:
<FeatureCollection>

```

0 Kudos
0 Replies