|
POST
|
Just checked it out, Dan. I get Lawrence's exact error message by leaving the variable name inside the where clause:
>>> val = 580
>>> C = arcpy.sa.Con("block_dem_1m.tif","block_dem_1m.tif","","VALUE > val")
... but not like so:
>>> C = arcpy.sa.Con("block_dem_1m.tif","block_dem_1m.tif","","VALUE > " + str(val))
The above is a floating raster, with no table.
... View more
08-27-2014
09:51 AM
|
2
|
4
|
3277
|
|
POST
|
Your statement: C01 = Con("M0","M0","","VALUE >= fb") should be: C01 = Con("M0","M0","","VALUE >= " + str(fb)) and similarly for the second Con statement.
... View more
08-26-2014
04:32 PM
|
3
|
1
|
2639
|
|
POST
|
The short answer is: yes. Use the CSV module: read a line from the CSV and write the line to a text file.
... View more
08-25-2014
01:33 PM
|
0
|
0
|
1310
|
|
POST
|
I get errors: 000210 (Cannot create output), and 000354 (The name contains invalid characters). The field names are fine. I'm not concerned with "the best ways" to name my files (our project numbers contain numbers and hyphens and there's not much I can do about it), I'm curious why some geoprocessing tools treat names as invalid, when they are not (i.e. I can rename the files to contain hyphens and as is well).
... View more
08-22-2014
04:14 PM
|
0
|
2
|
5006
|
|
POST
|
After a little more investigation, I can in fact save the output of Spatial Join starting with a number. I cannot, however, save the output of Spatial Join with a name containing a dash character (our project numbers are like "14-P-575".). The exact file name I would like to use is "14-P-0575_AgCap.shp". After running Spatial Join, naming the file as something like "AgCap.shp", I can then rename the file to "14-P-0575_AgCap.shp". Why does Spatial Join care if the name contains a dash?
... View more
08-22-2014
03:13 PM
|
0
|
6
|
5006
|
|
POST
|
Why is it that some (possibly most?) geoprocessing tools do not allow output shapefile names to start with a number (for example, Dissolve and Spatial Join), while others do (for example, Rename)? Also, why can you start a shapefile name with a number while exporting data (Data -> Export Data)? It does not seem to be a shapefile limitation, it seems to be a individual geoprocessing tool "check". I ask because my organization's project numbers (surprise!) start with numbers, and it would make sense to start file names with the project number. Message was edited by: Darren Wiens
*This thread started off wondering why file names could not start with numbers, but it turns out they can.
... View more
08-22-2014
02:26 PM
|
0
|
8
|
7317
|
|
POST
|
To get city (assuming no city names contain a comma):
!address!.split(",")[0]
To get state:
!address!.split(",")[1].split(" ")[1]
To get zip:
!address!.split(",")[1].split(" ")[2]
There may be some special cases where this doesn't work, depending on your data. This works for data like: "CityName"[comma][space]"State"[space]"Zip"
... View more
08-21-2014
12:46 PM
|
1
|
1
|
1401
|
|
POST
|
Just to add, you can avoid doing the math by hand using arcpy's PointGeomtry objects and distanceTo().
def CalculateDistance(shape):
return arcpy.PointGeometry(shape.firstPoint).distanceTo(arcpy.PointGeometry(shape.lastPoint))
... View more
08-21-2014
11:16 AM
|
2
|
0
|
5550
|
|
POST
|
Can you expand on what you're asking? Do you have a graphic line that you want to view as an elevation profile, or something different entirely?
... View more
08-21-2014
10:48 AM
|
0
|
0
|
1466
|
|
POST
|
You should choose a projection based on: 1.) your study area location, and 2.) what you are interested in measuring (distances, areas, or angles). Projections either preserve distance, area, or angle (or compromise to lessen all three distortions, but fully preserve none), so choose a projection that preserves what you are interested in, in your case distance. The smaller your study area is, the less dramatic the effect of distortion, so in your case you may never notice the effect of choosing an inappropriate projection. The farther your study area is from the projection's "sweet-spot," the more dramatic the effect on your measurements will be, so choose a projection suitable for Bimini, like UTM zone 17 as Robert suggests. As for units, you can directly calculate miles from meters (meters * 0.000621371). You were seeing widely incorrect numbers using WGS84 for distances because it uses degrees. If you're interested, you can go here to see the effect of trying to measure distances on an unprojected surface. All circles are 500km in radius.
... View more
08-20-2014
05:10 PM
|
1
|
0
|
1778
|
|
POST
|
West coordinate = KnownX - 0.5*width East coordinate = KnownX + 0.5*width North coordinate = KnownY + 0.5*height South coordinate = KnownY - 0.5*height
... View more
08-18-2014
02:13 PM
|
0
|
2
|
6258
|
|
POST
|
If you really want to get into it, I believe you're looking for "Writing Geometries" using Python, but as Dan indicates this is likely overkill, especially if you are not proficient in Python.
... View more
08-18-2014
01:44 PM
|
0
|
10
|
6258
|
| 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
|