POST
|
Issue found, and it's **bleep** embarrassing I must admit - I stuffed up the name of the feature class. And despite double, triple and quadruple checking - it still slipped through the cracks. The correct name was PRELIMINARY_REPORTS_ALL, but I was trying to open a cursor on PRELIMINARY_RECORDS_ALL (which doesn't exist). Problem solved...
... View more
12-01-2020
09:24 PM
|
1
|
0
|
2421
|
POST
|
Gday everyone I've hit a strange problem with a Python process I'm trying to build that uses a couple of arcpy.da cursors. The way the process is structured, firstly I am using a arcpy.da.InsertCursor to add rows to a feature class based on logic from a prior step. The process is running fine up until this point. I then need to call an arcpy.da.UpdateCursor on the same feature class, and this is where I'm striking the "Runtime error - cannot open file feature_class_name". I thought maybe it was due to the cursor from the InsertCursor object still being live, so I've refactored the script to explicitly delete the object, with no luck. I also thought there may be a race condition where the UpdateCursor was being called before the InsertCursor object was deleted, so I explicitly built in a 5 second pause. No success either. I'm 100% certain I have the syntax right (but have double and triple checked) - and I'm at a bit of a loss with this issue. Has anyone got any suggestions that may send me in the right direction? On ArcMap 10.7.1 and code below. hashes_source = []
with arcpy.da.SearchCursor(source_ch_data,fieldlist[0:-4]) as cur:
for row in cur:
sourcehash = get_hash(row)
hashes_source.append(sourcehash)
if sourcehash not in hashes:
print "Inserting row for",sourcehash
icur = arcpy.da.InsertCursor("PRELIMINARY_REPORTS_ALL",fieldlist)
icur.insertRow(row+("Y",last_update_dto,None,sourcehash))
del icur
time.sleep(5)
# process runs ok to this point, fails where UpdateCursor is called below
# error message below:
'''
Traceback (most recent call last):
File "C:\folder_location\change_detection.py", line 101, in <module>
with arcpy.da.UpdateCursor("PRELIMINARY_RECORDS_ALL",["CURRENT_RECORD_YN","RECORD_RETIRED_DT","HASH_SHA256_HEX"]) as cur:
RuntimeError: cannot open 'PRELIMINARY_RECORDS_ALL'
'''
# iterate through destination table
# if hash not in source table, retire the record
with arcpy.da.UpdateCursor("PRELIMINARY_RECORDS_ALL",["CURRENT_RECORD_YN","RECORD_RETIRED_DT","HASH_SHA256_HEX"]) as cur:
for row in cur:
if row[2] not in hashes_source:
print "Retiring record",row[2]
row[0] = "N"
row[1] = last_update_dto
cur.updateRow(row) Thanks in advance!
... View more
12-01-2020
05:42 PM
|
0
|
2
|
2444
|
POST
|
Just found this video which may assist anyone else facing this issue: https://www.esri.com/videos/watch?videoid=S5V6MIrAKCk&title=how-to-preserve-globalid-guid-relationships-when-appending-records This the workflow post referenced at about 0:30: Loading Survey123 data with Related Tables into a New Form?
... View more
06-18-2020
02:39 AM
|
0
|
0
|
663
|
POST
|
Hi I have a S123 survey that I was asked to build in order to support surveys that were already being undertaken and recorded on paper. The S123 survey involves a repeat, which means that the resultant feature service has 2 layer and a relationship between the parent and child layer. The child layer includes a geopoint so both layers are point data. I now need to add previously completed (survey) results into the feature service to allow for reporting and visibility, and I’m a little stuck on how to do this. So far I’ve created a local copy for editing in ArcMap, digitised all of the parent and child features, and populated the ParentGlobalID field in the child features correctly so that parent and child features can be successfully joined. However, when I try and synchronise these changes with the S123 feature service, only the parent features are updated, not the child features. Any tips on how I can complete this successfully? If there was no related table etc involved, this would be pretty straightforward, but I seem to have tripped myself up. The only slightly abnormal approach I’ve taken here is that new features were appended to the child feature layer from another feature class, rather than being digitised directly in that layer. This shouldn’t trip me up (it hasn’t in the past) but may have this time? If anyone has any suggestions on how to complete this task successfully, please let me know! Thanks
... View more
06-16-2020
01:29 AM
|
0
|
1
|
703
|
POST
|
Hi I've got 2 fresh ArcGIS Desktop 10.6.1 installations on two nearly identical computers. One PC is running a vanilla installation of Windows 10, and the second machine is running a corporate image of Windows 10 (including corporate security policies etc etc). The spec of the corporate machine is slightly better than the vanilla machine (better processor, more RAM, better video card). However, the performance of ArcGIS Desktop 10.6.1 on the vanilla Win 10 machine far exceeds the performance of the corporate machine. There is a significant difference in performance which I can quantify by comparing opening and map production times on a sample MXD. For reference, with a relatively complex MXD that relies on both local data and a couple of map services, the times are: Loading - corporate machine 3min40sec, vanilla machine 0min42sec Map export - corporate machine 0min45sec, vanilla machine 0min28sec To me, it is clear that the issue is with the corporate Win10 installation and the relevant security policies, profiles etc. However I am fighting a losing battle with our IT department for the issue to be recognised and actioned. So, my question is: 1 - what information can I provide from both machines that will highlight the difference between the installations - for example environment settings, relevant registry keys etc? 2 - is there a 'best practice' guide for PC configuration (not necessarily just machine specs) that I could provide as a guide for machine tuning / optimization for desktop GIS usage? Thanks Anthony
... View more
02-25-2020
09:52 PM
|
0
|
0
|
611
|
POST
|
(Cross-posted in ArcGIS REST API) Hi everyone I've got a project that consists of a master feature service that is updated by an external process, and several layer views from the parent FS. I've had to make some updates to the project due to some upstream changes, which has resulted in some schema and symbology changes to the parent FS. I am wondering - is there a straightforward way (programmatic or otherwise) thatI can force these changes on the downstream feature services without having to delete and re-create the view? Feature service and views are hosted in ArcGIS Online organisational account. Very interested to hear what the options are. Thanks - Anthony
... View more
10-30-2019
11:29 PM
|
0
|
1
|
906
|
POST
|
Hi everyone I've got a project that consists of a master feature service that is updated by an external process, and several layer views from the parent FS. I've had to make some updates to the project due to some upstream changes, which has resulted in some schema and symbology changes to the parent FS. I am wondering - is there a straightforward way (programmatic or otherwise) thatI can force these changes on the downstream feature services without having to delete and re-create the view? Feature service and views are hosted in ArcGIS Online organisational account. Very interested to hear what the options are. Thanks - Anthony
... View more
10-30-2019
11:27 PM
|
0
|
0
|
653
|
POST
|
I encountered this problem today as well. I was trying to overwrite a feature service that did not have sync enabled, but had a layer view that did. To resolve the issue I had to delete all replicas that existed on the view layer using /unregisterReplica. No issues after that.
... View more
10-30-2019
10:07 PM
|
1
|
1
|
3308
|
POST
|
Hi Dan I’ve had the same issue with 10.3.1 and 10.5.1. Australia, en-au. No non-English characters. That link above re: 10.6.1 is very interesting, not the least because we are (were?) about to do a system-wide migration to 10.6.1 - that may knock it on the head. After I posted yesterday evening, I got to thinking about any other libraries that may be able to assist, and had a hunt around. It looks as though GDAL should be able to open the images and extract the bands, which I could then load as arrays in numpy to do the required algebra for the NDVI analysis. I haven’t tried yet but it sounds like a promising avenue to investigate. Thanks Anthony
... View more
05-30-2019
02:38 PM
|
0
|
1
|
825
|
POST
|
Hi folks ive also asked this over at the Spatial Analyst group with no response, so I thought I’d try here. im looking for a Pythonic way to extract a single band from a multi band ECW image. The ECW part is important, as every time I try to run an ArcToolbox tool on the data, Arcmap immediately crashes. I get the same result using IDLE and arcpy. The only success I’ve had on the Desktop front was by loading the specific band, and then right clicking > Export Data. the one bit of success I had was creating a faster object using arcpy.sa.Raster and then saving this to a different workspace. However this copied all bands over, not just the band I had selected for the raster object. (path/image.ecw/Red for example). Why am I doing this? I need to be able to batch generate a heap of NDVI outputs, where I need to extract the red band from the VIS image and the IR band from the IR image. Any my suggestions will be gratefully appreciated. Thanks Ant
... View more
05-30-2019
04:07 AM
|
0
|
3
|
946
|
POST
|
Hi folks This may be more of an arcpy question than an SA question, but I'll ask anyway. I'm looking for an automated way using arcpy to extract bands from ECW images. The only way I've been able to do this so far is to do it manually by loading the individual band to an ArcMap session, and then right-click > Export Data. I haven't been able to work out how to do this with any ArcToolbox tools, or any arcpy functions. Have you been able to do this with arcpy or ArcToolbox in the past? How did you do it? Thanks Anthony
... View more
05-29-2019
09:51 PM
|
0
|
1
|
1240
|
POST
|
Thanks Chelsea Rozek and Mathew Evans I've created a post on ideas.arcgis.com about exactly this issue - if you have an opportunity to review and upvote it would be great. https://community.esri.com/ideas/16542 Mathew Evans - you don't happen to work for a public land management agency in Victoria do you?
... View more
04-16-2019
04:57 PM
|
1
|
1
|
1347
|
IDEA
|
This idea relates to a discussion on Geonet (Editing experience in "new" ArcGIS Collector (iOS) ). I'm in the process of switching my user base over to the new iOS version of ArcGIS Collector. Some of the changes and improvements are excellent - ability to label features, directional arrows, auto sync etc etc are a real improvement. However, I think the user editing experience has gone backwards a long way, specifically for lines and polygons. In the 'Classic' Collector, a line or polygon feature could be drawn on screen by tapping on screen for each of the feature vertices, and then saving the feature. However, in the new version, the user needs to pan the screen so that the vertex to be created is aligned with the centre cross hair, and then tap 'create point'. This is hugely inefficient and quite frustrating to use, especially if you're working in a moving vehicle or helicopter (as my user base generally are). A huge enhancement to the new version of Collector would be to allow the user to revert to a similar editing experience to the 'Classic' version of Collector - specifically where they can just tap on the screen to create a feature vertex.
... View more
04-16-2019
04:52 PM
|
35
|
1
|
1604
|
POST
|
Hi I've in the process of switching my user base over to the new iOS version of ArcGIS Collector. Some of the changes and improvements are excellent - ability to label features, directional arrows, auto sync etc etc are a real improvement. However, I think the user editing experience has gone backwards a long way, specifically for lines and polygons. In the 'Classic' Collector, a line or polygon feature could be drawn on screen by tapping on screen for each of the feature vertices, and then saving the feature. However, in the new version, the user needs to pan the screen so that the vertex to be created is aligned with the centre cross hair, and then tap 'create point'. This is hugely inefficient and quite frustrating to use, especially if you're working in a moving vehicle or helicopter (as my user base generally are). My question is - is there a setting somewhere that I haven't found yet that will revert this editing behavior to a more 'classic' editing experience? Thanks in advance Anthony
... View more
03-27-2019
05:59 PM
|
2
|
6
|
1595
|
POST
|
Hi I'm trying to wade what the implications of the looming TLS upgrade will be to some of my projects. One thing I can't seem to find any information on is whether there will be any impact to custom applications that utilise the ArcGIS REST API. I've got a couple of small projects that rely on the REST API to interact with ArcGIS Online datasets. The only calls I use are: /sharing/rest/oauth2/token/ to generate a token /query to query features /addFeatures to add features /deleteFeatures to delete features All the calls are made to the feature service via a https:// call. Projects are written in Python and use the requests module to execute the calls. Do I have anything to worry about? And can anyone point me to either a test service or some documentation that may assist? Thanks Anthony
... View more
02-04-2019
09:11 PM
|
0
|
0
|
451
|
Title | Kudos | Posted |
---|---|---|
1 | 10-30-2019 10:07 PM | |
1 | 12-01-2020 09:24 PM | |
1 | 01-09-2018 07:17 PM | |
1 | 06-08-2016 02:49 PM | |
1 | 07-03-2016 11:54 PM |
Online Status |
Offline
|
Date Last Visited |
12-01-2020
10:55 PM
|