POST
|
Greetings! My organization is exploring deploying ArcGIS Enterprise on Microsoft Azure. We are a current Azure shop, and wish to use ArcGIS Enterprise Cloud Builder for Microsoft Azure as a way to understand the scope and cost of our eventual deployment. This way, we could understand the Azure infrastructure components that will be needed to support our deployment and estimate their cost before we invest. My question is: is there currently a way to use Cloud Builder without first obtaining a license file? If not, any suggestions for how we make a cost estimate? I am aware of Azure Pricing Calculator, however, I anticipate some difficulty getting a comprehensive estimate in terms of compute, storage, and networking resources required, and would like (and management will insist on) a cost estimate of a realistic deployment before we make the decision to purchase licenses. Thanks in advance for any suggestions. Kind regards, Micah
... View more
04-26-2021
01:02 PM
|
0
|
1
|
866
|
POST
|
Hello Irene, I think you are super close. However, your oldPath variable is a UNC path (not mapped) but based on your script output you're comparing this to a mapped (Y) drive path. Arcpy doesn't "know" about mapped drives, unfortunately. So, you will want to compare a string representing the UNC equivalent of that mapped drive path. Also, this function will apply to a whole MXD, so there's no need to comb through the individual layers within each map: mxd.findAndReplaceWorkspacePaths(oldPath,newDataPath,False) I believe that you could just run that method twice on each mxd in your mxd list (once for the UNC oldPath and once for the mapped drive oldPath). This might simplify your process and avoid the risk of line 51 in your code returning a False, which I believe is what's happening currently. Hope that helps! Micah
... View more
10-28-2019
08:40 AM
|
0
|
0
|
764
|
POST
|
Ah ok, I see what you're saying. Are you sure you need to interact with the DataStore class? I may be misunderstanding your intent, but it sounds like what you want to do is update or overwrite a feature layer that's already hosted or registered with your portal. If so, there's a sample notebook that talks about taking CSV files, reading them using the pandas library, publishing the CSV as a feature layer, and then overwriting an existing feature layer. Hope this helps and I'm not way off base with what you're trying to do! Overwriting feature layers | ArcGIS for Developers
... View more
10-22-2019
02:55 PM
|
0
|
1
|
1048
|
POST
|
Hi Robert, Is this the same process you were working on here?: Trouble with selecting features by location using arcpy? If so, I think you should take a look at Spatial Join. This is really the best/only way to transfer attributes the way you are describing via arcpy. Transfer Attributes is only for transferring attributes between linear features. Anyways, I believe the workflow I recommended in your previous post is still your best bet. In code it would look something like this: # set up environment to overwrite output and output to in memory
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "in_memory"
# create feature layer from your DLL feature class
arcpy.MakeFeatureLayer_management(DLL_featureclass, "DLL_Layer")
# loop through your point layers, updating LANDDISTRICT first, then LANDLOT
for fc in fcs_to_update:
# make feature layer only containing the features with null values
arcpy.MakeFeatureLayer_management(fc, "temp_layer", "LANDDISTRICT IS NULL")
# spatial join to output a feature class in memory with the attributes of your polygon dataset
arcpy.SpatialJoin_analysis("temp_layer", "DLL_Layer", "tempSpatialJoinOutput",
"JOIN_ONE_TO_ONE", "KEEP_COMMON", "#", "INTERSECT")
# join the output back to your temporary layer based on TARGET_FID
arcpy.AddJoin_management("temp_layer", arcpy.Describe("temp_layer").OIDFieldName,
"tempSpatialJoinOutput", "TARGET_FID")
# get field name to update, since these field names will be qualified now that it is joined
LANDDISTRICT_field_name = "{}.LANDDISTRICT".format(fc.split("\\")[-1])
# update the values
arcpy.CalculateField_management("temp_layer", LANDDISTRICT_field_name,
"!tempSpatialJoinOutput.LANDDISTRICT!", "PYTHON_9.3")
# same thing, but for LANDLOT field
arcpy.MakeFeatureLayer_management(fc, "temp_layer", "LANDLOT IS NULL")
# spatial join to output a feature class in memory with the attributes of your polygon dataset
arcpy.SpatialJoin_analysis("temp_layer", "DLL_Layer", "tempSpatialJoinOutput",
"JOIN_ONE_TO_ONE", "KEEP_COMMON", "#", "INTERSECT")
# join the output back to your temporary layer based on TARGET_FID
arcpy.AddJoin_management("temp_layer", arcpy.Describe("temp_layer").OIDFieldName,
"tempSpatialJoinOutput", "TARGET_FID")
# get field name to update, since these field names will be qualified now that it is joined
LANDLOT_field_name = "{}.LANDLOT".format(fc.split("\\")[-1])
# update the values
arcpy.CalculateField_management("temp_layer", LANDDISTRICT_field_name,
"!tempSpatialJoinOutput.LANDLOT!", "PYTHON_9.3")
# remove the join
arcpy.RemoveJoin_management("temp_layer")
# cleanup
arcpy.Delete_management("in_memory")
arcpy.Delete_management("temp_layer")
I believe this would be much faster and simpler than any sort of feature-by-feature nested cursor approach. Micah
... View more
10-22-2019
11:53 AM
|
0
|
1
|
890
|
POST
|
Ravi's answer should work for you. If you want an exact match for your input parameter you could use: input = arcpy.GetMarameterAsText(0)
# python 2 str.format() function inserts the string variable into your expression with out needing to concatenate strings
expression = "TITLE = '{}'".format(input)
cursor = arcpy.da.SearchCursor(fc, expression) Tip: you may wish to use the data access module search cursor (as I've demonstrated above) if you are using a recent release of ArcGIS. It works the same but faster! SearchCursor—Help | ArcGIS for Desktop
... View more
10-22-2019
07:37 AM
|
0
|
0
|
760
|
POST
|
Is that your entire code? Based on the AttributeError I think something might have gone awry earlier in your code. Micah
... View more
10-22-2019
07:17 AM
|
0
|
3
|
1048
|
POST
|
Hi Serene, There are a couple of threads on GeoNet: How do you duplicate or copy a Map Journal? Make copy of web application Both the approaches flagged as correct seem promising. Hope this helps! Micah
... View more
10-08-2019
10:28 AM
|
1
|
0
|
1178
|
POST
|
Hmmm, that's strange. Where are the points located when you run the tool? Would you mind sharing a selection of the XY values? Are you sure that all of the points are stacked in a single location? What happens if you zoom to the output point layer?
... View more
10-08-2019
10:05 AM
|
0
|
0
|
1863
|
POST
|
Hi Mars, Is this the tool you are using? XY Table To Point—Data Management toolbox | ArcGIS Desktop My hunch is that you are dealing with a coordinate system problem. Here's some questions that might help: What's your output coordinate system when you ran the tool giving you the unsatisfactory result? What is the coordinate system of the map you are adding the points to? What is the coordinate system of the XY locations in your CSV? Provide a screenshot if you're not sure. Micah
... View more
10-08-2019
09:08 AM
|
0
|
3
|
1863
|
POST
|
Nice workaround, Malcolm! I wasn't aware of esri2open but I'm glad I am now. I wouldn't expect Feature Compare to work too well with OBJECTID as the sort field, since OBJECTIDs are notoriously unstable. Which command or GP tool did you use to import your features into a backup SDE from production SDE? Sometimes the OIDs get scrambled depending on which tool you use. Copy work better than others in my experience.
... View more
10-04-2019
07:33 AM
|
0
|
1
|
1023
|
POST
|
Thanks Robert, I understand your workflow much better now. It sounds like you want to transfer attributes from a polygon layer to the point layers that fall within it, where the corresponding attributes (although they are named differently) are null. Using search cursors may be feasible, but I think using a spatial join will be easier, especially if you have lots and lots of points in each layer. Nested cursors are pretty slow to run, sadly. Here's what I'd recommend: After line 4 below, use the where clause parameter of the Make Feature Layer tool to create a feature layer only where the relevant attribute ("LANDDISTRICT" is it?) is null Run a Spatial Join with your point feature layer as the target features, your polygon feature layer as the join features, and an output feature class in the in_memory workspace Use the Add Join tool to join your output point features back to your original point feature layer - the OIDs should be a correct match. Use the Calculate Field tool to update the null values with the values from the polygon layer. Micah
... View more
10-04-2019
07:22 AM
|
1
|
1
|
2330
|
POST
|
I'm not 100% clear on what you're trying to accomplish. It might help if you post the latest version of your script. Can you help me understand your desired steps? I think I understand this step. You want to select points that fall within your Dist_LL feature class. You lose me a bit here. Are all the selected points going to have the same values for a set of fields? What other layer are you trying to populate? Do the fields match between the layer where you've selected some points and the layer you want to update with the values of the selected points?
... View more
10-03-2019
01:59 PM
|
0
|
3
|
2330
|
POST
|
No worries - I've made that error many times (especially when I haven't got adequate sleep, which is often). Pro tip: use the Python window in ArcMap/Pro or an IDE that offers some code completion to check your syntax if you are unsure.
... View more
10-03-2019
12:45 PM
|
1
|
5
|
2330
|
POST
|
Gotta include the '_management' bit to get the proper syntax. See the examples: Make Feature Layer—Help | ArcGIS for Desktop
... View more
10-03-2019
12:34 PM
|
1
|
7
|
2330
|
POST
|
What do you have set as the Input modes and parameter data types for your task parameters?
... View more
10-03-2019
12:00 PM
|
0
|
0
|
1060
|
Title | Kudos | Posted |
---|---|---|
1 | 10-13-2017 09:58 AM | |
1 | 10-05-2017 12:14 PM | |
1 | 08-29-2017 02:07 PM | |
1 | 09-21-2016 08:34 AM | |
1 | 06-21-2016 10:05 AM |
Online Status |
Offline
|
Date Last Visited |
04-26-2021
03:16 PM
|