|
IDEA
|
I thought this was something we could do already - turns out I was wrong. Kudo added!
... View more
01-27-2025
09:59 PM
|
0
|
0
|
1204
|
|
POST
|
Thanks for sharing your experiences! The problem we are facing with the projections is not actually in ArcGIS Online (as you say, it all works nicely up there)....it's back in ArcGIS Pro. When we add a feature service to a map in Pro, if it uses a GDA94 projection, and the map also contains GDA2020 projections, the transformations get confused and Pro introduces shifts against some of the datasets. We've been agonising with this issue for a couple of years on and off. After reaching out on here (Solved: Clarification around Transformations in ArcGIS Pro - Esri Community), we finally got the answer back that GDA94 and GDA2020 do NOT play nicely together, and that all data in a map should be either in one of the other. Thus, we have decided to do a bulk republish and bring everything in ArcGIS Online back to the standard WGS84 Web Mercator auxillary sphere, which does play nicely with other projections.
... View more
01-13-2025
04:33 PM
|
0
|
0
|
3231
|
|
POST
|
Good questions. I've avoided even looking at trying this out because it wouldn't be worth it without being able to offer it to all our users. As a Professional or Professional+, my staple is Pro for map making. WebMap exports really is suited for Creators (and Mobile Workers) so makes sense to offer it to them. Interesting to see comments on the blog post asking the same questions have gone unanswered.
... View more
01-09-2025
05:55 PM
|
0
|
1
|
2383
|
|
POST
|
Hi All. I've just been made aware of an issue in one of our legacy Web AppBuilder maps in ArcGIS Online, and are looking for confirmation of others seeing the same behavior. We have custom basemaps that use Esri's World Imagery as well as a Vector Tile Package overlay made available as Basemaps in the Basemap Gallery widget. In WebMaps, Field Maps and Experience Builder apps, these basemaps show up correctly when selected. However, it seems that after a recent update to our Vector Tile Packages, they no longer show up in Web AppBuilder apps. The only reason we still run these apps is because we're (still) waiting on parity with the Batch Attribute Editor tools. I'm really really looking forward to getting rid of them, but until we get that function we can't.
... View more
01-09-2025
04:45 PM
|
1
|
2
|
2183
|
|
POST
|
Hi Brains trust. I've been experimenting and was hoping to get confirmation from those in-the-know. If have a Feature Service in ArcGIS Online which for example uses WGS 84 Web Mercator aux sphere (WKID 102100/3857) and (via Pro) you overwrite this with a new version that uses a different spatial reference (e.g. GDA94 (WKID 4283)), it appears that the spatial reference updates ok. HOWEVER, if that layer has hosted views, it doesn't appear that those update to reflect those changes (at least, not according to the JSON when viewed through the Service URL). In ArcGIS Pro, the layers both show up as using the updated spatial reference. Is this a problem? Is this something that can be done and the differences in the JSON ignored? Or is it (as I suspect) going to cause me headaches down the track?
... View more
01-08-2025
08:36 PM
|
1
|
4
|
2186
|
|
POST
|
Won't help directly with this case, but I do have other spots that could utilise something like this (models that update polygon areas across a whole layer for example after user edits in the web). Thanks for sharing.
... View more
01-08-2025
06:51 PM
|
0
|
0
|
3297
|
|
POST
|
I've been testing and preparing for a process of republishing nearly 100 feature services in our ArcGIS Online environment. The main aim is to update the coordinate systems of our feature services to use the standard WGS84 Web Mercator Auxiliary Sphere for all data hosted in ArcGIS Online. Currently, we have a number of projections in use, and as we prepare to migrate all our non-AGOL data to GDA2020, we want to ensure that we have nothing left that uses GDA94 to prevent shift issues occurring. After a recent migration in AGOL hosting from US to APAC servers, we lost a lot of editor tracking information. To prevent this happening again, I've been researching how to preserve the existing Creator and Editor information when publishing feature services as a V2 layer. I couldn't find any clear documentation on how to make this happen, but have now figured it out and will detail below for others in the future. Restrictions: 1. Currently, if you load an existing feature service into ArcGIS Pro, use the Export Features geoprocessing tool to save as a feature class, and then share the output as a new Web Layer, any Creator and Editor fields will be included with their original values but they will NOT be used for editor tracking. Once published, if you then enable editor tracking in AGOL on the new layer, it will create new fields for this purpose. On top of this, there is no way of manually updating values in editor tracking fields. Even if you turn Editor Tracking on a feature service off, then try to edit or calculate the field in ArcGIS Pro, it will fail. The values need to be there from the beginning. 2. Also, you can't simply Export Features and use the included CreationDate and EditDate fields as they are now automatically set as High Precision fields (as indicated by the *). The Enable Editor Tracking tool will only accept Low Precision date fields, and there is no way to downgrade a field or change it in the Field Map when using Export Features. Workaround: Below are the steps I took to publish a new feature service using existing data in an old feature service, preserving editor tracking information and working around the high precision field limitations. 1. Add old feature service to ArcGIS Pro 2. Use "Export Features" to create a copy of the data as a feature class in a File Geodatabase with the existing CreationDate and EditDate fields renamed (I've added a 1 to the end) and new CreationDate and EditDate fields created with no source field (set as Date type). 3. Use Calculate Field geoprocessing tool to calculate your empty CreationDate and EditDate fields from the renamed fields with original values. 4. Use "Enable Editor Tracking" geoprocessing tool to register existing fields for editor tracking 5. Delete original (renamed) CreationDate and EditDate fields. 6. Publish the layer by selecting "Share as Web Layer" from the sharing menu and ensure you check the "Enable editing and allow editors to:" option and the "Preserve editor tracking info" option. You may also need to customise your Timezone settings depending on what you selected in previous step. Now.....to figure out how to preserve the info when running the Append tool (not holding high hopes based on what I've already found elsewhere in the Community...)
... View more
01-07-2025
08:14 PM
|
4
|
5
|
3364
|
|
POST
|
Fair bit on the go there and not sure I got my head around exactly what you're looking for. Have a read of the below posts where I asked questions similar to yours whilst learning early on. It definitely is possible to look up feature attributes from other layers. You can do this using normal lookups, (e.g. by a linking value) or by searching within a distance (buffer) and getting intersecting features. Solved: Can I populate a popup with data from a different ... - Esri Community Help writing Arcade to get distinct values from intersection in Field Maps Also, if you're wanting to update a feature in Field Maps after completing a Survey in S123, then callbacks may be what you're looking for (though depends on how you're launching your survey): Solved: Help with Survey123 link from Field Maps with call... - Esri Community Below is an example popup in one of my maps that when clicking on an Local Government boundary searches (intersects) with a Plantation layer and returns values and statistics. This is what you see in the popup designer: and a sample of the arcade coding used in the Plantation species summary: //Requires that the FPC Plantations layer is also present in the map or lookups won't work
// Return LGA name and format nicely
var LGAname = proper(Split($feature.name, ", ")[1] + " " + Split($feature.name, ",")[0])
// Access the Plantations feature set, limiting to required fields only
var PlantationsFS = FeatureSetByName($map, "FPC Plantations",['Plantation', 'Map_Symbol', 'AreaHa'], False)
var SoftwoodFS = Filter(PlantationsFS, "Map_Symbol = 'Softwood'")
var HardwoodFS = Filter(PlantationsFS, "Map_Symbol = 'Hardwood'")
var SandalwoodFS = Filter(PlantationsFS, "Map_Symbol = 'Sandalwood'")
var OtherFS = Filter(PlantationsFS, "Map_Symbol = 'Other Species'")
var FallowFS = Filter(PlantationsFS, "Map_Symbol = 'Fallow'")
// Intersect the Plantations with selected LGA feature
var Ptns_fs = Intersects(PlantationsFS, $feature)
var Softwood_fs = Intersects(SoftwoodFS, $feature)
var Hardwood_fs = Intersects(HardwoodFS, $feature)
var Sandalwood_fs = Intersects(SandalwoodFS, $feature)
var Other_fs = Intersects(OtherFS, $feature)
var Fallow_fs = Intersects(FallowFS, $feature)
// Count the Plantations
var PlantationsCount = Count(Distinct(Ptns_fs, "Plantation")) //returned in popup
var SoftwoodCount = Count(Distinct(Softwood_fs, "Plantation")) //used in calulating areas only
var HardwoodCount = Count(Distinct(Hardwood_fs, "Plantation")) //used in calulating areas only
var SandalwoodCount = Count(Distinct(Sandalwood_fs, "Plantation")) //used in calulating areas only
var OtherCount = Count(Distinct(Other_fs, "Plantation")) //used in calulating areas only
var FallowCount = Count(Distinct(Fallow_fs, "Plantation")) //used in calulating areas only
//Calculate Total Area total (the values below are overwritten by the if statement)
var PlantationsArea = 0
var PlantationsResult = ""
// check to see if there are Softwood Plantations in the LGA
if (PlantationsCount > 1) {
// calculate the sum of AreaHa
PlantationsArea = Sum(Ptns_fs , "AreaHa");
PlantationsResult = Round(PlantationsArea,0) + " Ha across " + PlantationsCount + " plantations";
} else {
if (PlantationsCount == 1) {
// calculate the sum of AreaHa
PlantationsArea = Sum(Ptns_fs , "AreaHa");
PlantationsResult = Round(PlantationsArea,0) + " Ha in " + PlantationsCount + " plantation";
} else {
PlantationsResult = "No plantations in " + LGAname;
}
}
//Calculate Softwood Area total (the values below are overwritten by the if statement)
var SoftwoodArea = 0
var SoftwoodResult = ""
// check to see if there are Softwood Plantations in the LGA
if (SoftwoodCount > 1) {
// calculate the sum of AreaHa
SoftwoodArea = Sum(Softwood_fs , "AreaHa");
SoftwoodResult = Round(SoftwoodArea,0) + " Ha across " + SoftwoodCount + " plantations";
} else {
if (SoftwoodCount == 1) {
// calculate the sum of AreaHa
SoftwoodArea = Sum(Softwood_fs , "AreaHa");
SoftwoodResult = Round(SoftwoodArea,0) + " Ha in " + SoftwoodCount + " plantation";
} else {
SoftwoodResult = "No softwood";
}
}
//Calculate Hardwood Area total (the values below are overwritten by the if statement)
var HardwoodArea = 0
var HardwoodResult = ""
// check to see if there are Hardwood Plantations in the LGA
if (HardwoodCount > 1) {
// calculate the sum of AreaHa
HardwoodArea = Sum(Hardwood_fs , "AreaHa");
HardwoodResult = Round(HardwoodArea,0) + " Ha across " + HardwoodCount + " plantations";
} else {
if (HardwoodCount == 1) {
// calculate the sum of AreaHa
HardwoodArea = Sum(Hardwood_fs , "AreaHa");
HardwoodResult = Round(HardwoodArea,0) + " Ha in " + HardwoodCount + " plantation";
} else {
HardwoodResult = "No hardwood";
}
}
//Calculate Sandalwood Area total (the values below are overwritten by the if statement)
var SandalwoodArea = 0
var SandalwoodResult = ""
// check to see if there are Sandalwood Plantations in the LGA
if (SandalwoodCount > 1) {
// calculate the sum of AreaHa
SandalwoodArea = Sum(Sandalwood_fs , "AreaHa");
SandalwoodResult = Round(SandalwoodArea,0) + " Ha across " + SandalwoodCount + " plantations";
} else {
if (SandalwoodCount == 1) {
// calculate the sum of AreaHa
SandalwoodArea = Sum(Sandalwood_fs , "AreaHa");
SandalwoodResult = Round(SandalwoodArea,0) + " Ha in " + SandalwoodCount + " plantation";
} else {
SandalwoodResult = "No sandalwood";
}
}
//Calculate Other Species Area total (the values below are overwritten by the if statement)
var OtherArea = 0
var OtherResult = ""
// check to see if there are Other Species Plantations in the LGA
if (OtherCount > 1) {
// calculate the sum of AreaHa
OtherArea = Sum(Other_fs , "AreaHa");
OtherResult = Round(OtherArea,0) + " Ha across " + OtherCount + " plantations";
} else {
if (OtherCount == 1) {
// calculate the sum of AreaHa
OtherArea = Sum(Other_fs , "AreaHa");
OtherResult = Round(OtherArea,0) + " Ha in " + OtherCount + " plantation";
} else {
OtherResult = "No other species";
}
}
//Calculate Fallow Area total (the values below are overwritten by the if statement)
var FallowArea = 0
var FallowResult = ""
// check to see if there are Fallow areas in the LGA
if (FallowCount > 1) {
// calculate the sum of AreaHa
FallowArea = Sum(Fallow_fs , "AreaHa");
FallowResult = Round(FallowArea,0) + " Ha across " + FallowCount + " plantations";
} else {
if (FallowCount == 1) {
// calculate the sum of AreaHa
FallowArea = Sum(Fallow_fs , "AreaHa");
FallowResult = Round(FallowArea,0) + " Ha in " + FallowCount + " plantation";
} else {
FallowResult = "No fallow areas";
}
}
// Output dictionary as fields to display in the pop-up
return {
type: 'fields',
title: 'Plantation Summary (by species)',
//description : "",
fieldInfos: [{
fieldName: " " // fieldName should match the key in the attributes dictionary
},
{
fieldName: "All Species" // fieldName should match the key in the attributes dictionary
},
{
fieldName: "Softwood" // fieldName should match the key in the attributes dictionary
},
{
fieldName: "Hardwood" // fieldName should match the key in the attributes dictionary
},
{
fieldName: "Sandalwood" // fieldName should match the key in the attributes dictionary
},
{
fieldName: "Other Species" // fieldName should match the key in the attributes dictionary
},
{
fieldName: "Fallow" // fieldName should match the key in the attributes dictionary
}],
attributes : {"All Species" : PlantationsResult, "Softwood" : SoftwoodResult, "Hardwood" : HardwoodResult, "Sandalwood" : SandalwoodResult, "Other Species" : OtherResult, "Fallow" : FallowResult} // replace this dictionary with your own key-value pairs
}
... View more
01-06-2025
09:21 PM
|
1
|
0
|
1400
|
|
IDEA
|
I think I have found a work around, which is to disable the Recycle Bin, which results in all trash items being permanently deleted, though upon reenabling the bin, those items still appear for some time (guessing there is lag time in the wipe process actually happening - they disappeared after a couple of hours). This would however happen across all users and not just "your" recycle bin.
... View more
01-05-2025
11:35 PM
|
0
|
0
|
1795
|
|
IDEA
|
It would be handy if there was an Empty Recycle Bin button, instead of having to manually select and delete items already in the recycle bin. We've got nearly 1000 items in the recycle bin after a bit of a python mishap (nothing lost that wasn't supposed to be thankfully), but now to delete all the items permanently, it seems I need to select and delete them in batches of 60 (limit displayed on the Contents page) with no "Select All" option. Also couldn't figure out how to delete from the recycle bin using python. Would be happy to try that out if someone can guide me.
... View more
01-05-2025
10:04 PM
|
7
|
2
|
1815
|
|
BLOG
|
Awesome to hear how you've managed to innovate with Survey123 and drones together to essentially eliminate climbing from the process. I'd love to see more about how multiple surveys talk to one another. Still very new to Survey123 and I know it's far more capable than I can even imagine right now based on stories like this.
... View more
12-23-2024
09:52 PM
|
1
|
0
|
2936
|
|
POST
|
Note to other tinkerers. I tweaked the code as per below to use print statements instead of arcpy.AddMessage, but essentially is just the same, exporting an .xlsx with a list of webmaps and their feature services (as feature service URL's only). I then exported an item report from ArcGIS Online and used Vlookup using the service URL to get more information on each layer. from arcgis.gis import GIS
from arcgis.mapping import WebMap
import arcpy
import pandas as pd
def main():
# logs into active portal in ArcGIS Pro
gis = GIS('pro')
print("Logged into {} as {}".format(arcpy.GetActivePortalURL(), gis.properties['user']['username']))
# creates list of items of all map image, feature, vector tile and image services (up to 10000 of each) in active portal
services = (gis.content.search(query="", item_type="Map Service", max_items=10000) +
gis.content.search(query="", item_type="Feature Service", max_items=10000) +
gis.content.search(query="", item_type="Vector Tile Service", max_items=10000) +
gis.content.search(query="", item_type="Image Service", max_items=10000))
print('Searching webmaps in {}'.format(arcpy.GetActivePortalURL()))
# creates list of items of all webmaps in active portal
web_maps = gis.content.search(query="", item_type="Web Map", max_items = 10000)
# Create an empty data frame to store the data
df = pd.DataFrame(columns=['Web Map', 'Service URL'])
# loops through list of webmap items
for item in web_maps:
# creates a WebMap object from input webmap item
web_map = WebMap(item)
# accesses basemap layer(s) in WebMap object
basemaps = web_map.basemap['baseMapLayers']
# accesses layers in WebMap object
layers = web_map.layers
# loops through basemap layers
for bm in basemaps:
# tests whether the bm layer has a styleUrl(VTS) or url (everything else)
if 'styleUrl'in bm.keys():
for service in services:
if service.url in bm['styleUrl']:
services.remove(service)
elif 'url' in bm.keys():
for service in services:
if service.url in bm['url']:
services.remove(service)
# loops through layers
for layer in layers:
# Add a new row to the data frame for each service used in the web map
if hasattr(layer, 'styleUrl'):
df.loc[len(df)] = [item.title, layer.styleUrl]
elif hasattr(layer, 'url'):
df.loc[len(df)] = [item.title, layer.url]
# Save the data frame to an Excel file
df.to_excel(r'C:\temp\web_maps.xlsx', index=False)
print("Finished")
if __name__ == "__main__":
main() I then also played with the coding posted here (Solved: Re: Where's the spatial reference information? - Esri Community) to print a list of feature services in ArcGIS Online and their WKID's which I could copy/paste into excel and also perform a Vlookup to the item report from ArcGIS Online to get more info for each layer. from arcgis.gis import GIS
# Connect to AGOL
agol = GIS("home")
# Search for all items in AGOL
items = agol.content.search(query="", max_items=10000)
# Iterate through each item
for item in items:
try:
# If it is a feature service or vector tile package
if item.type in ("Feature Service", "Vector Tile Package"):
# Print the WKID of the SRS
print("Item ID: {0}, WKID: {1}".format(item.id, item["spatialReference"]))
else:
print("Skipping Item ID: {0}, Type: {1}".format(item.id, item.type))
except Exception as e:
print("Failed to process item ID: {0}, Error: {1}".format(item.id, str(e)))
... View more
12-23-2024
09:46 PM
|
1
|
0
|
3829
|
|
POST
|
This has proven very helpful - I've been trying to find a way to bulk export spatial reference information for our ArcGIS Online content for a while and glad I finally stumbled on this code. Nothing else I have found or tried to create myself has worked for feature services - only feature classes.
... View more
12-23-2024
09:01 PM
|
1
|
0
|
5584
|
|
IDEA
|
Awesome! Glad it helped! I've found that Flight Mode helps with a couple of things in Field Maps (like working offline with maps that contain arcade expressions).
... View more
12-17-2024
04:51 PM
|
0
|
0
|
1973
|
|
BLOG
|
@GlenShepherd Good idea with the included URL! I haven't had a chance to really play with Geofences yet so not across the capabilities and limitations, but if a URL can be included, no reason it shouldn't work the way you describe. Not really any different to a URL in a popup or in Survey123.
... View more
12-16-2024
05:35 PM
|
1
|
0
|
1813
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | yesterday | |
| 2 | a week ago | |
| 3 | 2 weeks ago | |
| 3 | 2 weeks ago | |
| 2 | 2 weeks ago |
| Online Status |
Online
|
| Date Last Visited |
yesterday
|