POST
|
I am try to make concurrent connections to the my SQL Server SDE using arcpy and multiprocessing libraries When the number of working is large i.e. 16 , I got this error: ERROR 000229: Cannot open GeoDB.sde/GeoDB.dbo.Layer1 while the code works fine if I am using small number of workers i.e. 4 or just without multiprocessing Here is the simple code that successfully run without multiprocessing arcpy.MakeFeatureLayer_management("GeoDB.sde/GeoDB.dbo.Layer1", "mylayer","status = 1") here is the code with multiprocessing def exe_task(layer_name): arcpy.MakeFeatureLayer_management("GeoDB.sde/GeoDB.dbo.Layer1", layer_name,"status = 1") return True from multiprocessing import Pool import arcpy if __name__ == "__main__": number_of_workers = 4 p = Pool(number_of_workers) tasks = ["layer1","layer2","layer3","layer4"] result = p.map(exe_task, tasks) p.close() p.join() print(result) This is just a sample code to show the problem, if the number of workers 4 it works fine, if it is large like 16 it gives the error above. (also you need to increase the tasks number equal to workers numbers) is there any configuration on arcpy or sde to fix this problem?
... View more
10-10-2019
12:35 PM
|
0
|
0
|
258
|
POST
|
I am using arcpy CopyFeatures_management to copy feature class from database to in_memory The source feature class has 50 columns, I want to copy only 5 columns I don't want to loop of the copied feature class and delete the remaining 45 columns one by one is there a faster and easier way to copy subset of the columns to the new destination? Thanks!
... View more
07-03-2019
11:12 AM
|
0
|
1
|
714
|
POST
|
I am running 2 Python processes and using arcpy in both of them. I created an in_memory feature class in one process and I want to access it from the other process without saving it to shp file or GDB Is there anyway to share the in_memory feature class across different python processes, or even return it as an object from one function to another? Thanks
... View more
05-10-2019
01:02 PM
|
0
|
1
|
338
|
POST
|
Hi, I have a Polygon and a Polyline layers, I want to join them spatially (using the spatial join tool) only if 1 mile or more of the line is inside the polygon is there a spatial relationship can help me to define this join condition? Thanks
... View more
10-21-2018
11:32 AM
|
0
|
1
|
572
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|