POST
|
Excellent !! I think it works perfectly Thank you very much to all the people who have helped me, especially @Dan Patterson. This is a problem that I had in my workflow and that saved me a lot of work. So far I was doing the process manually. Thank you!!
... View more
07-25-2018
02:16 AM
|
0
|
1
|
480
|
POST
|
Hi @Dan Patterson. I think that the script does not generate errors. I think it performs the same process with all the layers (190). The problem is that since the output file has a unique name "fc_lyr", all the files are rewritten and at the end there is a single file instead of 190. How could I do it to keep the original name files + a sequence so that it does not overwrite? Thank you very much
... View more
07-25-2018
01:51 AM
|
0
|
3
|
480
|
POST
|
@Neil Ayres @Dan Patterson I use spaces, I did not that are so important in python, sorry. I think that know is correct but i have a new error,
... View more
07-25-2018
01:01 AM
|
0
|
5
|
480
|
POST
|
Hi @Dan Patterson I think understand you: import arcpy from arcpy import env env.overwriteOutput = True import os arcpy.env.workspace = r"E:\PLANFOR\PD_G000053VA_N\Carto\A_Monre\Tipos_masa\Prueba_subrodal\Rodales_tipmas.gdb" fcs = arcpy.ListFeatureClasses() out_folder = r"E:\PLANFOR\PD_G000053VA_N\Carto\A_Monre\Tipos_masa\Prueba_subrodal\Salida" for fc in fcs: arcpy.MakeFeatureLayer_management(fc,"fc_lyr") arcpy.SelectLayerByAttribute_management(fc_lyr, "NEW_SELECTION", "\"Superfic_1\" <= 3") out_name = "{}\\{}_elim.shp".format(out_folder, fc_lyr) arcpy.Eliminate_management(fc_lyr, out_name, "LENGTH", "", "") But I have a error. I do not find it. Do you see it? Thank you very much
... View more
07-25-2018
12:01 AM
|
0
|
2
|
480
|
POST
|
Hi @Xander Bakker ye, I would tried to find the same result but with diferent methodology Next time i will not it Thank you.
... View more
07-24-2018
05:30 AM
|
1
|
0
|
371
|
POST
|
Dan Patterson thank you very much. I did it: import arcpy from arcpy import env env.overwriteOutput = True import os arcpy.env.workspace = r"E:\PLANFOR\PD_G000053VA_N\Carto\A_Monre\Tipos_masa\Prueba_subrodal\Rodales_tipmas.gdb" fcs = arcpy.ListFeatureClasses() out_folder = r"E:\PLANFOR\PD_G000053VA_N\Carto\A_Monre\Tipos_masa\Prueba_subrodal\Salida" for fc in fcs: out_name = "{}\\{}_elim.shp".format(out_folder, fc) arcpy.SelectLayerByAttribute_management(fc, "NEW_SELECTION", "\"Superfic_1\" <= 3") arcpy.Eliminate_management(fc, out_name, "LENGTH", "", "") but it is there an error: I do not know why.
... View more
07-24-2018
04:16 AM
|
0
|
6
|
757
|
POST
|
@Joshua Bixby I tried to do it: In the iterate feature selection, from a polygom shapefile that have all regions and cities, ArcGis select by fields Region and City (190 combinations), but in the next step "Select Layer by Attribute" selects all rows without taking into account Region and City, so result is not correct. The model generates 190 layers (names by region and city) with the same records
... View more
07-24-2018
03:11 AM
|
0
|
2
|
3117
|
POST
|
I tried to do it in model builder but unsuccessfully. I can not connect file.shp with select layer by attribute...
... View more
07-24-2018
02:23 AM
|
0
|
0
|
757
|
POST
|
Dan Patterson That is I want to do with 190 files. I did with one shp example, its name is "Rod_inter_Masa_156_16.shp" I want select polygons ❤️ ha, them use eliminate tool, by merging them with neighboring polygons that have the largest area or the longest shared border and finally save the result in a folder. Doy you know how can I automate it? Thank you # Import arcpy module import arcpy # Local variables: Rod_inter_Masa_156_16 = "Rod_inter_Masa_156_16" Rod_inter_Masa_156_16__2_ = "Rod_inter_Masa_156_16" Rod_inter_Masa_156_16_Elimin = "C:\\Users\\info\\Documents\\ArcGIS\\Default.gdb\\Rod_inter_Masa_156_16_Elimin" prueba_shp = "C:\\Prueba_subrodal2\\prueba.shp" # Process: Select Layer By Attribute arcpy.SelectLayerByAttribute_management(Rod_inter_Masa_156_16, "NEW_SELECTION", "\"Superfic_1\" <= 3") # Process: Eliminate arcpy.Eliminate_management(Rod_inter_Masa_156_16__2_, Rod_inter_Masa_156_16_Elimin, "LENGTH", "", "") # Process: Copy Features arcpy.CopyFeatures_management(Rod_inter_Masa_156_16_Elimin, prueba_shp, "", "0", "0", "0")
... View more
07-24-2018
02:18 AM
|
0
|
9
|
757
|
POST
|
Thank you @Dan Patterson, .I tried it with Iterate Files in model builder but i can not connect output with the next step (Selec layer by atribute). I use connect icon but only can use precondition option. How can I upload a screenshot to show you?
... View more
07-24-2018
01:43 AM
|
0
|
11
|
757
|
POST
|
Hi I have 200 shapefile in a folder. all fo them are similar. I need select by atribute and them aply eliminate tool and save the shapes files. Is it possible to do automatically with all the layers from model builder or arcpy? How can I do? thnak you very much
... View more
07-23-2018
03:50 AM
|
0
|
19
|
1447
|
POST
|
Hi @Joshua Bixby Thank you. Yes, i can do it that you talk me, but the problem is that i have 190 cities, so i need repeat the proces 190 times, it is so much time to do it. I would like to find a automatic solution because is a problem that i usually have. Thank you
... View more
07-22-2018
02:43 AM
|
0
|
4
|
3117
|
POST
|
Thanks Joshua Gardner Bixby I tried Modelbuilder with Iterate Feature Selection on region and cities, where ArcGIs select regions and cities iterate form, but them i need select micro polygons there, a second selections to use Eliminate> I could not do it, in the secod selection ArcGis use all polygons. I do not know python, can you help me please? Than you
... View more
07-21-2018
12:22 PM
|
0
|
6
|
3117
|
POST
|
Thanks Mir Hashmi You are right, the cities are inside regions. I do not know python. Could you help me with the script? thank you
... View more
07-21-2018
12:15 PM
|
0
|
0
|
3117
|
POST
|
Hi I have a polygon shapefile classifieds in different regions, and cities inside them. In each city there are many small polygons <2ha, that I'd like to merge to the biggest polygon adjacent to each one of them, as long as these polygons belong to the same city and region. I don't want that polygons neighbors located in different city and region be united. I'm looking for an automatic solution. I tried eliminate tools but ArcGIS does not differentiate the union between cities and regions. Any ideas? thanks
... View more
07-21-2018
12:42 AM
|
0
|
10
|
5254
|
Title | Kudos | Posted |
---|---|---|
1 | 07-24-2018 05:30 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|