POST
|
Blake Terhune yes, we want to export certain OIDs from the whole FC, but that selection is based on the "childs" derived from the "parent" UTM_grid. Childs mean block and its sheets. Am sending you a simplified FC (polygon) we are using for test which already has the attributes we need. FOL_250K is a short name for FOLHA (meaning sheet) and 250K (is the scale). I posted the question replacing FOL_250K by UTM_grid. So consider the real name as you need. https://www.dropbox.com/s/7z6m4rgij3lxlyu/gdb2shp_selected_fields.gdb.zip?dl=0
... View more
04-28-2016
11:19 AM
|
0
|
6
|
17
|
POST
|
My comment was edited to clarify that point, thank you.
... View more
04-28-2016
09:26 AM
|
0
|
0
|
17
|
POST
|
Hi Dan Patterson Blake Terhune Features classes to export are in a SDE geodatabase. We read/list the FCs in that GDB and for each FC we need to process the export of its features by UTM block-sheet into shapefiles. The FC includes a field which identifies the location (as shown in code). e.g. B1SD40B --> breaking down into "block" + "sheet" results in "B1" + "SD40B". Looking at the fields "UTM_grid" and "ObjectID" we check while sheet ( utm_grid[1] ) = " SD40B ", read the corresponding OID, and put the Feature into a Shapefile inside the directory (which has the associated sheet name). The same logic could be used to organize sheets inside the block directories.
... View more
04-26-2016
03:15 AM
|
0
|
3
|
17
|
POST
|
Consider a Feature Class (part of an Enterprise GDB content) and two of its fields are "UTM_grid" and the "OID". Scripting with python 2.7 for ArcGIS 10.3. "UTM_grid" field was broken down into "UTM_block" + "UTM_sheet" and then using a dictionary and list structure UTM_block-->UTM_sheet-->OID was organized with this syntax: { 'UTM_block_1' : { 'UTM_sheet_A' : [ oid_1 , oid_2 ] }, { UTM_sheet_2 : [ oid_3 , oid_4, oid_5 ] } } We need to create **shapefiles** with features (identified by the object value - oid) based on the follow data structure (OIDs will be organized regarding an UTM/location based structure): - UTM_block_* will be a folder - UTM-sheet_* its subfolder. - List of objects (OIDs) will populate the shapefile. --- Another point we have to deal with is that the shapefile should only have some fields of the original Feature Class: We have used fieldmappings and arcpy.FeatureClassToFeatureClass_conversion() to create a non-UTM-organized shapefile from a Feature Class with the fields that we need. --- Now the problem is how to process the **feature export** to get UTM-organized shapefiles! How can we manage it? Bellow is what we have now inside a function: with arcpy.da.SearchCursor(feature_class, ['UTM_grid , 'OBJECTID']) as cursor: dic = dict() for row in cursor: UTM_grid_value = row[0] oid_value = row[1] try: b_s_split = UTM_grid_value.split('_') # split into block & sheet except Exception, e: pass print(UTM_grid_value) print(e) else: # create folders & subfolders (blocks & sheets) in a directory dic.setdefault( b_s_split[0], {} ).setdefault( b_s_split[1], [] ).append( oid_value ) dir_path = os.path.dirname("E:\\") # full path to directory dirs = [ [b_s_split[0]] , [b_s_split[1]] ] for item in itertools.product(*dirs): if not os.path.isdir(os.path.join(dir_path, *item)): os.makedirs(os.path.join(dir_path, *item))
... View more
04-26-2016
02:49 AM
|
0
|
21
|
2846
|
POST
|
Situation: Need to add a Tool to my ModelBuider to Delete only the content from an Enterprise (SDE) Geodatabase (containing features classes, tables, relationship classes). Tool "Delete" (from Toolbox "Data Management") deletes the Geodatabase and only want to delete its content. Any help?
... View more
08-28-2015
07:42 AM
|
0
|
1
|
2297
|
POST
|
Situation: Need to get the attributes/values of a field <COD> from an Attributes Table of a Feature Class (picture attached - attr_table) using another field <COD_SYMB> (which acts as a key-field) of that same Attributes Table? In ArcMap, <COD_SYMB> is the field selected in Layer Properties for the "Value Field" in the Symbology by categories (match to symbols in a style : picture attached - layer_prop). Code values for the symbology are loaded from a S tyle File created a priori (picture attached - style_file). In the Style File ---> field/column "Name" contains the same values of those inserted previously in the field <COD_SYMB> so they can match. In the Layer properties we have then: the field/column "Label" shows the attributes of <COD_SYMB>. And the field/column "Value" contains the color codes ---> <COD_SYMB>. In terms of style symbolization, need to compute a way (function/method) to replace the Label with <COD_SYMB> values by the field <COD> and its values.... I n other words, when values/codes of field <COD_SYMB> are read, a method reads the correspondent values/codes in the field <COD> and returns them as Label field. Any help? I'm working on ArcGIS 10.3. Note: Is there a way to convert the Symbology by Style into UNIQUE_VALUES to apply this: UniqueValuesSymbology—Help | ArcGIS for Desktop ---> desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/uniquevaluessymbology-class.htm ? Message was edited by: Eduardo Abreu-Freire
... View more
08-27-2015
05:12 AM
|
0
|
0
|
2544
|
POST
|
Actually GDB (SDE) was not empty in terms of domains (did right-click on connection.sde and checked domains). After run a script to delete GDB domains the XML export + import worked fine!
... View more
08-25-2015
07:16 AM
|
2
|
0
|
51
|
POST
|
Asrujit SenGupta thank you! Enterprise GDB was empty. Know that when a value already exists ArcGIS gives to the new value value_1. Yes tried to copy all content at once. Thought about XML export + import but was confused based on this text Export XML Workspace Document—Help | ArcGIS for Desktop although should be the better option, thank you.
... View more
08-24-2015
11:01 AM
|
0
|
1
|
51
|
POST
|
We have a File GDB containing FDs, Tables, RCs. H ow can we migrate that content into an SDE/ Enterprise GDB avoiding the domain output being named as "domainValue"_1. Working on ArcGIS 10.3 desktop + server.
... View more
08-24-2015
08:54 AM
|
0
|
4
|
3358
|
POST
|
We have a Geodatabase containing an obj class (main table) which has subtypes and these contain domains. N eed a way (scripting) to get those subtypes & domains in a "readable" table . Help?
... View more
08-20-2015
09:02 AM
|
0
|
2
|
4512
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|