|
POST
|
Gina Brewer-Mills I would be remiss if I didn't provide a numpy lesson import numpy as np
from numpy.lib.recfunctions import structured_to_unstructured as stu
from arcpy.da import FeatureClassToNumPyArray
f0 = r"C:\Git_Dan\npgeom\Project_npg\npgeom.gdb\Polygons2"
f1 = r"C:\Git_Dan\npgeom\Project_npg\tests.gdb\sq"
a0 = stu(FeatureClassToNumPyArray(f0, ["SHAPE@X", "SHAPE@Y"], explode_to_points=True))
a1 = stu(FeatureClassToNumPyArray(f1, ["SHAPE@X", "SHAPE@Y"], explode_to_points=True))
a01 = np.concatenate((a0, a1), axis=0)
min_xy = np.min(a01, axis=0)
max_xy = np.max(a01, axis=0)
min_xy, max_xy
(array([ 300000.0, 5000000.0]), array([ 300025.0, 5000018.0]))
... View more
07-09-2020
02:05 PM
|
1
|
0
|
1151
|
|
POST
|
Use Envelope in Minimum Bounding Geometry—Data Management toolbox | Documentation on both the points and poly* features to get both their extents, then use Append—Data Management toolbox | Documentation on both the Envelop files and finally do a Minimum bounding Geometry Envelope on the resultant. Add Geometry Attributes—Data Management toolbox | Documentation to that file to get the extent coordinates
... View more
07-09-2020
11:01 AM
|
0
|
0
|
1151
|
|
POST
|
!NADR_ID! if !NADR_ID! in !ABOVE! else None try the 'in' operator
... View more
07-09-2020
02:20 AM
|
1
|
0
|
3330
|
|
POST
|
Duplicate of https://community.esri.com/thread/256374-searchcursor
... View more
07-09-2020
01:57 AM
|
0
|
0
|
1001
|
|
POST
|
Why do you need a search cursor? you can use the field calculator for that python parser !NADR_ID! if !NADR_ID! == !ABOVE! else None
... View more
07-09-2020
01:55 AM
|
1
|
0
|
1107
|
|
POST
|
Brought up an old thread perhaps closely related https://community.esri.com/thread/219411-how-to-count-the-adjacent-cells-that-have-a-different-value-in-a-raster-dataset
... View more
07-08-2020
11:45 PM
|
0
|
0
|
1476
|
|
POST
|
Rachel ... when you mean 'adjacent' to you mean within 1 cell? 2 cells? adjecent-ish? In that case I would use the Expand tool on the 'pink' and effectively buffer them, then use combine as before except exclude those cases that are denoted as 1, nodata from above. I think you will have corner cases in any event. Addendum I would also have a look at the Generalization toolset to prepare input rasters first. Some combination of the tools in there and a combine (perhaps) might get you close How Aggregate works—Help | Documentation Boundary Clean—Help | Documentation did you look at this? Majority Filter—Help | Documentation did you try it? How about a focal variety? Focal Statistics—Help | Documentation The list goes on, some things working in some areas and not in others
... View more
07-08-2020
11:03 PM
|
0
|
1
|
1476
|
|
POST
|
several ways, but Combine will give you some flexibility Combine—Help | Documentation It will produce the unique combinations of the inputs, and you can query the output accordingly purple pink 1 1 1 nodata nodata 1 nodata nodata so you are interested in the first two classes from the resultant
... View more
07-08-2020
07:13 PM
|
0
|
0
|
1476
|
|
POST
|
John Brand were you always using python 3 when it worked? (changes occurred from python 2.7 into 3 and onward)
... View more
07-08-2020
07:46 AM
|
0
|
1
|
5092
|
|
POST
|
Clip Raster—Data Management toolbox | Documentation would be a start
... View more
07-08-2020
02:25 AM
|
0
|
0
|
1351
|
|
POST
|
returns a result in both python and notebook windows when set to False in my example
... View more
07-07-2020
03:55 PM
|
2
|
3
|
2199
|
|
POST
|
Calculate Field—Data Management toolbox | Documentation has an example of a code block with if-else-then
... View more
07-07-2020
03:23 PM
|
1
|
0
|
505
|
|
POST
|
Oh yeah... you can't use python 3.7. arcgisscripting is compiled against 3.6.10. I already inquired about this on Beta and was told 'not this time'. The good news is, 3.8 may be the default version by next year since 3.6, 3.7 and 3.8 are the python versions on Anaconda. By next year, 3.6 will roll off and 3.9 will be added
... View more
07-07-2020
12:19 PM
|
1
|
1
|
4952
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Sunday | |
| 1 | a week ago | |
| 1 | a week ago | |
| 1 | Friday | |
| 1 | a week ago |