POST
|
I think your data will need to be slightly restructured for that. With just one layer and overlapping points I don't think there's a great way to show the information from all five simultaneously - if you had a building layer or processed the data to have a single point per location then intersecting that with the schools layer and pulling through the names would be doable.
... View more
3 weeks ago
|
0
|
0
|
80
|
POST
|
Hi, Just clarifying as it's not super clear to me from the interface - is there a relationship class linking the building to the schools? And this is what's showing when you click on the building and expand the related schools? If not, what interface is this?
... View more
3 weeks ago
|
0
|
1
|
141
|
POST
|
Hi Shayne, I think by default most geoprocessing tools add the result to the map automatically, but you should be able to prevent that by adding the following line at the top of your script: arcpy.env.addOutputsToMap = False which should stop those intermediary layers from being added in the first place. Hope this helps!
... View more
3 weeks ago
|
0
|
0
|
155
|
POST
|
Hi, Do you mean code that can look within group layers to pull out the layers within? If so, I've got a function that can handle those as well! Works for any number of levels of grouping. def unnestlayers(layer):
wmlayers = []
for lyr in layer.layers:
try:
if hasattr(lyr, "layers"):
wmlayers += unnestlayers(lyr)
else:
wmlayers.append(lyr)
except:
print("Something went wrong")
return wmlayers Then just input the webmap and it should spit out a list of the actual layers layers = unnestlayers(web_map)
... View more
05-21-2024
10:26 PM
|
1
|
1
|
342
|
POST
|
If that's not an option but you have the ability to use ArcGIS Notebooks I can also recommend following the setup here: https://www.esri.com/arcgis-blog/products/arcgis-online/administration/managing-arcgis-online-content-with-arcgis-dashboards-and-arcgis-notebooks/ which should do what you're after too (+ more)
... View more
07-28-2023
07:21 PM
|
0
|
0
|
1146
|
POST
|
Hi, Depending on your version of Portal, have you looked into item reports? They output item id's and urls for feature services, and it's a good way of getting an inventory without having to write any code. https://doc.arcgis.com/en/arcgis-online/reference/report-fields.htm Then in your experience builder app if you want to be able to open or view each of the items, you could basically concatenate the url for your portal with the itemid using Arcade, to allow you to view the relevant item page.
... View more
07-28-2023
03:42 PM
|
0
|
3
|
1165
|
POST
|
Hi Jonathan, Have you looked into joined hosted feature layer views in AGOL, detailed on this page? https://doc.arcgis.com/en/arcgis-online/manage-data/create-hosted-views.htm They work in the way you describe - the table would have to be in AGOL though.
... View more
07-27-2023
12:24 AM
|
0
|
0
|
424
|
POST
|
Hi Leslie, Field maps allows calculated expressions https://doc.arcgis.com/en/field-maps/android/help/configure-the-form.htm so if you had associated values for each school (things like district, size etc.) you could definitely configure it so that when a school is selected multiple other fields populate automatically. You'd essentially create a lookup table that had associated values for each school in each of the calculated fields, either using a "dictionary" or the Arcade "Decode" function https://doc.arcgis.com/en/field-maps/android/help/configure-the-form.htm . Depending on the number of schools this could be unwieldy to configure all of the matchings yourself, in which case you could store the lookup table values in table in ArcGIS Online and essentially query that table to find the associated values, if you're not planning on using Field Maps in online mode. Hope this helps! Kind regards, Josh
... View more
07-26-2023
02:00 AM
|
0
|
0
|
1669
|
POST
|
Ahh okay that makes sense! FeatureSetByRelationshipName will return a feature set, and in your above code you're not pulling out a record from it (which will only be 1 record), so wrapping the FeatureSetByRelationship in the First() function should fix that. That being said it isn't running on my machine, possibly due to me having an older version of ArcGIS Pro? Worth a go anyway. Also what back end process are you using to calculate the ProjectID on the parent table? It might be easier to include this process as a part of that to reduce the amount of manual work. A solid alternative is also using a Joined Hosted Feature Layer view to bring together all of the parent and child info into a flat table, which would mean you wouldn't have to calculate it into the table for the related record, depending on what you want to use it for.
... View more
06-29-2023
01:56 PM
|
0
|
0
|
572
|
POST
|
Hi Laila, Why are you wanting to field calculate the ID? Is it for when you're creating a new feature in the related table? Because if so you shouldn't have to be scripting that via arcade or Python, if you're creating the related record in Field Maps or via the "Add new to relationship" (https://pro.arcgis.com/en/pro-app/latest/help/editing/edit-feature-relationships.htm) in ArcGIS Pro it should be automatically populating the GUID field.
... View more
06-29-2023
01:24 AM
|
0
|
2
|
582
|
POST
|
Well I've learned two things today then! I didn't realise the "Save" method existed for feature sets in the ArcGIS API for Python, that seems very useful! Glad you've managed to find a solution 🙂
... View more
06-27-2023
10:36 PM
|
1
|
0
|
766
|
POST
|
Hi Lindsay, I didn't think that you could use a feature service as an input to the Export Table geoprocessing tool? In the documentation https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/export-table.htm it doesn't indicate that you can do that I have managed to do something similar by having the web service in a map in an arcgis pro project before, and accessing the layer via ArcPy.
... View more
06-27-2023
10:14 PM
|
1
|
0
|
779
|
POST
|
Hi, No worries, glad I could help so far! Presuming you are mainly dealing with ESRI Rest services, you should be able to query each layer in a "try" and "except" clause as a proxy for finding whether the web service for the layer is accessible or not. Fair warning: I haven't tried or tested this, but I think it would work in theory. for layer in layers:
try:
layer.query(return_count_only=True)
print("query successful")
except:
print("query unsuccessful") Probably printing the layer name and web map so you can find which ones aren't working. Note I'm using return_count_only=True as I think it will be faster as it doesn't have to return all the feature info. It'd be great to use "where="OBJECTID = 1" but It's not always a given that a feature service will have a feature with OID =1 if it's updated regularly.
... View more
06-25-2023
10:37 PM
|
0
|
0
|
1425
|
POST
|
Hi, A few comments! First of all, you don't need to use content.search when just accessing a single web map, do: webmap = gis.content.get(itemid) Although if you want to do it for all your maps you would do it like that: webmaps = gis.content.search(query="", item_type="Web Map", max_items=10000) And you don't need to use get_data to pull out the layers, as there are .layers and .basemap properties that store that info without having to pull it from the dictionary returned by get_data. I'd do something like this: for web_map in webmaps:
print(web_map.title)
for layer in web_map.layers:
print(layer.name)
print(web_map.basemap_title) If you want to extract all the layers in the basemap I think web_map.basemap returns these as a list that you can iterate over too. As for checking the loading status of the layer, do you mean whether the layer is broken or not?
... View more
06-17-2023
06:13 PM
|
1
|
2
|
1477
|
POST
|
Hi, I've just taken a look and from my end it's showing it as owned by ESRI, not the Western Confluence group, so it must just be a visual bug!
... View more
06-17-2023
05:46 PM
|
0
|
0
|
693
|
Title | Kudos | Posted |
---|---|---|
1 | 04-05-2023 11:09 PM | |
1 | 05-21-2024 10:26 PM | |
1 | 04-20-2023 12:05 AM | |
1 | 05-21-2023 10:47 PM | |
1 | 07-28-2020 10:24 AM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|