|
POST
|
Thanks for info @DanPatterson and @sjones_esriau . We didn't have the plan 'Area' option in our drop downs, so couldn't compare the planimetric and geodesic calcs, but I think I'm satisfied with the differing results. The only doubt left in my mind is around the difference between Zones 50 and 51. Wouldn't this still cause a difference in errors as the features when calculated in a zone that they don't fall within are further from the intended use area, and thus distorted? Or will geodesic fix this too? (in which case, are zones rendered pointless going forwards?)
... View more
02-19-2023
11:04 PM
|
0
|
2
|
6656
|
|
POST
|
I have 2 datasets that were put through a union and using the output I have then calculated the geometry to get a Hectare area figure. It's a broad layer covering a vast area of Western Australia. In ArcMap, we calculated the geometry using 3 different coordinate systems and got 3 different areas (as we expected we would). I have then repeated the process in ArcGIS Pro (same data sources and process) and got the below results - and not only do the figures differ from the ArcMap results, but they are the same from projection to projection (this is what originally got us looking closer as we expected different numbers). The Albers figure is closest to matching between the ArcMap and ArcGIS Pro figures which makes sense as it's a broader scale projection compared to Zones 50 & 51, but still differs. Can anyone explain either what we're doing wrong or why the results in ArcGIS Pro are seemingly consistent when they shouldn't be?
... View more
02-19-2023
05:06 PM
|
1
|
6
|
6753
|
|
IDEA
|
@KoryKramer Thanks. I've had a good read of those articles previously. The logic behind skipping (which I don't agree with) is to let other orgs find the bugs and have them fixed by 3.1, though as we all know, new bugs sneak in with all releases, so seems kinda pointless (especially considering I'm yet to find any bugs in 3.0 that have impacted our workflows.). Anyways, nearly there with 3.1 so I'm happy to wait another week!
... View more
02-13-2023
05:02 PM
|
0
|
0
|
2966
|
|
IDEA
|
@KoryKramer Awesome. Thanks! Been hanging out for this one as our org refused to upgrade to 3.0 which is where I've been doing all my development.
... View more
02-13-2023
04:50 PM
|
0
|
0
|
2973
|
|
IDEA
|
@RussellBrennan Great news! I look forward to trying it out. Do you have an ETA on 3.1 release date? Enterprise isn't something we use so won't get that benefit, but imagine many others will!
... View more
02-13-2023
04:14 PM
|
0
|
0
|
2980
|
|
IDEA
|
I tried this out yesterday for the first time only to discover that integers weren't an option. Made it useless in that scenario, but could still be useful in others in its current format. Seems a bit short sighted.
... View more
01-10-2023
02:44 PM
|
0
|
0
|
3394
|
|
DOC
|
@RobertEisler glad it worked for you and your needs. Always good when you can find exactly what you're looking for. I find I'm usually cobbling together bits and pieces from all over the place to achieve an outcome. Slowly learning what works better as I find other examples of things I've been doing a certain easy for a while.
... View more
12-10-2022
05:39 AM
|
0
|
0
|
29508
|
|
DOC
|
@RobertEisler I have modified the script as per below to include input and output parameters (Lines 10-12 & 144) which have replaced the variables that you edit at the beginning of the script. (NOTE: I have also implemented the use of keyring to parse the login details for ArcGIS Online which means I don't need to store our password in the script: Lines 28-30) import arcpy, os, time, uuid
from zipfile import ZipFile
from arcgis.gis import GIS
import arcgis.features
# Overwrite Output
arcpy.env.overwriteOutput = True
# Parameters
infc = arcpy.GetParameter(0)
outfsID = arcpy.GetParameter(1)
sublayerID = arcpy.GetParameter(2)
# Variables
fc = str(infc) # Path to Feature Class
fsItemId = outfsID # Feature Service Item ID to update
featureService = True # True if updating a Feature Service, False if updating a Hosted Table
hostedTable = False # True is updating a Hosted Table, False if updating a Feature Service
layerIndex = sublayerID # Layer Index
disableSync = True # True to disable sync, and then re-enable sync after append, False to not disable sync. Set to True if sync is not enabled
# Start Timer
startTime = time.time()
# Create GIS object
print("Connecting to AGOL")
### Access the stored password with keyring and sign into the GIS # https://community.esri.com/t5/arcgis-online-blog/connect-to-the-gis-in-python-scripts-without/ba-p/889867
import keyring
pw = keyring.get_password("ArcGISOnline", "Username")
gis = GIS("https://fpcwa.maps.arcgis.com", "Username", pw)
print("Connected to the GIS")
# Create UUID variable for GDB
gdbId = str(uuid.uuid1())
# Function to Zip FGD
def zipDir(dirPath, zipPath):
'''Zip File Geodatabase'''
zipf = ZipFile(zipPath , mode='w')
gdb = os.path.basename(dirPath)
for root, _ , files in os.walk(dirPath):
for file in files:
if 'lock' not in file:
filePath = os.path.join(root, file)
zipf.write(filePath , os.path.join(gdb, file))
zipf.close()
print("Creating temporary File Geodatabase")
gdb = arcpy.CreateFileGDB_management(arcpy.env.scratchFolder, gdbId)[0]
# Export featureService classes to temporary File Geodatabase
fcName = os.path.basename(fc)
fcName = fcName.split('.')[-1]
print(f"Exporting {fcName} to temp FGD")
if featureService == True:
arcpy.conversion.FeatureClassToFeatureClass(fc, gdb, fcName)
elif hostedTable == True:
arcpy.conversion.TableToTable(fc, gdb, fcName)
# Zip temp FGD
print("Zipping temp FGD")
zipDir(gdb, gdb + ".zip")
# Upload zipped File Geodatabase
print("Uploading File Geodatabase")
fgd_properties={'title':gdbId, 'tags':'temp file geodatabase', 'type':'File Geodatabase'}
fgd_item = gis.content.add(item_properties=fgd_properties, data=gdb + ".zip")
# Get featureService/hostedTable layer
serviceLayer = gis.content.get(fsItemId)
if featureService == True:
fLyr = serviceLayer.layers[layerIndex]
elif hostedTable == True:
fLyr = serviceLayer.tables[layerIndex]
# Truncate Feature Service
# If views exist, or disableSync = False use delete_features. OBJECTIDs will not reset
flc = arcgis.features.FeatureLayerCollection(serviceLayer.url, gis)
try:
if flc.properties.hasViews == True:
print("Feature Service has view(s)")
hasViews = True
except:
hasViews = False
if hasViews == True or disableSync == False:
# Get Min OBJECTID
minOID = fLyr.query(out_statistics=[{"statisticType": "MIN", "onStatisticField": "OBJECTID", "outStatisticFieldName": "MINOID"}])
minOBJECTID = minOID.features[0].attributes['MINOID']
# Get Max OBJECTID
maxOID = fLyr.query(out_statistics=[{"statisticType": "MAX", "onStatisticField": "OBJECTID", "outStatisticFieldName": "MAXOID"}])
maxOBJECTID = maxOID.features[0].attributes['MAXOID']
# If more than 2,000 features, delete in 2000 increments
print("Deleting features")
if (maxOBJECTID - minOBJECTID) > 2000:
x = minOBJECTID
y = x + 1999
while x < maxOBJECTID:
query = f"OBJECTID >= {x} AND OBJECTID <= {y}"
fLyr.delete_features(where=query)
x += 2000
y += 2000
# Else if less than 2,000 features, delete all
else:
print("Deleting features")
fLyr.delete_features(where="1=1")
# If no views and disableSync is True: disable Sync, truncate, and then re-enable Sync. OBJECTIDs will reset
elif hasViews == False and disableSync == True:
if flc.properties.syncEnabled == True:
print("Disabling Sync")
properties = flc.properties.capabilities
updateDict = {"capabilities": "Query", "syncEnabled": False}
flc.manager.update_definition(updateDict)
print("Truncating Feature Service")
fLyr.manager.truncate()
print("Enabling Sync")
updateDict = {"capabilities": properties, "syncEnabled": True}
flc.manager.update_definition(updateDict)
else:
print("Truncating Feature Service")
fLyr.manager.truncate()
# Append features from featureService class/hostedTable
print("Appending features")
fLyr.append(item_id=fgd_item.id, upload_format="filegdb", upsert=False, field_mappings=[])
# Delete Uploaded File Geodatabase
print("Deleting uploaded File Geodatabase")
fgd_item.delete()
# Delete temporary File Geodatabase and zip file
print("Deleting temporary FGD and zip file")
arcpy.Delete_management(gdb)
os.remove(gdb + ".zip")
endTime = time.time()
elapsedTime = round((endTime - startTime) / 60, 2)
print("Script finished in {0} minutes".format(elapsedTime))
CompleteVariable = "Complete"
arcpy.SetParameter(3, CompleteVariable) By doing this, I can then save the script as a Python Script Tool in a Toolbox which you can load into a Model and parse data in as required (feature class, feature service ID, sub layer ID) and get a "Complete" variable output (Line 144) so you know when it's done (can use as a precondition for further steps). This means you can also use the same script over and over as per my demo below.
... View more
12-08-2022
05:53 PM
|
0
|
0
|
29564
|
|
POST
|
My testing yesterday with ESRI Australia Support found the same results regarding the shared update group allowing the tool to work as expected for non-Administrators. We too couldn't add "Data Editors" to it though. They had to be a "User" type. Hopefully this bug can be addressed soon, as it surely is a bug!
... View more
12-02-2022
02:02 PM
|
0
|
0
|
5102
|
|
POST
|
Not yet - still working on the issue with ESRI tech support. They might be interested in looking at your data too so will make sure they know you're having trouble too.
... View more
11-28-2022
09:54 PM
|
0
|
0
|
5149
|
|
IDEA
|
Just looked into this - it's still in the Product Plan. Wish they would fix it already! My Esri | Bug Details
... View more
11-24-2022
08:35 PM
|
0
|
0
|
10978
|
|
IDEA
|
When creating a layout with a main map frame and 1 or more inset map frames, it would be handy if we had an option to set a buffer distance around a linked map frame extent. Use case example: We have a map product where we may be looking at a small plantation area (1:10,000 scale) or a larger plantation area (1:25,000) scale, and depending on where these plantations are based (i.e. near an urban area vs out in the sticks) you may either get more or not enough surrounding information shown in the inset map based on preconfigured display constraints (such as the Linked map frame centre and scale). We have been using the Linked map frame centre option and manually setting a scale to show the appropriate amount of surrounding data for that area. Instead, to increase productivity by making this more automatic, we would like to be able to set a buffer % or distance value (i.e. km/feet) that is added onto a linked map frame extent as per the example below. A percentage would always give you a variable amount that shows more based on the area covered by the larger map, whereas a distance value would show a fixed amount extra around a map extent indicator.
... View more
11-24-2022
07:19 PM
|
0
|
0
|
1141
|
|
IDEA
|
As an addition to this idea, it could be expanded to include a similar option for additional views in floating windows.
... View more
11-08-2022
10:32 PM
|
0
|
0
|
1098
|
|
IDEA
|
We have been provided with one of those fancy super wide 49" screens at work, and as such, I'm changing the way that I work with ArcGIS Pro. I used to prefer to open Attribute Tables as a separate floating window (and to stack additional views on top) when I had dual 24" screens, but now, would prefer to have it open next to my active map. Currently, the only option is for it to be opened below the active map. It would be great to be able to say where it opens in relation to the map, instead of just below.
... View more
11-08-2022
07:54 PM
|
5
|
1
|
1154
|
|
POST
|
I've just opened an ESRI Support case for this issue: 03192745. Will post back with the outcome.
... View more
11-07-2022
06:37 PM
|
1
|
0
|
5195
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | a week ago | |
| 2 | a week ago | |
| 4 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 2 | 3 weeks ago |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|