|
POST
|
You should be aiming for something like this: {
'Rhino1': [(X1, Y1), (X2, Y2), ...],
'Rhino2': [(X1, Y1), (X2, Y2), ...],
...
}
... View more
10-05-2018
03:25 PM
|
1
|
0
|
1614
|
|
POST
|
See example: Examples of inline model variable substitution—Help | ArcGIS for Desktop
... View more
10-05-2018
01:52 PM
|
1
|
2
|
11710
|
|
POST
|
You can add a mask raster function, where all values > 245 are interpreted as NoData: Mask function—ArcGIS Pro | ArcGIS Desktop
... View more
10-04-2018
04:09 PM
|
1
|
1
|
1430
|
|
POST
|
Try specifying the entire path for the input raster, rather than relying on the workspace env. If that doesn't work, try running the tool on its own (outside any loop), hardcoding the values that you think should work, and work backwards from there. Things I see that can make easy mistakes in your code: concatenating path components (should try to use os.path.join), using FGDB rasters, relying on envs, specifying a field that probably doesn't exist, and I'm not sure that FGDB rasters are GRID format (although it seems to be working for you).
... View more
10-04-2018
01:21 PM
|
1
|
0
|
2910
|
|
POST
|
I meant print that in your own script to ensure the values are exactly what you think they should be.
... View more
10-02-2018
02:11 PM
|
0
|
2
|
1050
|
|
POST
|
Can you double-check that you have the final slash on outrasterpath? If it's missing and not being concatenated properly, you could get an extension error: import os
outrasterpath = r"S:/General-Offices-GO-Trans/TEST_RASTERCLIP.gdb"
featureClass = "featureClassName"
path1 = outrasterpath + featureClass
path2 = os.path.join(outrasterpath, featureClass)
print(path1)
print(path2)
S:/General-Offices-GO-Trans/TEST_RASTERCLIP.gdbfeatureClassName
S:/General-Offices-GO-Trans/TEST_RASTERCLIP.gdb/featureClassName Try printing the following in the cursor: print(outrasterpath, featureClass, outrasterpath + featureClass) If you could share the entire script, that may expose more hints, too.
... View more
10-02-2018
01:27 PM
|
0
|
4
|
1050
|
|
POST
|
It seems they're trying to perform raster clip, so this (i.e. management clip) is the correct tool.
... View more
10-02-2018
01:04 PM
|
0
|
9
|
2156
|
|
POST
|
Here's a Python implementation you can tailor to Excel (mostly just need r2, t2, x2, y2). Note the difference between square-rooting the radius (right) and not (left): import matplotlib.pyplot as plt
from matplotlib.patches import Circle
import numpy as np
r1 = np.random.rand(1000)
t1 = np.random.rand(1000) * np.pi * 2.0
x1 = r1 * np.cos(t1)
y1 = r1 * np.sin(t1)
r2 = np.sqrt(np.random.rand(1000))
t2 = np.random.rand(1000) * np.pi * 2.0
x2 = r2 * np.cos(t2)
y2 = r2 * np.sin(t2)
plt.figure(figsize=(8, 4))
ax1 = plt.subplot(121)
circle = Circle((0, 0), 1, facecolor='none',
edgecolor=(0, 0, 0), linewidth=2, alpha=1)
ax1.add_patch(circle)
plt.plot(x1, y1, '.', color=(0, 0, 0), alpha=1)
ax2 = plt.subplot(122)
circle = Circle((0, 0), 1, facecolor='none',
edgecolor=(0, 0, 0), linewidth=2, alpha=1)
ax2.add_patch(circle)
plt.plot(x2, y2, '.', color=(0, 0, 0), alpha=1)
... View more
10-02-2018
11:37 AM
|
0
|
0
|
3492
|
|
POST
|
The error message says output is ".shp" but script says it's ".gdb". Perhaps check script to make it is what you think it is. Other than that, try setting the overwriteOutput environment to True: import os
import arcpy
arcpy.env.overwriteOutput = True
... edit: are you sure this script has ever worked, as written? The second parameter in CopyFeatures should be a feature class, but your script has it as a file geodatabase. See the code samples here for how to use geodatabase feature classes in copy features: Copy Features—Data Management toolbox | ArcGIS Desktop
... View more
09-26-2018
08:54 AM
|
0
|
1
|
1169
|
|
POST
|
Please format your code: /blogs/dan_patterson/2016/08/14/script-formatting See the examples here for how to format calculate field codeblocks: Calculate Field—Help | ArcGIS for Desktop
... View more
09-21-2018
10:50 AM
|
1
|
0
|
1464
|
|
POST
|
Either use raw strings (r'Z:\...') or forward slashes in your paths. I'm guessing nothing triggers the if statement, or possibly nothing is read into walk, at all, because the paths are incorrect.
... View more
09-20-2018
10:22 AM
|
0
|
0
|
887
|
|
POST
|
When you print `polyline`, it shows the correct coordinates? And, CRS is defined in the output feature class (just verify that it actually gets set in the feature class)?
... View more
09-19-2018
04:38 PM
|
0
|
0
|
1672
|
|
POST
|
Is this it? Finding the upstream accumulation—Help | ArcGIS for Desktop It says the total cost of the features is reported in the status bar. Does it do that, and is it the number you want?
... View more
09-19-2018
03:52 PM
|
0
|
0
|
1972
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|