Name | Version | Date | Status | Notes |
---|---|---|---|---|
amc13 | 1.3 | 2019 | Stable | Pre-development version - basic functionality |
amc14 | 1.4 | 2019 | Stable | Basic version - operates on single boundary parcels |
amc15 | 1.5 | 2020 | Development | Adds additional parcel/map processing capabilities for multiple case studies |
amc16 | 1.6 | 2020 | Development | Revised cumulative processing capabilities for multiple case studies |
PART I: AMC CLASS AND INSTANTIATION
- Base Checks (baseChecks)
- Boundary Processing (boundaryProcessing)
- Create Legal Description (createLaegalDescription)
- Finalize Report (finalizeReport)
PART III: SECONDARY CLASS FUNCTIONS
- Append Report (appendReport)
- ArcPy Message (getAgpMsg)
- Check Project Geodatabase (checkGDB)
- Check Layers in CAD (checkLayers)
- Create Feature Classes (createFeatureClasses)
- Check GPS Control Points (checkGPS)
- Check Geodetic Control Geometries (checkGeodeticControls)
- Check for POB (checkPOB)
- Check for Expanded Boundary Layers (checkEBL)
- Check for Closure (checkClosureCentroid)
- Check for Location (checkLocation)
- Check for Tract Information (checkServerTractMaps)
- Check for Parcel Information (checkServerParcelMaps)
- Check for Records of Survey Information (checkServerRecordsOfSurvey)
- Truncating Values (truncate)
- Boundary Course Traverse Path (traverseCourse)
- Obtain Next Course Segment (nextCourseSegment)
- Correct Boundary Geometry (correctBoundaryGeometry)
- Decimal Degrees to Degrees-Minutes-Seconds (dd2dms)
- Bearing to Word (bearingLabel)
- Map Document Description (describeMapDocument)
- Describe Horizontal Controls (describeHorizontalControls)
- Format Labels for Bearing and Distance (labelBearingDistance)
- Generate CSV Boundary Table (boundaryToTable)
amc(object)
- This class contains a number of functions, methods, and processes for Automated Map Checking analysis using CAD drawings
- INPUT/OUTPUT:
- See class instantiation below.
__init__(self, cadpath, prjpath, outpath, cadname, scale, scalefactor, tpob=None, direction=None, tolerance=2)
- Function class initialization (AMC) that returns an amc class object for further processing.
- INPUT:
- cadpath: the file path to the CAD drawing (.dwg).
- prjpath: the file path to the project directory (that contains the class python code).
- outpath: the file path to the directory where the execution output and results will be stored.
- cadname: the name of the CAD drawing (without the file extension).
- scale: the scale used for the drawing. It can be 'grid' or 'ground'.
- scalefactor: the single scale conversion factor (from ground to grid and vice versa).
- tpob (default=None): optional user input that overrides the TPOB point layer in the CAD drawing, or if it does not exist in the CAD drawing.
- direction (default=None): optional user input defining the direction (clockwise or counter-clockwise) for the boundary course path. When default, the program uses clockwise direction.
- tolerance (default=2): optional decimal accuracy to check geometry coordinates and against County database. When default, then the accuracy is 1/100th of a foot.
- OUTPUT:
- client: an amc class object.
- NOTES:
- This function runs on instantiation of a class automatically.
baseChecks(self)
- Imports the CAD drawing and performs basic layer and geometry checks.
- Calls the following functions:
- appendReport()
- checkGDB()
- getAgpMsg()
- checkLayers()
- createFeatureClasses()
- checkGPS()
- checkGeodeticControls()
- checkPOB()
- checkEBL()
- checkLocation()
- checkServerTractMaps() or checkServerParcelMaps() or checkServerRecordsOfSurvey()
- traverseCourse()
- correctBoundaryGeometry()
boundaryProcessing(self)
- This function processes the boundaries of the CAD drawing and performs basic checks. It also processes the boundary multiline features, creates fields in the geodatabase's feature class, mathematically computes bearing, distances, radial angles, etc, for annotation labels and legal descriptions.
- Calls the following functions:
- appendReport()
- truncate()
- dd2dms()
- bearingLabel()
-
This function implements a rather complex parcel detection algorithm. The algorithm uses multiple geodatabase operations and queries to determine:
- How many parcels are contained in the boundary (V-LINE-PIQ) layer;
- The relationship between them (i.e., is there a SINGLE, SEPARATE, NOT-A-PART, etc). This version of the code (v1.6) enables the presence of multiple types of boundary parcels.
- Which is the main parcel (largest area) when NOT-A-PART exclusions are present.
- The presence and matching of parcels with TPOB points in case of the existence of SEPARATE parcels in the drawing.
Diagrammatically, the process is shown in the following graph (download PDF file here):
createLegalDescription(self)
- This function generates a legal description document after boundary processing data.
finalizeReport(self)
- This function compiles and exports all data and reports, and finishes up the execution.
appendReport(self, string)
- Appends the execution report (opened by class instantiation process)
- INPUT:
- string: the string text to be appended in the report.
getAgpMsg(self, ntabs=1)
- Obtains and returns the message(s) generated by the execution of arcpy functions.
- ntabs: how many tabs to insert at the beginning of the message (to be used in the execution report)
checkGDB(self)
- Checks if the reference geodatabase exists. If it does, it deletes it and creates a new one.
- Calls the following secondary functions:
- appendReport()
checkLayers(self)
- Checks for the presence of all the layers in CAD drawing. Records Pass/Fail in JSON Checks.
- Checking for layers:
- V-ANNO: Annotation layer to be used for all Text, Mtest, Leaders, Multileaders and Dimensions (continuous line type)
- V-LINE: Miscellaneous lines layer to be used for any lines do not fit in the template layer format (continous line type)
- V-LINE-CALC: Line Calc. Layer to be used for any line work shown for graphical purposes only (continous line type)
- V-LINE-CNTR: Street established centerline layer (CENTER2 line type)
- V-LINE-ESMT: Easement layer (DASHED2 line type)
- V-LINE-LOTS: Property line layer to be used for the established property in question line work (continuous line type)
- V-LINE-PCLS: GIS parcel lines and parcel annotation layer (DASHED line type)
- V-LINE-PIQ-PARCEL: PIQ parcel lines layer to be used only for the created parcels which represent the established property in question line work (continous line type)
- V-LINE-REF: Line reference layer to be used for the referenced lines (HIDDEN2 line type)
- V-LINE-ROW-PARCEL: ROW parcel lines layer to be used only for the created parcels which represent the established right-of-way line work (continuous line type)
- V-LINE-RTWY: Street ROW layer to be used only for the right-of-way line work (continuous line type)
- V-LINE-TIE: Ties to basis of bearing layer (DASHED2 line type)
- V-MISC: North arrow layer (continuous line type)
- V-NODE-MON: Monuments layer (continuous line type)
- V-NODE-TABL: Table data layer for points (continous line type)
- V-NODE-TPOB: True point of beginning layer to be used only for the point of beginning which was used to create the parcel of the property (continuous line type)
- V-SHEET: Sheet details layer to be used for the line and curve tables (continuous line type)
- V-TBLE-LINE:Table annotation layer to be used for the line and curve tables (continuous line type)
- V-VPORT Freezes 1: V-VPORT freezes 1 layer to be used to control viewport freeze (continuous line type)
- V-VPORT Freezes 2: V-VPORT freezes 2 layer to be used to control viewport freeze (DASHED2 line type)
- Calls the following secondary functions:
- appendReport()
createFeatureClasses(self)
- Creates feature classes from original CAD drawing layers. Uses specific and verified layers from the imported CAD drawing features to generate feature classes in the geodatabase.
- Calls the following secondary functions:
- appendReport()
- checkClosureCentroid()
checkGPS(self)
- Checks and verifies the presence of the GPS control points in the CAD drawing
- Calls the following secondary functions:
- appendReport()
checkGeodeticControls(self)
- Checks for geodetic control point geometries in server geodatabase.
- Calls the following secondary functions:
- appendReport()
checkPOB(self)
- Checks for the presence of the (True) point of beginning, either by the user, or in the CAD drawing.
- Calls the following secondary functions:
- appendReport()
checkEBL(self)
- CHecking for expanded boundary layers in CAD drawing and corrects geometry if necessary.
- Calls the following secondary functions:
- appendReport()
checkClosureCentroid(self)
- Checks for closure: creating boundary polygon and returns it's centroid coordinates.
- Calls the following secondary functions:
- appendReport()
checkLocation(self)
- Checking County server geodatabase for location data on tract/parcel.
- Calls the following secondary functions:
- appendReport()
checkServerTractMaps(self)
- Checks for Tract information from server geodatabase.
- Calls the following secondary functions:
- appendReport()
checkServerParcelMaps(self)
- Checks for Parcel information from server geodatabase.
- Calls the following secondary functions:
- appendReport()
checkServerRecordsOfSurvey(self)
- CHecks for Record of Survey information from server geodatabase.
- Calls the following secondary functions:
- appendReport()
traverseCourse(self)
- Obtains the course and order for the boundary traverse path over multilines (PIQ).
- Calls the following secondary functions:
- appendReport()
- truncate()
- nextCourseSegment()
truncate(self, v, n)
- Truncates coordinates a the n-th decimal places, for the value v(double).
nextCourseSegment(self, course, segments)
- Gets the next course coordinate based on the initial line (course[1]), and the line segment coordinates from ArcGIS Boundary feature class (PIQ). Returns a JSON string indexed by the order ID (the order to which the lines are added to the course), and for each item, the Boundary feature class OBJECTID, its true start and end coordinates (reversed from the feature class line direction if needed - always clockwise).
correctBoundaryGeometry(self)
- Checks and corrects (if needed) the boundary course geometry given a course and a direction (clockwise or counter-clockwise). The function checks the start and end endpoints and if need reversing it updating the featur class's multiline geometry in the geodatabase.
- Calls the following secondary functions:
- appendReport()
dd2dms(self, dd)
- Returns formatted coordinates of the Degrees:Minutes:Seconds format. This secondary function restructures decimal degree coordinates into degree/minutes/seconds coordinats. It is called from the main module function.
bearingLabel(self, bearing)
- Returns the corresponding direction word based on radial bearing values
describeMapDocument(self)
- Generates a description of the map document
describeHorizontal Controls(self)
- Obtains and generates the Preamp description from horizontal geodetic controls to the point of beginning.
labelBearingDistance(self, bearing, distance)
- Generates a formatted bearing and distance string from coordinates
boundaryToTable(self)
- Creates a csv-formatted boundary table containing the course data
- AMC and ALD Combined Execution on native Python Scirpt
- CAD to AMC ArcGIS Pro Geoprocessing Tool Script
- JSON to Legal Description ArcGIS Pro Geoprocessing Tool Script
- Automated Map Checking ArcGIS Toolbox
- AMC python class, version 1.4
- Test Python Code Folder: Contains test python code for the AMC (v1.4) class (single boundary).
- Test/Input Folder: Data input testing folder.
- TR18141_REVISION2_MASTER.dwg: CAD drawing (single boundary) for testing AMC (v1.4) class.
- Test/Output Folder: Data output testing folder.
- TR18141 Folder: Folder containing execution results of amc code.
- Reference.gdb: ArcGIS geodatabase containing the execution results feature datasets and classes.
- BoundaryData.xlsx: Excel spreadsheet containing results of the boundary course order multilines.
- ExecutionReport.txt: Text output report of the code execution.
- jsonResponse.json: JSON file containing the execution data of the AMC class.
- Reference.docx: Legal description document automatically created by the execution of the ald class.
- SPOCDSQL1205.sde: Orange County ArcGIS server geodatabase connection containing reference databases (parcel fabric, horizontal control points, tract/survey/parcel maps, etc). Created automatically by the code execution (if in domain).
- TR18141 Folder: Folder containing execution results of amc code.
- Test/Input Folder: Data input testing folder.
- Test Python Code Folder: Contains test python code for the AMC (v1.4) class (single boundary).
- AMC python class, version 1.5
- Test Python Code Folder: Contains test python code for the AMC (v1.5) class (single and multiple boundaries).
- Test/Input Folder: Data input testing folder.
- Test/Output Folder: Data output testing folder.
- Test Python Code Folder: Contains test python code for the AMC (v1.5) class (single and multiple boundaries).