|
POST
|
Hello mzcoyle, I tried your code for batch processing of ASCII to Raster. It works but I got one problem. How do I rename ASCII files or output Raster files, cause my ASCII files have more than 13 characters? To change the output name you could do something like this. Changing the output to only take the first 13 characters of the input file name. If you want it to be more dynamic, splitting on a specific string etc then you could incorporate that also. At that point I would probably create an output raster variable to create the name. gp.ASCIIToRaster_conversion(os.path.join(inDir, InAsciiFile), os.path.join(OutRaster, InAsciiFile.rsplit(".")[0][:13]), "FLOAT")
... View more
10-29-2012
05:27 AM
|
0
|
0
|
4806
|
|
POST
|
Okay - great. What "ArcTools" if any are you using to do that? I am using Calculate Field and writing an Expression saying to take this field from the table to put it into this field inside the feature class. For each field to do all 9600 features it takes a good 15 to 20 minutes. Is there something I am not doing right? I posted the essence of my solution in the linked thread below to calculate a few of the fields. http://forums.arcgis.com/threads/55099-Update-cursor-with-joined-tables-work-around-w-dictionaries
... View more
10-25-2012
12:50 PM
|
0
|
0
|
2723
|
|
POST
|
My Service_Location feature class has around 9600 features Unless you are calculating pi to 1000 decimal places for each row that should be a matter of seconds, not hours. I have a script that takes 2 hours that calculates 17 fields for nearly 1 million features. Post your code and I'm sure someone will be able to figure out where the problem is. da.updatecursor vs non-da cursor???????? This is a new method of accessing data using cursors in 10.1. If you are on 10.0 you don't need to worry about it as only regular cursors are available.
... View more
10-25-2012
12:34 PM
|
0
|
0
|
2723
|
|
POST
|
You need to define an editor in the Geoprocessing Options. See my attached image. Even then the edit option should be available though. Do you have a standard ArcGIS install or custom?
... View more
10-24-2012
08:00 AM
|
0
|
0
|
1375
|
|
POST
|
Hi, Two years on - I have the same problem! Any calculation with Python gives me the error msg: Python Not Installed. Both ArcGIS 10 and Python are installed in C:/Program Files (x86). However I am on a network computer, and do not have a 😧 Drive! Would anybody know how I find out where ArcGIS 10 looks for Python on my computer, so I can copy-paste my Python folder there? Thanks! Sid. This should let you know where the system paths are pointing. sys.path Did you follow the instructions in the linked forum posts to resolve the issue? Are you on the latest service pack?
... View more
10-24-2012
06:35 AM
|
0
|
0
|
3743
|
|
POST
|
It's hard to tell what is going on without the entire code you are running and the environment you are running in. If you are attempting to reconcile without posting your version is probably staying locked from deleting, but it should let the reconcile finish. Do you have the dataset open in an instance of ArcMap or Catalog?
... View more
10-24-2012
05:53 AM
|
0
|
0
|
1560
|
|
POST
|
Hello, I reduced the number of points and it seems to work. I now need to work out the best way to populate the sort field for creating the line features in a meaningful manner. Thanks! -Joe If you don't already have an ID or time of collection field populated it will be difficult to create one, depending on the complexity and size of your dataset.
... View more
10-23-2012
12:54 PM
|
0
|
0
|
3963
|
|
POST
|
Hello, First and foremost, thanks for the replies! I am attempting to use the script tool directly, by doubleclicking the tool in the toolbox and filling in the form interface as seen in this image: [ATTACH=CONFIG]18649[/ATTACH] I am assuming that the "Line Field" values would be used to differentiate which points are to participate in generating which individual resulting line segments, and that the "Sort Field" would be used to order the verticies of the line to be generated. Please correct my assumptions if this is not the case. There are 4550 points in the point feature class that are stored in a fGDB. I shall try other methods of using the script tool for now and in the meantime, could someone let me know what attributes are needed in the table to create lines from points using this script tool? Thanks, -Joe I would attempt to create it first using only the required fields to narrow down your issues. Leave the optional parameters blank. Also check to see if you have any multipoint features.
... View more
10-23-2012
08:39 AM
|
0
|
0
|
3963
|
|
POST
|
One of the issues with points2line is it uses the 9.3 geoprocessor which leads to some problems. I updated the version for 10 and added some functionality for max line connection, you can read the thread here. It's not perfect but I've never had an issue with it for my needs. http://forums.arcgis.com/threads/58371-Points-to-Line-modification-v10
... View more
10-23-2012
06:54 AM
|
0
|
0
|
3963
|
|
POST
|
What version/SP of ArcGIS are you running? Do you start a new line in your python window after you've added the new raster?
... View more
10-22-2012
07:58 PM
|
0
|
0
|
2301
|
|
POST
|
Are you running this as a tool by itself, part of a model or script? Does it crash immediately or does it process for a while? Can you post the point feature class you are executing this tool on?
... View more
10-22-2012
07:40 PM
|
0
|
0
|
3963
|
|
POST
|
Here is how I delete fields in 10.0. You have pretty much everything done already for 9.3.1. dropFields = list() fieldList = arcpy.ListFields(block_out) keep_list = ["OBJECTID", "OID", "Geometry", "O_OID", "SOURCEID"] for f in fieldList: if f.name not in keep_list and f.type not in keep_list: dropFields.append(f.name) arcpy.DeleteField_management(block_out, dropFields)
... View more
10-22-2012
08:07 AM
|
0
|
0
|
1671
|
|
POST
|
What version of ArcGIS are you running? You also need to specify what field you want to delete. gp.deletefield_management(inputFc, field.name)
... View more
10-22-2012
07:40 AM
|
0
|
0
|
1671
|
|
POST
|
You seem to be printing the same variable twice. Is this intentional or did you mean to print OutsideBuffRcdCnt the second time?
while x <= n:
# Select wells that have not been added to a group (i.e., where flag = 0)...
arcpy.SelectLayerByAttribute_management("InputLyr","NEW_SELECTION",'"BuffSelFlg" = 0')
RcdCnt = int(arcpy.GetCount_management("InputLyr").getOutput(0))
print "Record Count where flag is zero =", RcdCnt
if RcdCnt > 0: # (i.e., if there are wells that have not been added to any group...)
# Remove (from selection) wells within the current group's buffers...
arcpy.SelectLayerByLocation_management("InputLyr","INTERSECT",CmbdBuffs,"","REMOVE_FROM_SELECTION")
OutsideBuffRcdCnt = int(arcpy.GetCount_management("InputLyr").getOutput(0))
print "Record Count where flag is zero and wells are outside buffers =", RcdCnt
... View more
10-22-2012
07:25 AM
|
0
|
0
|
1716
|
|
POST
|
I am pretty sure that is working as intended. I certainly hope extracting a password from a connection file wouldn't be that easy.
... View more
10-11-2012
02:01 PM
|
0
|
0
|
832
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-17-2011 10:36 AM | |
| 1 | 08-16-2012 10:48 AM | |
| 1 | 10-31-2012 08:39 AM | |
| 1 | 07-16-2012 01:52 PM | |
| 1 | 03-15-2012 10:57 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-22-2024
11:12 PM
|