POST
|
Thanks for answer, I will do what you say, I going to study my script until solve it 😃
... View more
06-16-2017
06:33 PM
|
0
|
0
|
736
|
POST
|
Thank a lot for answer, I did what you said but I get another error I don't understand what exactly means import arcpy from arcpy import env arcpy.env.workspace = r'D:\\SedesolVQB\\Salida\\' arcpy.env.overwriteOutput = True Ruta1_entrada = r'D:\\SedesolVQB\\' Shp1 = 'n_loctdico_0417_09_.shp' #<---Shp multipoint Shp1_entrada = Ruta1_entrada + Shp1 Ruta2_entrada = r'D:\\SedesolVQB\\' Shp2 = 'Areas_intersectan.shp' #<----Shp Polygon Shp2_entrada = Ruta2_entrada + Shp2 Ruta3_salida = r'D:\\SedesolVQB\\Resultado_final\\' Shp_final = 'Resultado_fina.shp' Resultado_final = Ruta3_salida +Shp_final #Convert to layer arcpy.MakeFeatureLayer_management(Shp1_entrada,"Tiendas.lyr") #Select by location arcpy.SelectLayerByLocation_management("Tiendas.lyr","INTERSECT",Shp2_entrada, "","NEW_SELECTION") Num_seleccionados = arcpy.GetCount_management(Shp1) print "Puntos seleccionados: " + str(Num_seleccionados) #Export selection arcpy.FeatureClassToFeatureClass_conversion(Shp1,Ruta3_salida, Rusultado_final) File "D:\SedesolVQB\Proyectos\proyecto_MODELBUILDER_DGAAE\Selectbylocation.py", line 14, in <module> arcpy.env.workspace = r'D:\\SedesolVQB\\Salida\\' AttributeError: 'str' object has no attribute 'workspace'
... View more
06-16-2017
05:54 PM
|
0
|
1
|
736
|
POST
|
Hi every one I need some help!! I want to intersect a few shapefile multipoint with other shapefile polygon, and the selection points intersected I need to export to shapefile with diferent name, but I get a nasty error. Somebody can help me to fix the problem? This my script: import arcpy from arcpy import env arcpy.env.overwriteOutput = True Ruta1_entrada = r'D:\\SedesolVQB\\' Shp1 = 'n_loctdico_0417_09_.shp' #<---Shp multipoint Shp1_entrada = Ruta1_entrada + Shp1 Ruta2_entrada = r'D:\\SedesolVQB\\' Shp2 = 'Areas_intersectan.shp' #<----Shp Polygon Shp2_entrada = Ruta2_entrada + Shp2 Ruta3_salida = r'D:\\SedesolVQB\\Resultado_final\\' Shp_final = 'Resultado_fina.shp' Resultado_final = Ruta3_salida +Shp_final #Convert to layer arcpy.MakeFeatureLayer_management(Shp1_entrada,"Tiendas.lyr") #Select by location arcpy.SelectLayerByLocation_management("Tiendas.lyr","INTERSECT",Shp2_entrada, "","NEW_SELECTION") Num_seleccionados = arcpy.GetCount_management(Shp1) print "Puntos seleccionados: " + str(Num_seleccionados) However, I get the next error message: Traceback (most recent call last): File "<string>", line 254, in run_nodebug File "D:\SedesolVQB\Proyectos\proyecto_MODELBUILDER_DGAAE\Selectbylocation.py", line 14, in <module> arcpy.env.overwriteOutput = True AttributeError: 'str' object has no attribute 'overwriteOutput
... View more
06-16-2017
04:25 PM
|
0
|
5
|
1643
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|