|
POST
|
To be clear, your files don't have to have the SAME coordinate system, each file must have the PROPER coordinate system (whether they're the same or different from each other). Your buffers look funny because Geographic NAD 1983 is not a projected coordinate system (it's geographic, like lat/long). Once you figure out the proper coordinate system(s) for your files, Project to a projected coordinate system, then buffer.
... View more
04-13-2012
12:31 PM
|
0
|
0
|
1296
|
|
POST
|
Python uses indentation (at least two spaces) to delineate special blocks of code (loops [for, while], decisions [if/then/else], functions, etc.). The script you copied from the thread was posted without following Curtis Price's handy-dandy How to Post Python Code, which preserves the proper indentation needed to run the script. Take a look at that post for an example of indenting try/except blocks.
... View more
04-13-2012
11:34 AM
|
0
|
0
|
2408
|
|
POST
|
Possibly Intersect...? It will split Layer B by Layer A, although you'll lose areas in Layer B that don't overlap with Layer A.
... View more
04-13-2012
09:05 AM
|
0
|
0
|
1256
|
|
POST
|
1.) Calculate a new field to hold the starting area of each polygon in Layer B 2.) Use the Identity tool (requires ArcInfo) to split the polygons in Layer B by the borders in Layer A 3.) Calculate a new field to get the percentage of each divided polygon 4.) Select based on the percentages, then Export to a new layer and Dissolve the pieces back together
... View more
04-13-2012
08:58 AM
|
0
|
0
|
1256
|
|
POST
|
You need to specify the appropriate coordinate system for each file - ArcMap will reproject them into the Data Frame's coordinate system on-the-fly. If they both claim to be in NAD_1983_StatePlane_Washington_South_FIPS_4602 and they don't line up, one of them is lying.
... View more
04-13-2012
08:48 AM
|
0
|
0
|
1296
|
|
POST
|
Wow, I just googled "arcgis topoengine error" and the proposed fixes are numerous ranging from "it's a bug" to "it's a hardware problem" to "convert to [insert data format here]" to "ArcGIS just doesn't work nicely with some huge datasets". I suggest trying the easiest first: convert to shapefiles and cross your fingers. Sometimes if your gdb feature classes have fancy geometries they cause problems. Since shapefiles use simpler geometries, sometimes they work when gdbfeature classes don't.
... View more
04-12-2012
08:25 AM
|
0
|
0
|
6479
|
|
POST
|
for lyr in arcpy.mapping.ListLayers (mxd, "file" , arcpy.mapping.ListDataFrames (mxd) [0]):
The above line means, "list all of the layers named 'file' from the first data frame in the map, 'mxd' ". Change 'file' to be the name of your layer in the map.
... View more
04-11-2012
12:53 PM
|
0
|
0
|
1678
|
|
POST
|
OK, this problem was frustrating me so I actually tried it. Here's a copy that works for my mxd named "junk" and a file named "file". Change as appropriate. import arcpy
mxd = arcpy.mapping.MapDocument(r"H:\GIS_Data\junk.mxd")
fields = arcpy.ListFields(r"H:\GIS_Data\TEMP.gdb\file", None , "SmallInteger")
for field in fields:
for lyr in arcpy.mapping.ListLayers(mxd, "file", arcpy.mapping.ListDataFrames(mxd)[0]):
arcpy.SelectLayerByAttribute_management (lyr, "NEW_SELECTION", '"' + field.name + '" > 0')
arcpy.mapping.ExportToJPEG(mxd, r"H:\GIS_Data\map_" + field.name + ".jpg")
arcpy.SelectLayerByAttribute_management (lyr, "CLEAR_SELECTION")
... View more
04-11-2012
09:32 AM
|
0
|
0
|
1678
|
|
POST
|
Your where statement must be entirely enclosed in single quotes. Your field name must be enclosed in double quotes. ' " ' + str(field) + ' " > 0 ' Also, reference the layer in your map ("counties_edited_datamergetest"), not the .lyr file.
... View more
04-11-2012
08:53 AM
|
0
|
0
|
1678
|
|
POST
|
Do you have a file called "Percorsi.shp"? In the folder "C:/Users/a391665/Documents/AAAAPERSONALE/rugareto"? Also, after you import os, check if the gdb exists. If it does, delete it. if os.path.exists("c:/park/test4.gdb"):
arcpy.Delete_management("c:/park/test4.gdb")
... View more
04-11-2012
08:43 AM
|
0
|
0
|
2861
|
|
POST
|
What does the error say (if any)? It shouldn't have anything to do with your licenses, both tools you use are available to ArcView. edit: maybe try: arcpy.CopyFeatures_management(shapefile, outWorkspace + os.sep + shapefile.rstrip(".shp"))
... View more
04-11-2012
08:15 AM
|
0
|
0
|
2862
|
|
POST
|
I tried your code with the same result (it didn't work when setting the workspace environment). I don't have any explanation, perhaps someone from ESRI can speak to this. You can fake a workspace environment with the following (it's basically just using the whole path): import arcpy
import arcpy.mapping
workspace = "d:\\test\\"
arcpy.env.overwriteOutput = True
try:
arcpy.FloatToRaster_conversion(
workspace + "p4605430.flt",
workspace + "p4605430.tif")
except:
print arcpy.GetMessages()
... View more
04-11-2012
08:03 AM
|
0
|
0
|
2590
|
|
POST
|
You need another exclamation mark around the field name. I'm a little bit surprised that it ran at all. It may be interpretting the one exclamation as "if HEIGHT_MM does not exist". HEIGHT_MM= func(!HEIGHT_MM!)
... View more
04-10-2012
11:14 AM
|
0
|
0
|
761
|
|
POST
|
I'm almost positive your workspace can't be an mxd. Also, this line needs to have matching quotes, and just "species", like so: arcpy.mapping.ExportToJPEG(mxd, r"P:\CoWetlandTools\maps\" + species + ".jpg")
... View more
04-05-2012
02:22 PM
|
0
|
0
|
2135
|
|
POST
|
Are the fields actually numeric (integer, float, double) or text? You can check in the field properties. They should be a numeric data type. Also, try putting "print species" (no quotes) as the first line in your loop just to make sure it's bringing in the right name.
... View more
04-05-2012
01:53 PM
|
0
|
0
|
2135
|
| 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
|