POST
|
I'm using Arcgis 9.3. Our license manager is located on our network, and we have a floating ArcINFO license. I'm doing a CPU intensive operation on hundreds of files, so I'm using the Python 2.5 backport of the multiprocessing module to run several processes concurrently to speed things up. I've got it working except for one thing. When I make the child processes, they each are instructed to load the toolboxes. Unfortunately, if I run things that simply (instantiate each process, let it load the toolbox), the toolboxes take forever to load (and may never load, but I haven't waited more than a couple of minutes). The way I fixed it was by having the process "sleep" for variable periods of time (process one executes immediately, process two waits for 4 seconds...). I'm guessing this is an issue with the license manager, but I'm not sure how to confirm that. Has anyone else encountered this issue? Do you know why it is, or another way to avoid it?
... View more
01-27-2012
09:41 AM
|
0
|
1
|
566
|
POST
|
Jeremy, Thank you! That worked perfectly. I did not have to make the second shapefile into a layer; I just fixed the syntax of my CalculateField call and it went off without a hitch. This saves me so much clicking! Daniel
... View more
01-06-2012
07:09 AM
|
0
|
0
|
466
|
POST
|
Hiyo, I'm just getting started with Esri's geoprocessing tools and I've got a fairly basic question. I'm trying to copy the value from a field in one shapefile to another shapefile. The field already exists in both shapefiles. I've tried a couple of approaches. My first approach was to
#Make first shapefile into a feature layer so join will work
gp.MakeFeatureLayer_management(shapefile_one_path, shapefile_one_name)
# Join the Shapefiles
gp.AddJoin_management(shapefile_one_name, join_field, shapefile_two_name, join_field, "KEEP_COMMON")
# Then I write the new joined table to disk so I can run calculate field on it.
gp.Select_analysis(shapefile_one_name, "joined_shapefile.shp", "") Unfortunately, this approach dorked up all of column names. Next, I tried to update the column on the joined table:
#Make first shapefile into a feature layer so join will work
gp.MakeFeatureLayer_management(shapefile_one_path, shapefile_one_name)
# Join the Shapefiles
gp.AddJoin_management(shapefile_one_name, join_field, shapefile_two_name, join_field, "KEEP_COMMON")
# Calculate field...?
gp.CalculateField_management(shapefile_one_name, "field_to_update", "field_to_copy") This resulted in a "general function failure." Anybody have any tips?
... View more
01-06-2012
05:46 AM
|
0
|
3
|
4263
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|