|
POST
|
Just want to add my experience to the mix. When ever python breaks, notebook blows up etc etc I often find that the source of my problem is the fact I had installed Deep learning libraries for ArcGIS Pro. I have to use the Windows Add/Remove to remove the deep learning packages and often follow that up with a repair on ArcPro. That often fixes the issue. Something to explore...
... View more
11-24-2023
09:16 AM
|
0
|
0
|
2474
|
|
POST
|
OK now I see the problem you are asking about. My experience when such tools fail to generate expected answers, in your case two first order streams must increment to a 2nd order when they come together, is that the under lying DEM was not corrected for hydrological analysis. Typically a first step is to pass the DEM through the fill sinks tool before computing flow direction and or flow accumulation rasters. My guess is that section of the DEM has not passed through the fill sinks tool? I would run the DEM through that to see if it corrects it.
... View more
11-23-2023
05:18 AM
|
0
|
0
|
1304
|
|
POST
|
What you are showing is the raster attribute table of your stream order raster, you get that with integer rasters. Its simply the count of the number of pixels for the pixel value in the entire raster. So in your example you have 42340 pixels with a value of 1 and in that dataset 1 means a headwater stream. You don't have 42340 headwater streams you need to be counting the segment number to determine that.
... View more
11-22-2023
08:16 AM
|
0
|
0
|
1319
|
|
POST
|
Without your data or seeing how you ran the tool its just speculation, I would explore if your data has changed in some way, maybe the data you are joining is multi-part?
... View more
11-22-2023
08:08 AM
|
0
|
1
|
1088
|
|
POST
|
I want to compliment this post with further evidence of the 3.2 field mapping in the Export Table tool as being buggy. If the input is a Table or FeatureClass then if you change the output field type properties (e.g. the field length of a text field say from 8000 to 255) it remembers it. If the input is a Feature Layer or Table View then any property changes of a field in the field map are instantly forgotten when you OK the field mapping dialog. It makes building models in model builder impossible when you need to use the field mapping, this needs to be fixed fast.
... View more
11-21-2023
09:20 AM
|
4
|
4
|
2975
|
|
IDEA
|
I think the nature of the tools are quite different, merge is simply bringing datasets together, dissolve or union is a geometric operation. So to combine these disparate operations into a single tool is undoubtedly problematic. So chaining the tools as you do now is the most robust solution. You can do this in model builder and expose it as a tool. You then get the experience of a single tool interface but behind the scenes its running the tools in sequence. Suggest you explore model builder.
... View more
11-15-2023
06:27 AM
|
0
|
0
|
2692
|
|
POST
|
This should get you going, this is how I would have done it. Code assumes single part and a line with a minimum of 4 vertices: import arcpy
lyrLine = "lines"
lstRes = list()
with arcpy.da.SearchCursor(lyrLine, "SHAPE@") as cursor:
for row in cursor:
geom = row[0] # A polyline
if geom.pointCount >= 4:
arr =geom.getPart(0)
p1 = arr[0] # first
p2 = arr[1] # second
p3 = arr[-2] # second from last
p4 = arr[-1] # last
s1 = str(p1.X) + "," + str(p1.Y)
s2 = str(p2.X) + "," + str(p2.Y)
s3 = str(p3.X) + "," + str(p3.Y)
s4 = str(p4.X) + "," + str(p4.Y)
lstRes.append([s1,s2,s3,s4])
print(lstRes)
... View more
11-09-2023
09:46 AM
|
0
|
1
|
4211
|
|
POST
|
Have you tried the indexing which you suggest as that is what I would have done?
... View more
11-09-2023
08:10 AM
|
0
|
1
|
4220
|
|
POST
|
I can't replicate your problem, how are you running this script?
... View more
11-09-2023
08:04 AM
|
0
|
3
|
2520
|
|
POST
|
Yes that's the correct tool, but your where clause is incorrect ToDate is not being referenced correctly. Read the help for this tool and explore the samples to understand how to build the clause correctly.
... View more
11-09-2023
07:57 AM
|
0
|
0
|
2496
|
|
POST
|
You are using the wrong Select tool, you want to be using the Select by Attributes tool.
... View more
11-09-2023
06:23 AM
|
0
|
2
|
2503
|
|
POST
|
I can't replicate your problem so it suggests there is another issue. May be data type or default settings? When I run extract by mask from a python command line it works as expected.
... View more
11-09-2023
06:21 AM
|
0
|
0
|
1164
|
|
IDEA
|
I wonder rather than saying null, it's coloured or in italics. I hear what you are saying but seeing null might think I could put a point in when it's a polygon feature class or something daft like that?
... View more
10-28-2023
08:32 AM
|
0
|
0
|
2607
|
|
POST
|
OK, well done for showing your workings and its because you made the effort to show me I can make an educated guess! Your layername is "New_parval_SpatialJoin". The clue is in the name... I'm guessing you have done a spatial join with the new Add Spatial Join tool? Well if you open your attribute table and move your cursor over the Tree_can field header, I'm going to guess its not Tree_can but something like "somelayer_spatial_Join.Tree_can"? Thats the fully qualified field name of the field because its a joined field. So what you see is what you need to use in your cursors.
... View more
10-27-2023
05:05 PM
|
0
|
1
|
1960
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 2 weeks ago | |
| 1 | 12-03-2025 04:30 PM | |
| 1 | 12-03-2025 04:06 PM | |
| 1 | 12-03-2025 04:17 PM | |
| 1 | 12-02-2025 07:05 AM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|