|
POST
|
@BruceHarold - I see there is a tutorial available for ArcGIS ArcMap/Catalog; is it applicable to ArcGIS Pro as well? I didn't find anything other than the videos you've mentioned here and a couple more in a google search. My agency just purchased it and I'm about to install it for Pro 2.8.2.
... View more
11-04-2021
07:27 AM
|
0
|
2
|
2128
|
|
POST
|
@JonathonRobert - I'm confused here: are you saying you did or did not use MakeFeatureLayer() in your stand alone script?
... View more
11-04-2021
07:18 AM
|
0
|
3
|
2889
|
|
POST
|
I wish the old search/update/insert cursors would just go away so you get a syntax error instead of some jacked up result.
... View more
11-03-2021
02:40 PM
|
0
|
0
|
2910
|
|
POST
|
I think @curtvprice addressed that above; when you are working in a stand alone script, you need to use the make feature layer method in arcpy. ArcGIS Pro presents the data in that form for you so you are able to interact with it, hence, when you refer to the data in you TOC it's a feature layer. But when you run a stand alone script, you need to do what ArcGIS Pro does. import arcpy
arcpy.env.workspace = r'C:/path/to/data.gdb'
fc = 'MyFeatureClass'
arcpy.MakeFeatureLayer_management(fc, "MyLayer")
select = 'OBJECTID = 1'
arcpy.management.SelectLayerByAttribute('MyLayer', 'NEW_SELECTION', select)
... View more
11-03-2021
01:48 PM
|
1
|
2
|
2936
|
|
POST
|
@curtvprice Curtis- where is the rest of this post?
... View more
11-03-2021
12:56 PM
|
0
|
0
|
2982
|
|
POST
|
Select features by location. Within 0 feet; Share a line; etc....
... View more
11-02-2021
11:28 AM
|
1
|
1
|
5062
|
|
POST
|
I can't comment on it being a bug or not, but obviously something changed between 10.6 and 10.7. As a work around, can you run your calculations and then go back and select those lines where Bearing is Null and calculate them to 0?
... View more
11-02-2021
10:48 AM
|
0
|
0
|
717
|
|
POST
|
Removing and replacing seems to do the trick. We have a cloud based ArcGIS Server to which we publish data, and then we point back to it for an item in our AGOL. Here is the code that I got to work for me: import arcpy
aprx = arcpy.mp.ArcGISProject('N:\\GIS\\AddressDataManagement\\TestDir\\CUP2020_000038\\cup2020_000038.aprx')
m = aprx.listMaps()[0]
rmlyr = m.listLayers("MSD.SLCOMSD.AddressGridMSD")[0]
m.removeLayer(rmlyr)
#addlyr = r'https://name/server/rest/services/Hosted/AddressCoordinateGrid/FeatureServer/0'
addlyr = r'https://ourAgol/home/item.html?id=################'
m.addDataFromPath(addlyr)
aprx.saveACopy('N:\\GIS\\AddressDataManagement\\TestDir\\CUP2020_000038\\cup2020_000038NEW.aprx') Lines 10 and 12 are the same data in our case: this just illustrates that the addDataFromPath can take an ArcGIS Enterprise rest end or and AGOL item.
... View more
11-02-2021
09:22 AM
|
2
|
1
|
3511
|
|
POST
|
Thank you @GaetanPRU - the problem I see with using another layer for the CIM properties is I'd have to add the reference layer to the set of project files and that essentially defeats the purpose. Now as I type this, I wonder if a better way would be to simply delete the existing Egdb layer and replace it with the Feature Service Layer... ... I think it's a bug or we can't update workspace_factory SDE to FeatureService.... Pretty much what I've been thinking too. I mean, ESRI is pushing hosted feature services and with good reason However there needs to be an efficient set of tools that work and allow us to migrate from the old days of direct connection data bases to the modern approach of hosted feature services. This from a guy with one foot out the door because he:
... View more
11-02-2021
07:28 AM
|
1
|
0
|
3515
|
|
POST
|
After a couple hours of trial and error, I'm tossing in the towel and getting a cold adult beverage. The online help describes using an existing dictionary and a replacement dictionary to update the properties. I just can make sense of it. aprx = arcpy.mp.ArcGISProject('N:\\GIS\\AddressDataManagement\\TestDir\\CUP2020_000038\\cup2020_000038.aprx')
m = aprx.listMaps()[0]
l = m.listLayers("MSD.SLCOMSD.AddressGridMSD")[0]
existingDict = {'connection_info': {'authentication_mode': 'DBMS',
'db_connection_properties':'xxxdb',
'instance':'sde:sqlserver:sxxxdb',
'server': 'xxxdb',
'dataset': 'MSD.SLCOMSD.AddressGridMSD',
'workspace factory':'SDE'}}
replaceDict = {'connection_info': {'url':'https://xxx.org/server/rest/services/Hosted/AddressCoordinateGrid/FeatureServer'},
'dataset': '0',
'alias':'AddressCoordinateGrid',
'workspace_factory':'FeatureService'}
l.updateConnectionProperties(existingDict,replaceDict)
aprx.saveACopy('N:\\GIS\\AddressDataManagement\\TestDir\\CUP2020_000038\\cup2020_000038NEW.aprx') When I run this as is, the properties of my feature layer looks like this: Notice the value in the url row. In the python code above, line 5 has 'authentication_mode': 'DBMS' : if I leave that part out, it won't make any updates at all; the feature layer in the TOC still has the red exclamation mark in front of it. But when I leave it in, I get the weird properties value shown above. In closing for today, if I list the connection properties through arcpy, it shows the sde connection properties but the feature url : pprint.pprint(l.connectionProperties)
{'connection_info': {'authentication_mode': 'DBMS',
'database': 'xxx',
'db_connection_properties': '"xxxdb',
'dbclient': 'sqlserver',
'instance': '"sde:sqlserver:xxxdb',
'password': '<xxx>',
'server': 'xxxdb',
'url': 'https://xxx.org/server/rest/services/Hosted/AddressCoordinateGrid/FeatureServer',
'user': 'SLCOmsd',
'version': 'sde.DEFAULT'},
'dataset': '0',
'workspace_factory': 'FeatureService'} It appears to be pulling from the correct source, but I don't really want those other properties populated and I would really like the Properties pane to be accurate as well....
... View more
11-01-2021
03:47 PM
|
0
|
2
|
3548
|
|
POST
|
That's a great suggestion! I'll post up what I find!
... View more
11-01-2021
12:47 PM
|
0
|
0
|
3592
|
|
POST
|
I have a number of ArcGIS Pro projects where I need to change one layer that used to be a feature class in our EGDB (aka SDE) to a feature service. The online help provides various approaches and in this post, @GaetanPRU provides some code to update the connection properties of a shape file. Following that lead: # I have a list created a priori of my Pro projects:
for a in aprxList:
aprx = arcpy.mp.ArcGISProject(a[0])
map = aprx.listMaps("Live SDE")[0]
layer = map.listLayers("MSD.SLCOMSD.AddressGridMSD")[0]
cp = layer.connectionProperties If I list cp, I get the dictionary of the connection properties: cp
{'dataset': 'MSD.SLCOMSD.AddressGridMSD',
'workspace_factory': 'SDE',
'connection_info': {'authentication_mode': 'DBMS',
'database': 'myDB',
'dbclient': 'sqlserver',
'db_connection_properties': '"bla bla bla',
'password': '<yeahRight>',
'instance': '"sde:sqlserver:bla bla bla',
'server': 'bla bla bla',
'user': 'myUser',
'version': 'sde.DEFAULT'}} However, I'm unsure as to what my next step is to update the connection properties to a feature service.
... View more
11-01-2021
12:13 PM
|
0
|
12
|
4517
|
|
POST
|
That's too bad; never have understood that mentality and don't miss it now that I've left the 9-1-1 arena. I always felt that the public in public safety is what really matters....
... View more
10-29-2021
09:45 AM
|
0
|
0
|
1986
|
|
POST
|
Didn't quite get the part of Tom Tom and Here, but now I get it. I've always been leery of commercially available data; comes from working in 9-1-1 for a number of years. I've always been a 'roll yer own' sort of guy when it comes to geocoding.
... View more
10-29-2021
09:34 AM
|
0
|
2
|
1989
|
|
POST
|
For the sake of discussion: If you are already using higher quality data, what value does the Tiger data add? I looked for Tiger 2020 streets earlier just to see what it has, and couldn't find it. Now we are in ArcGIS Pro using the new style of locators and this process is beyond belief to try and migrate. ^^^ This is what I don't understand. I create new style locators and composite them together all the time. But then again, I don't use Tiger data...
... View more
10-29-2021
09:22 AM
|
0
|
4
|
1993
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-11-2018 07:12 AM | |
| 1 | 05-17-2021 11:18 AM | |
| 1 | 06-29-2021 11:42 AM | |
| 1 | 07-05-2012 07:49 AM | |
| 1 | 09-03-2016 06:16 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-28-2025
05:02 PM
|