|
POST
|
Does it happen with any mxd you try to open or a specific mxd? You may want to reset your Normal.mxt.
... View more
11-19-2015
06:25 AM
|
1
|
1
|
1085
|
|
POST
|
Rebecca the current tool I have is attached. The code definitely works and does the same thing that Darren's code does, but it is not as compact as his code. I'm definitely going to update the tool to incorporate his more concise coding. Anyway, the tool generates perpendicular cross sections and also ensures that all cross sections are pointing from left to right looking downstream. On another note, I hope this kills two birds with one stone, but we have not heard from Johannes.
... View more
11-18-2015
09:27 AM
|
0
|
1
|
2186
|
|
POST
|
Are you trying to generate cross sections on a river centerline?
... View more
11-18-2015
06:58 AM
|
0
|
3
|
2186
|
|
POST
|
As Dan asked, we really need to know if you are trying to assign unique id's based on groups. Say if you have 2 polygons in a fishnet and each have a group of points inside each polygon. Would you want the IDs to be something like this: fishnet polygon 1 point id increment: AA01, AA02... etc. fishnet polygon 2 point id increment: AB01, AB02...etc Or are you just looking to assign a unique id for every individual point?
... View more
11-18-2015
06:06 AM
|
0
|
0
|
2468
|
|
POST
|
Could you maybe give us a quick screen grab of an excel sheet that has all the fields you have fully populated as you would like to see them? Maybe a completed example like that will give a better idea of what you are shooting for here.
... View more
11-18-2015
05:39 AM
|
0
|
0
|
2468
|
|
POST
|
Have you tried to capture the error explicitly? import_arcpy = False while import_arcpy == False: try: import arcpy import_arcpy = True except Exception as e: for error in e: if error == 'No module named arcpy': continue Edited: Oh I see in your code that you set arcpy_imported = True first. That way it would never enter your while loop? I think setting it to arcpy_imported = False first would fix your code as you have it.
... View more
11-16-2015
10:10 AM
|
0
|
1
|
1722
|
|
POST
|
I'm not sure if there is a way to set the spatial reference to Unknown using the define projection tool. One thing you can do is use python to delete the .prj file for the shapefile. I'm not sure why you would ever want to do this, but that is one way to go about it.
... View more
11-16-2015
08:37 AM
|
0
|
0
|
3202
|
|
POST
|
Have you tried simply Googling it yet? I got a hit on ArcGIS script errors and a possible solution here: GIS Geek: ArcGIS 10: Script Error After Clicking on Description Tab
... View more
11-16-2015
05:03 AM
|
1
|
1
|
6412
|
|
POST
|
The error indicates there is a problem with your inputs for the select layer by location. You need to generate a layer from the buffer in your script. The select layer by location will only take layer files not output features. #buffer the dissolved Centerlines layer
arcpy.Buffer_analysis ("lyr_dissolved", "buffer", "50 Feet", "", "", "", "")
arcpy.MakeFeatureLayer_management("buffer", "lyr_buffer")
#Delete any centerlines that will not be used
arcpy.SelectLayerByLocation_management("lyr_buffer","INTERSECT","lyr_Segments","","NEW_SELECTION")
... View more
11-13-2015
08:26 AM
|
1
|
0
|
1119
|
|
POST
|
There is absolutely no outlet to the lake so this lake is a natural sink? Could you maybe post a picture of what your watershed looks like and where you are placing your pour point?
... View more
11-13-2015
05:17 AM
|
1
|
0
|
1967
|
|
POST
|
You could try an update cursor like so: import arcpy
getMax = max([row[0] for row in arcpy.da.SearchCursor("TestPoints","FREQUENCY")]) +1
for i in range (getMax):
j = 0
with arcpy.da.UpdateCursor("TestPoints",["FREQUENCY","BuildingNumber"]) as update:
for row in update:
if row[0] == i:
row[1] = j
j += 1
else:
j = 0
update.updateRow(row)
... View more
11-13-2015
04:23 AM
|
3
|
0
|
1298
|
|
POST
|
You do not need to change the line 24. Essentially all you did was change the variable name of the outFocalStatistics to inRaster2. The name in the geodatabase will always be "DEM_mean". However, it looks like you want to treat the "DEM_mean" as intermediate data. In that case just do not save the output of outFocalStatistics like this: Execute FocalStatistics outFocalStatistics = FocalStatistics(inRaster, neighborhood, "MEAN","") Execute Minus outMinus = inRaster - outFocalStatistics Save the output outMinus.save(outRaster) This will always generate outFocalStatistics in memory and automatically delete it. On another note if you were to save the output of outFocalStatistics and want to delete it at the end of your script you would use arcpy.Delete_management(outFocalStatistics). The del function is useful when clearing variables, lists, dictionaries, and the like, but it will not delete output results.
... View more
11-13-2015
03:51 AM
|
1
|
1
|
1628
|
|
POST
|
I would just use Table to Excel and pass it off to them with a friendly 'good luck'.
... View more
11-12-2015
10:53 AM
|
2
|
0
|
687
|
|
POST
|
Here is an edited script. Let us know if you have any questions or if it is still not working for you. If you are planning to run this script from ArcMap and you just want to use the default geodatabase there is no reason to set path = arcpy.env.workspace unless you just want to reference it using the shorter variable name 'path' throughout your script. Otherwise all outputs that do not have a specific path will be saved to the default geodatabase. # Import arcpy module
import os
import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.CheckOutExtension("Spatial")
env.overwriteOutput= True
# Set the input data
inRaster = arcpy.GetParameterAsText(0)
# Set the output data
outRaster = arcpy.GetParameterAsText(1)
neighborhood = NbrRectangle(3, 3, "CELL")
# Check out the ArcGIS Spatial Analyst extension license
# Execute FocalStatistics
outFocalStatistics = FocalStatistics(inRaster, neighborhood, "MEAN","")
# Save the output
outFocalStatistics.save("DEM_mean")
# Execute Minus
outMinus = inRaster - outFocalStatistics
# Save the output
outMinus.save(outRaster)
... View more
11-12-2015
10:06 AM
|
1
|
3
|
6959
|
|
POST
|
Its hard telling not knowing what you are trying to do exactly, but you can set the output as a variable for example: feature = arcpy.CreateFeatureclass_management (env.workspace, "test1","POINT","","","",26919) arcpy.Append_management (inputs, feature, "NO_TEST") Here the new feature class is set to the variable 'feature' and then it can be referenced as feature throughout your script.
... View more
11-12-2015
09:23 AM
|
1
|
5
|
5331
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-26-2016 10:40 AM | |
| 1 | 10-05-2015 09:10 AM | |
| 1 | 01-19-2016 06:01 AM | |
| 1 | 01-06-2016 05:27 AM | |
| 1 | 12-09-2015 05:59 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-01-2024
04:58 PM
|