![]() TwpID = row.replace("-", "") #Parsing the twp/rng, section identifierįor legD in listLD: # With arcpy.da.UpdateCursor(inTable, cursorFields) as cursor: # setting the ability for the script to overwrite previous outputs of the same nameĪrcpy.AddField_management(inTable, "INDEX_NUM", "LONG")ĬursorFields = ('LEG_DESC', 'SECTION', 'TWP_RNG', 'SEC_TWP_ID', 'INDEX_NUM', 'LEASE') TF2 = r'F:\DRAFTING\ArcGIS Drafting Projects\WTD\NM\_Master Data\WorkingData_John.gdb\Temp_Features_2'įields = arcpy.ListFields(inTable, "", "String") TF1 = r'F:\DRAFTING\ArcGIS Drafting Projects\WTD\NM\_Master Data\WorkingData_John.gdb\Temp_Features_1' Lots = r'F:\DRAFTING\ArcGIS Drafting Projects\WTD\NM\_Master Data\SE_NM_Map.gdb\Lots' ![]() NewFeat = os.path.join(outputFileLoc, outputFile) Template = r'F:\DRAFTING\ArcGIS Drafting Projects\WTD\NM\_Master Data\WorkingData_John.gdb\TEMPLATE_FOR_AUTO_DIGITIZE_TOOL'Īrcpy.CreateFeatureclass_management(outputFileLoc, outputFile, "POLYGON", template, "DISABLED", "DISABLED", template) InTable = os.path.join(outputFileLoc, "TempTable_One") OutputFile = str(outputFile) + "_" + str(YYYYMMDD)Īrcpy.TableToTable_conversion(excelFile, outputFileLoc, "TempTable_One") Please check the following information in the input table: ")Īrcpy.AddWarning("Township/Range: " + str(TownRange))Īrcpy.AddWarning("Section: " + str(Sctn))Īrcpy.AddWarning("Legal Description: " + str(legal))Īrcpy.AddWarning("Auto-digitization of legal descriptions starting now!") Row = '%s' % ', '.join(map(str, legal))Īrcpy.Append_management(, newFeatures, "NO_TEST","","")Īrcpy.AddMessage("Feature created successfully!")Īrcpy.AddMessage("Township/Range: " + str(TownRange))Īrcpy.AddMessage("Section: " + str(Sctn))Īrcpy.AddMessage("Legal Description: " + str(legal))Īrcpy.AddWarning("The following feature could not be created. ![]() With arcpy.da.UpdateCursor(tempFeat_1, curFields) as cursor_2: Qry = buildWhereClauseFromList(tempFeat_1, "SECDIVNO", legalList)Īrcpy.Select_analysis(tempFeat_1, tempFeat_2, qry)Īrcpy.Dissolve_management(tempFeat_2, tempFeat_1)Īrcpy.AddField_management(tempFeat_1, "INDEX_NUM", "LONG")Īrcpy.AddField_management(tempFeat_1, "LEGAL_DESCRIPTION", "TEXT", "", "", 50)ĬurFields = ('INDEX_NUM', 'LEGAL_DESCRIPTION') # Function for generating polygons based on string type legal descriptionsĭef makeFeaturesFromLegalDescriptions(legalList, tempFeat_1, tempFeat_2, newFeatures, Sctn, ID, LN, TownRange, legal):Īrcpy.Select_analysis(lots, tempFeat_1, '"FRSTDIVID" = ' + "'%s'" %FDI) WhereClause = "%s IN(%s)" % (fieldDelimited, ', '.join(map(str, valueList))) # Function for building a where clause from a list objectĭef buildWhereClauseFromList(table, field, valueList):įieldDelimited = arcpy.AddFieldDelimiters(arcpy.Describe(table).path, field)įieldType = arcpy.ListFields(table, field).type OutputFileLoc = arcpy.GetParameterAsText(1) # Getting parameters from tool properties Here is what I've come up with so far that seems to be doing the job I intended it to do. The logic of how to select the correct portion of lots is the problem. Obviously, this is a pretty dirty and could be optimized by having the legal description as an object instead of writing a separate "if" statement for each possible scenario, but that's not what i'm worried about. Select the lots that lie in the eastern half of the section #How? There are no fields within the lot feature class that provide a legal description.Īfter using a search cursor to narrow down the specific twp_rng and section, However, the problem lies in creating a good way to select lots based on legal descriptions alone. ![]() I feel like this could be done by selecting the appropriate lots(divisions of each section) use py and append to the new feature class. ![]() I would like to write a script that goes through the excel table and adds features to a feature class based on the legal descriptions of every property. I also have the Townships/Range, Sections and Lots as separate feature classes. Township_Range, Section, Legal_Description, Property_Name Lots 1,2,3,4 - meaning lots numbered 1-4 of a given section.Į/2 - meaning the Eastern half of a given section. NW/2 SW/2 - meaning the Northwest half of the Southwest half of a given section. Here are some examples of the individual legal descriptions: The file contains a legal description for every property. An excel file with the names of properties within an area that is part of the PLSS in which Township/Range, Section and Lot numbers are used. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |