|
POST
|
The first error message is telling you what's wrong. You trying to use a variable materialType, but haven't defined it. You first need a statement like materialType = 'plastic'. I'm also not sure you should have the % sign right next to the variable name - % materialType instead of %materialType. Maybe that's ok. You may want to consider the more recent method of formatting strings: Qry = "Material = {0}".format(materialType)
... View more
06-13-2014
09:56 AM
|
0
|
0
|
1707
|
|
POST
|
DennisJongsomjit;395845 wrote: Thanks for the reply. 9.3 does have a mosaic to new raster tool but I wonder if the 10.2 version is all new. So is it not possible then to save to a folder if you want to end up with ESRI grids? The help says no extension for ESRI grids but also no extension if it's going into a .gdb..../QUOTE] ESRI grids are always in a geodatabase. Regular folders need the file extension. As for whether the tool will work with 9.3, I don't know but arcpy was introduced at 10.0. Never used the older gp method, so can't say what works and what doesn't.
... View more
06-12-2014
10:29 AM
|
0
|
0
|
944
|
|
POST
|
I don't know if 9.3 supports mosaic to new raster, but the help for 10.2 uses two rasters as input. Anyway, since these rasters are coming from and going to a folder rather than a .gdb, they need the file extensions.
... View more
06-12-2014
08:29 AM
|
0
|
0
|
944
|
|
POST
|
Feature to Point would give you a point for each polygon with the polygon attributes, but I take it that's not what you're looking for...
... View more
06-11-2014
10:18 AM
|
0
|
0
|
4406
|
|
POST
|
I don't know either, but you get the same behavior on every field. I put the table in a file gdb, same thing. Added an OID field, same.
... View more
06-11-2014
08:26 AM
|
0
|
0
|
2130
|
|
POST
|
The Align to Edge tool should be on the Topology toolbar, the Align to Shape on the Advanced Editing toolbar. If not, Click the Customize menu, Customize mode, Commands tab. In the Categories pane, click Advanced Edit Tools, then in the Commands pane, drag the Align to Shape command to the toolbar. In the Topology category, do the same for the Align to Edge command.
... View more
06-11-2014
04:48 AM
|
0
|
0
|
2569
|
|
POST
|
It might help to see the Excel file, or a sample of it.
... View more
06-09-2014
03:57 AM
|
0
|
0
|
2130
|
|
POST
|
In the Labels tab, click the Method dropdown and select 'Define classes of features and label each class differently'. Click the SQL Query button and enter [Owner]<> 'Multi'. Make sure to check the box for Label features in this class and you're done.
... View more
06-04-2014
03:29 AM
|
0
|
0
|
813
|
|
POST
|
Thanks Scott, but not working. When I click on the icon in X-Ray to open the LocalGovernment.xml, I get the error in the image below. It wants Excel. [ATTACH=CONFIG]34300[/ATTACH]
... View more
06-03-2014
04:47 AM
|
0
|
0
|
814
|
|
POST
|
Some help here... import arcpy fc = 'yourfeatureclass' strfld = 'yourstringfield' with arcpy.da.SearchCursor(fc, strFld) as cur: for row in cur: valueyouwant = row[0] # do something with valueyouwant
... View more
06-02-2014
04:12 AM
|
1
|
0
|
967
|
|
POST
|
Dissolve it in parts, then dissolve the parts together.
... View more
06-01-2014
09:18 AM
|
1
|
0
|
4998
|
|
POST
|
I would say no, that is not the case based on the following test I just did. Added a text field to a feature class, and ran Asc(005) in Field Calculator. Result was 53. Ran Chr(005) and result was the pipe symbol, |. Entering Chr(007) gives a dot. Etc.
... View more
05-30-2014
08:48 AM
|
0
|
0
|
1232
|
|
POST
|
Though it may be tricky to get all of the auxiliary files if you are using os.rename(), right? I assume that it's not just "raster.tif", but also "raster.tif.xml" and "raster.tfw", or .jpg, etc. If you use the arcpy function, it'll rename all of the associated files at once. Also, if the rasters are stored in a fGDB or something, I don't there's anyway you'd be able to access them with the os module. It all depends on how/where they are stored. I've never used it before, but the Rename function that I linked to above looks super useful. You may be right. I've used os.rename on rasters, but using os.listdir(). Rename in your link does look promising.
... View more
05-29-2014
07:19 AM
|
0
|
0
|
1122
|
|
POST
|
If you're importing os anyway, you can also use os.rename() rather than copying the raster. Rest is what James & Adam wrote about getting the name correctly.
for ras in arcpy.ListRasters():
if ras.lower.endswith("_pa"):
basename = ras.split("_pa")[0]
newrastername = "pa_" + basename
os.rename(ras, newrastername)
... View more
05-29-2014
07:05 AM
|
0
|
0
|
4402
|
| Title | Kudos | Posted |
|---|---|---|
| 6 | 08-22-2019 07:41 AM | |
| 1 | 05-05-2014 04:30 AM | |
| 1 | 08-15-2018 06:23 AM | |
| 3 | 08-06-2018 07:31 AM | |
| 1 | 03-30-2012 08:38 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-12-2021
01:00 PM
|