{ "currentVersion": 11.5, "cimVersion": "3.5.0", "id": 16, "name": "Bearing and Distance", "type": "Feature Layer", "parentLayer": null, "defaultVisibility": true, "minScale": 2500, "maxScale": 0, "canScaleSymbols": false, "geometryType": "esriGeometryPolyline", "description": "Lines", "copyrightText": "", "editFieldsInfo": null, "ownershipBasedAccessControlForFeatures": null, "syncCanReturnChanges": false, "relationships": [], "isDataVersioned": false, "isDataArchived": false, "infoInEstimates": [ "extent", "count" ], "isDataBranchVersioned": false, "isDataReplicaTracked": false, "isCoGoEnabled": false, "supportsRollbackOnFailureParameter": true, "archivingInfo": { "supportsQueryWithHistoricMoment": false, "startArchivingMoment": -1 }, "supportsStatistics": true, "supportsExceedsLimitStatistics": true, "supportsAdvancedQueries": true, "supportsValidateSQL": true, "supportsCoordinatesQuantization": true, "supportsQuantizationEditMode": true, "supportsCalculate": true, "supportsASyncCalculate": true, "supportsDatumTransformation": true, "advancedQueryCapabilities": { "supportsPagination": true, "supportsQueryWithDistance": true, "supportsReturningQueryExtent": true, "supportsStatistics": true, "supportsPercentileStatistics": true, "supportsHavingClause": true, "supportsOrderBy": true, "supportsDistinct": true, "supportsCountDistinct": true, "supportsAdvancedQueryRelated": true, "supportsQueryRelatedPagination": true, "supportsCurrentUserQueries": true, "supportsFullTextSearch": true, "fullTextSearchCapabilities": { "supportsSearchOperator": true, "supportsOperator": false, "supportsSqlExpressionInFullText": true }, "fullTextSearchableFields": [], "supportsQueryWithResultType": true, "supportsReturningGeometryCentroid": false, "supportsReturningGeometryEnvelope": true, "supportsSqlExpression": true, "supportsQueryWithDatumTransformation": true, "supportsLod": false, "supportsQueryWithLodSR": false, "supportsQueryAnalytic": true, "supportsTrueCurve": true, "supportedCurveTypes": [ "esriGeometryCircularArc", "esriGeometryEllipticArc", "esriGeometryBezier3Curve" ], "supportsQueryWithCacheHint": false }, "advancedQueryAnalyticCapabilities": { "supportsLinearRegression": true, "supportsAsync": true, "supportsPercentileAnalytic": true }, "advancedEditingCapabilities": { "supportedSqlFormatsInCalculate": [ "standard" ], "supportsAsyncApplyEdits": true, "supportsApplyEditsbyUploadID": true, "supportedApplyEditsUploadIDFormats": "JSON,PBF" }, "hasGeometryProperties": true, "geometryProperties": { "shapeLengthFieldName": "Shape__Length", "units": "esriMeters" }, "hasMetadata": true, "extent": { "xmin": -9089381.214760179, "ymin": 4957770.401490049, "xmax": -9025989.267116224, "ymax": 5011391.391756194, "zmin": 0, "zmax": 0, "spatialReference": { "wkid": 102100, "latestWkid": 3857, "xyTolerance": 0.001, "zTolerance": 0.001, "mTolerance": 0.001, "falseX": -20037700, "falseY": -30241100, "xyUnits": 10000, "falseZ": -100000, "zUnits": 10000, "falseM": -100000, "mUnits": 10000 } }, "spatialReference": { "wkid": 102100, "latestWkid": 3857, "xyTolerance": 0.001, "zTolerance": 0.001, "mTolerance": 0.001, "falseX": -20037700, "falseY": -30241100, "xyUnits": 10000, "falseZ": -100000, "zUnits": 10000, "falseM": -100000, "mUnits": 10000 }, "sourceSpatialReference": { "wkid": 102722, "latestWkid": 3734, "xyTolerance": 0.003280833333333333, "zTolerance": 0.001, "mTolerance": 0.001, "falseX": -118963900, "falseY": -96373800, "xyUnits": 3048.0060960121928, "falseZ": -100000, "zUnits": 10000, "falseM": 0, "mUnits": 1 }, "drawingInfo": { "renderer": { "type": "uniqueValue", "valueExpression": "return \"COGO\"", "valueExpressionTitle": "Custom", "uniqueValueGroups": [ { "heading": "", "classes": [ { "label": "COGO", "description": "COGO", "symbol": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 0, 92, 230, 255 ], "width": 1.5 }, "values": [ [ "COGO" ] ] } ] } ], "uniqueValueInfos": [ { "symbol": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 0, 92, 230, 255 ], "width": 1.5 }, "value": "COGO", "label": "COGO" } ], "fieldDelimiter": ",", "authoringInfo": { "colorRamp": { "type": "multipart", "colorRamps": [ { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 250, 184, 255 ], "toColor": [ 252, 250, 184, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 190, 182, 252, 255 ], "toColor": [ 190, 182, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 184, 189, 255 ], "toColor": [ 252, 184, 189, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 184, 248, 252, 255 ], "toColor": [ 184, 248, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 184, 252, 197, 255 ], "toColor": [ 184, 252, 197, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 179, 233, 255 ], "toColor": [ 252, 179, 233, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 227, 207, 255 ], "toColor": [ 252, 227, 207, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 194, 218, 252, 255 ], "toColor": [ 194, 218, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 210, 237, 255 ], "toColor": [ 252, 210, 237, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 215, 252, 225, 255 ], "toColor": [ 215, 252, 225, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 226, 202, 252, 255 ], "toColor": [ 226, 202, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 248, 252, 212, 255 ], "toColor": [ 248, 252, 212, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 220, 252, 187, 255 ], "toColor": [ 220, 252, 187, 255 ] } ] } } }, "scaleSymbols": true, "transparency": 0, "labelingInfo": [ { "labelExpressionInfo": { "expression": "// Change the settings portion to configure direction format, color, rounding and abbreviations\r\n// This is an Arcade expression\r\n\r\n// SETTINGS\r\nvar QuadrantBearingFormat = true; //set 'true' for quadrant bearing, 'false' for north azimuth\r\nvar ShowDistance = true; //set as 'true' to show distance\r\nvar ShowDirection = true; //set as 'true' to show direction\r\nvar ShowRadius = true; //set as 'true' to show radius\r\nvar ShowCurveParemater = true; //set as 'true' to show a curve parameter\r\nvar CurveParameter = \"ArcLength\"; //set as 'ArcLength' or 'Chord' or 'Angle' for central angle. Case sensitive!\r\nvar ErrorString = \"COGO ERROR\"; //set to display invalid COGO combinations\r\nvar RadiusAbbr = 'R='; //radius abbreviation\r\nvar Radius2Abbr = 'R2='; //radius2 abbreviation for spiral curves\r\nvar ArclengthAbrr = 'L='; //arclength abbreviation\r\nvar ChordAbbr = 'C='; //chord abbreviation\r\nvar AngleAbbr = 'A='; //central Angle abbreviation\r\nvar DistUnitRounding = 2; //number of decimal places for distance units: distance, radius, arclength & chord\r\nvar NumberFormat = \"#,###.00\" //number format. In this example: thousands separator with padding of 2 zeros \r\nvar directionColor = \"blue='255'\"; //direction color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar distanceColor = \"red='255'\"; //distance color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar radiusColor = \"blue='255'\"; //radius color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar curveParamColor = \"red='255'\"; //curve parameter color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar partialCOGOColor = \"magenta='255'\"; //partial COGO color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar invalidCOGOColor = \"red='255'\"; //invalid COGO color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar fontNameSize = \"\"; //font type and size\r\n\r\n// VARIABLES\r\nvar direction=$feature.Direction;\r\nvar dist=$feature.Distance;\r\nvar radius=$feature.Radius;\r\nvar arclength=$feature.Arclength;\r\nvar radius2=$feature.Radius2\r\nvar prefix; // quadrant bearing prefix\r\nvar postfix; // quadrant bearing postfix\r\nvar tempBearing; \r\nvar quadbearing;\r\nvar binaryDictionary; //binary dictionary to check COGO combinations\r\nvar checksum=0; //initialize checksum\r\nvar validValuesArray; //array of valid values for COGO combinations\r\nvar partialValuesArray; //array of partial values for COGO\r\nvar degrees;\r\nvar minutes;\r\nvar seconds;\r\nvar DMS;\r\nvar directionStr = \"\"; //direction string using for label\r\nvar distanceStr = \"\"; //distance string using for label\r\nvar radiusStr = \"\"; //radius string using for label\r\nvar radius2Str = \"\"; //radius2 string using for labeling spiral curves\r\nvar curveStr = \"\"; //curve parameter string using for label\r\nvar angleRad; //curve angle in radians\r\nvar COGOValidity; //COGO combinations validity. can be valid, partial or invalid.\r\n\r\n\r\nfunction NorthAzimuth2Quadbearing(azimuth){\r\n if (azimuth<90 && azimuth>=0){\r\n tempBearing=azimuth;\r\n prefix = \"N\";\r\n postfix= \"E\";}\r\n else if (azimuth<180 && azimuth>=90){\r\n tempBearing=180-azimuth;\r\n prefix = \"S\";\r\n postfix= \"E\";}\r\n else if (azimuth<270 && azimuth>=180){\r\n tempBearing=abs(180-azimuth);\r\n prefix = \"S\";\r\n postfix= \"W\";}\r\n else if (azimuth<360 && azimuth>=270){\r\n tempBearing=360-azimuth;\r\n prefix = \"N\";\r\n postfix= \"W\";}\r\n \r\n degrees=floor(tempBearing);\r\n minutes=floor((tempBearing-degrees)*60)\r\n seconds=((tempBearing-degrees-minutes/60)*3600)\r\n if (seconds>=59.5){\r\n seconds=0;\r\n minutes+=1;\r\n if (minutes==60){\r\n minutes=0;\r\n degrees+=1;}}\r\n quadbearing=prefix+degrees+\"°\"+text(minutes,\"00\")+\"'\"+text(seconds,\"00\")+\"''\"+postfix;\r\n return quadbearing;\r\n}\r\n\r\nfunction DMS(tempBearing){\r\n degrees=floor(tempBearing);\r\n minutes=floor((tempBearing-degrees)*60)\r\n seconds=((tempBearing-degrees-minutes/60)*3600)\r\n if (seconds>=59.5){\r\n seconds=0;\r\n minutes+=1;\r\n if (minutes==60){\r\n minutes=0;\r\n degrees+=1;}}\r\n DMS=degrees+\"°\"+text(minutes,\"00\")+\"'\"+text(seconds,\"00\")+\"''\";\r\n return DMS;\r\n \r\n}\r\nfunction IsValidCOGO(direction, dist, radius, arclength, radius2) {\r\n binaryDictionary= Dictionary('dir', 1, 'dist',2, 'rad',4, 'arc',8, 'rad2',16)\r\n if (!IsEmpty(direction)) {checksum+=binaryDictionary.dir}\r\n if (!IsEmpty(dist)) {checksum+=binaryDictionary.dist}\r\n if (!IsEmpty(radius)) {checksum+=binaryDictionary.rad}\r\n if (!IsEmpty(arclength)) {checksum+=binaryDictionary.arc}\r\n if (!IsEmpty(radius2)) {checksum+=binaryDictionary.rad2}\r\n \r\n validValuesArray=[0,3,13,29]; //array of valid combinations: '0' for nothing, ... '13' for direction & radius & arclength ...\r\n partialValuesArray=[1,2,4,5,8,9,12,16,20,21,25,28]; //array of partial combinations: '1' for only direction, '2' for only distance, '4' for only radius...\r\n \r\n if (IndexOf(validValuesArray,checksum)>-1) { // a negative value is returned if checksum value is not in the a valid combination array\r\n return \"valid\";\r\n }\r\n if (IndexOf(partialValuesArray,checksum)>-1){\r\n return \"partial\"; \r\n }\r\n return \"invalid\";\r\n}\r\n\r\n COGOValidity = IsValidCOGO(direction, dist, radius, arclength, radius2);\r\n// ignore the error and proceeds to label):\r\nif ( COGOValidity == \"invalid\") { \r\n COGOValidity = \"partial\"; // Forces it to display the data it has \r\n}\r\n\r\nelse if (COGOValidity == \"partial\") { //if a partial COGO change colors\r\n distanceColor = partialCOGOColor;\r\n directionColor = partialCOGOColor;\r\n radiusColor = partialCOGOColor;\r\n curveParamColor = partialCOGOColor;\r\n}\r\n\r\n\r\n\r\n// Distance string\r\nif (ShowDistance) {\r\n if (IsEmpty(dist)==false) {\r\n distanceStr = \"\" + fontNameSize + text(round(dist, DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\";\r\n }\r\n}\r\n\r\n//Radius String\r\nif (ShowRadius) {\r\n if (!IsEmpty(radius)) { //it can be a curve or a spiral\r\n if (IsEmpty(radius2)) { //if radius2 is empty this is a curve\r\n radiusStr = \"\" + fontNameSize + RadiusAbbr + \" \" + text(round(radius, DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\";\r\n }\r\n else { // it is a spiral\r\n radiusStr = \"\" + fontNameSize + RadiusAbbr + \" \" + text(round(radius, DistUnitRounding),NumberFormat) + \"<\/FNT><\/CLR>\";\r\n radius2Str = \"\" + fontNameSize + Radius2Abbr + \" \" + text(round(radius2, DistUnitRounding),NumberFormat) + \"<\/FNT><\/CLR>\";\r\n if (radius == 0) { //substitute to infinity sign\r\n radiusStr = \"\" + fontNameSize + RadiusAbbr + \" ∞ \" + \"<\/FNT><\/CLR>\";\r\n }\r\n if (radius2 == 0) { //substitute to infinity sign\r\n radius2Str = \"\" + fontNameSize + Radius2Abbr + \" ∞ \" + \"<\/FNT><\/CLR>\";\r\n }\r\n } \r\n \r\n }\r\n}\r\n\r\n// Curve Parameter\r\nif (ShowCurveParemater) {\r\n if (!IsEmpty(arclength)) {\r\n if (CurveParameter == 'ArcLength') {\r\n curveStr = \"\" + fontNameSize + ArclengthAbrr + text(round(arclength, DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\"; //return Arc length \r\n }\r\n angleRad = arclength/(abs(radius)) //calculate angle in radians\r\n if (CurveParameter == 'Angle') {\r\n curveStr = \"\" + fontNameSize + AngleAbbr + DMS(angleRad * 180 / pi) + \"<\/FNT><\/CLR>\"; // convert radian to degrees and show as DMS\r\n }\r\n if (CurveParameter == 'Chord') {\r\n curveStr = \"\" + fontNameSize + ChordAbbr + text(round((2 * abs(radius) * Sin(angleRad/2)),DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\"; //calculate chord length\r\n } \r\n }\r\n}\r\n \r\n// Assemble label string\r\nif ((IsEmpty(radius)) && (IsEmpty(curveStr))) { //if radius and curveStr are empty it is not a curve \r\n if (IsEmpty(dist)) {return directionStr;}\r\n return directionStr + \"\\n\" + distanceStr\r\n}\r\nelse { //it's a curve\r\n if ((IsEmpty(radius)) && (IsEmpty(radius2))){return curveStr;}\r\n return radiusStr + \" \" + radius2Str + \" \\n \" + curveStr; \r\n}", "title": "Custom" }, "lineOrientation": "direction", "labelPlacement": "esriServerLinePlacementBelowStart", "textLayout": "followFeature", "deconflictionStrategy": "static", "lineConnection": "none", "multiPart": "labelPerFeature", "useClippedGeometry": true, "offsetDistance": 3, "stackLabel": false, "removeDuplicates": "none", "where": "LabelPosition IS NULL Or LabelPosition = 1", "useCodedValues": false, "maxScale": 0, "minScale": 2500, "name": "COGO Right", "priority": -1, "symbol": { "type": "esriTS", "color": [ 0, 0, 0, 255 ], "backgroundColor": null, "borderLineColor": null, "borderLineSize": null, "verticalAlignment": "bottom", "horizontalAlignment": "left", "rightToLeft": false, "angle": 0, "xoffset": 0, "yoffset": 0, "kerning": true, "haloColor": [ 255, 255, 255, 255 ], "haloSize": 2, "font": { "family": "Tahoma", "size": 8, "style": "normal", "weight": "normal", "decoration": "none" } } }, { "labelExpressionInfo": { "expression": "// Change the settings portion to configure direction format, color, rounding and abbreviations\r\n// This is an Arcade expression\r\n\r\n// SETTINGS\r\nvar QuadrantBearingFormat = true; //set 'true' for quadrant bearing, 'false' for north azimuth\r\nvar ShowDistance = true; //set as 'true' to show distance\r\nvar ShowDirection = true; //set as 'true' to show direction\r\nvar ShowRadius = true; //set as 'true' to show radius\r\nvar ShowCurveParemater = true; //set as 'true' to show a curve parameter\r\nvar CurveParameter = \"ArcLength\"; //set as 'ArcLength' or 'Chord' or 'Angle' for central angle. Case sensitive!\r\nvar ErrorString = \"COGO ERROR\"; //set to display invalid COGO combinations\r\nvar RadiusAbbr = 'R='; //radius abbreviation\r\nvar Radius2Abbr = 'R2='; //radius2 abbreviation for spiral curves\r\nvar ArclengthAbrr = 'L='; //arclength abbreviation\r\nvar ChordAbbr = 'C='; //chord abbreviation\r\nvar AngleAbbr = 'A='; //central Angle abbreviation\r\nvar DistUnitRounding = 2; //number of decimal places for distance units: distance, radius, arclength & chord\r\nvar NumberFormat = \"#,###.00\" //number format. In this example: thousands separator with padding of 2 zeros \r\nvar directionColor = \"blue='255'\"; //direction color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar distanceColor = \"red='255'\"; //distance color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar radiusColor = \"blue='255'\"; //radius color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar curveParamColor = \"red='255'\"; //curve parameter color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar partialCOGOColor = \"magenta='255'\"; //partial COGO color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar invalidCOGOColor = \"red='255'\"; //invalid COGO color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar fontNameSize = \"\"; //font type and size\r\n\r\n// VARIABLES\r\nvar direction=$feature.Direction;\r\nvar dist=$feature.Distance;\r\nvar radius=$feature.Radius;\r\nvar arclength=$feature.Arclength;\r\nvar radius2=$feature.Radius2\r\nvar prefix; // quadrant bearing prefix\r\nvar postfix; // quadrant bearing postfix\r\nvar tempBearing; \r\nvar quadbearing;\r\nvar binaryDictionary; //binary dictionary to check COGO combinations\r\nvar checksum=0; //initialize checksum\r\nvar validValuesArray; //array of valid values for COGO combinations\r\nvar partialValuesArray; //array of partial values for COGO\r\nvar degrees;\r\nvar minutes;\r\nvar seconds;\r\nvar DMS;\r\nvar directionStr = \"\"; //direction string using for label\r\nvar distanceStr = \"\"; //distance string using for label\r\nvar radiusStr = \"\"; //radius string using for label\r\nvar radius2Str = \"\"; //radius2 string using for labeling spiral curves\r\nvar curveStr = \"\"; //curve parameter string using for label\r\nvar angleRad; //curve angle in radians\r\nvar COGOValidity; //COGO combinations validity. can be valid, partial or invalid.\r\n\r\n\r\nfunction NorthAzimuth2Quadbearing(azimuth){\r\n if (azimuth<90 && azimuth>=0){\r\n tempBearing=azimuth;\r\n prefix = \"N\";\r\n postfix= \"E\";}\r\n else if (azimuth<180 && azimuth>=90){\r\n tempBearing=180-azimuth;\r\n prefix = \"S\";\r\n postfix= \"E\";}\r\n else if (azimuth<270 && azimuth>=180){\r\n tempBearing=abs(180-azimuth);\r\n prefix = \"S\";\r\n postfix= \"W\";}\r\n else if (azimuth<360 && azimuth>=270){\r\n tempBearing=360-azimuth;\r\n prefix = \"N\";\r\n postfix= \"W\";}\r\n \r\n degrees=floor(tempBearing);\r\n minutes=floor((tempBearing-degrees)*60)\r\n seconds=((tempBearing-degrees-minutes/60)*3600)\r\n if (seconds>=59.5){\r\n seconds=0;\r\n minutes+=1;\r\n if (minutes==60){\r\n minutes=0;\r\n degrees+=1;}}\r\n quadbearing=prefix+degrees+\"°\"+text(minutes,\"00\")+\"'\"+text(seconds,\"00\")+\"''\"+postfix;\r\n return quadbearing;\r\n}\r\n\r\nfunction DMS(tempBearing){\r\n degrees=floor(tempBearing);\r\n minutes=floor((tempBearing-degrees)*60)\r\n seconds=((tempBearing-degrees-minutes/60)*3600)\r\n if (seconds>=59.5){\r\n seconds=0;\r\n minutes+=1;\r\n if (minutes==60){\r\n minutes=0;\r\n degrees+=1;}}\r\n DMS=degrees+\"°\"+text(minutes,\"00\")+\"'\"+text(seconds,\"00\")+\"''\";\r\n return DMS;\r\n \r\n}\r\nfunction IsValidCOGO(direction, dist, radius, arclength, radius2) {\r\n binaryDictionary= Dictionary('dir', 1, 'dist',2, 'rad',4, 'arc',8, 'rad2',16)\r\n if (!IsEmpty(direction)) {checksum+=binaryDictionary.dir}\r\n if (!IsEmpty(dist)) {checksum+=binaryDictionary.dist}\r\n if (!IsEmpty(radius)) {checksum+=binaryDictionary.rad}\r\n if (!IsEmpty(arclength)) {checksum+=binaryDictionary.arc}\r\n if (!IsEmpty(radius2)) {checksum+=binaryDictionary.rad2}\r\n \r\n validValuesArray=[0,3,13,29]; //array of valid combinations: '0' for nothing, ... '13' for direction & radius & arclength ...\r\n partialValuesArray=[1,2,4,5,8,9,12,16,20,21,25,28]; //array of partial combinations: '1' for only direction, '2' for only distance, '4' for only radius...\r\n \r\n if (IndexOf(validValuesArray,checksum)>-1) { // a negative value is returned if checksum value is not in the a valid combination array\r\n return \"valid\";\r\n }\r\n if (IndexOf(partialValuesArray,checksum)>-1){\r\n return \"partial\"; \r\n }\r\n return \"invalid\";\r\n}\r\n\r\nCOGOValidity = IsValidCOGO(direction, dist, radius, arclength, radius2);\r\n// ignore the error and proceeds to label):\r\nif ( COGOValidity == \"invalid\") { \r\n COGOValidity = \"partial\"; // Forces it to display the data it has \r\n}\r\n\r\nelse if (COGOValidity == \"partial\") { //if a partial COGO change colors\r\n distanceColor = partialCOGOColor;\r\n directionColor = partialCOGOColor;\r\n radiusColor = partialCOGOColor;\r\n curveParamColor = partialCOGOColor;\r\n}\r\n\r\n\r\n\r\n\r\n// Distance string\r\nif (ShowDistance) {\r\n if (IsEmpty(dist)==false) {\r\n distanceStr = \"\" + fontNameSize + text(round(dist, DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\";\r\n }\r\n}\r\n\r\n//Radius String\r\nif (ShowRadius) {\r\n if (!IsEmpty(radius)) { //it can be a curve or a spiral\r\n if (IsEmpty(radius2)) { //if radius2 is empty this is a curve\r\n radiusStr = \"\" + fontNameSize + RadiusAbbr + \" \" + text(round(radius, DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\";\r\n }\r\n else { // it is a spiral\r\n radiusStr = \"\" + fontNameSize + RadiusAbbr + \" \" + text(round(radius, DistUnitRounding),NumberFormat) + \"<\/FNT><\/CLR>\";\r\n radius2Str = \"\" + fontNameSize + Radius2Abbr + \" \" + text(round(radius2, DistUnitRounding),NumberFormat) + \"<\/FNT><\/CLR>\";\r\n if (radius == 0) { //substitute to infinity sign\r\n radiusStr = \"\" + fontNameSize + RadiusAbbr + \" ∞ \" + \"<\/FNT><\/CLR>\";\r\n }\r\n if (radius2 == 0) { //substitute to infinity sign\r\n radius2Str = \"\" + fontNameSize + Radius2Abbr + \" ∞ \" + \"<\/FNT><\/CLR>\";\r\n }\r\n } \r\n \r\n }\r\n}\r\n\r\n// Curve Parameter\r\nif (ShowCurveParemater) {\r\n if (!IsEmpty(arclength)) {\r\n if (CurveParameter == 'ArcLength') {\r\n curveStr = \"\" + fontNameSize + ArclengthAbrr + text(round(arclength, DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\"; //return Arc length \r\n }\r\n angleRad = arclength/(abs(radius)) //calculate angle in radians\r\n if (CurveParameter == 'Angle') {\r\n curveStr = \"\" + fontNameSize + AngleAbbr + DMS(angleRad * 180 / pi) + \"<\/FNT><\/CLR>\"; // convert radian to degrees and show as DMS\r\n }\r\n if (CurveParameter == 'Chord') {\r\n curveStr = \"\" + fontNameSize + ChordAbbr + text(round((2 * abs(radius) * Sin(angleRad/2)),DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\"; //calculate chord length\r\n } \r\n }\r\n}\r\n \r\n// Assemble label string\r\nif ((IsEmpty(radius)) && (IsEmpty(curveStr))) { //if radius and curveStr are empty it is not a curve \r\n if (IsEmpty(dist)) {return directionStr;}\r\n return directionStr + \"\\n\" + distanceStr\r\n}\r\nelse { //it's a curve\r\n if ((IsEmpty(radius)) && (IsEmpty(radius2))){return curveStr;}\r\n return radiusStr + \" \" + radius2Str + \" \\n \" + curveStr; \r\n}", "title": "Custom" }, "lineOrientation": "direction", "labelPlacement": "esriServerLinePlacementAboveStart", "textLayout": "followFeature", "deconflictionStrategy": "static", "lineConnection": "none", "multiPart": "labelPerFeature", "useClippedGeometry": true, "offsetDistance": 3, "stackLabel": false, "removeDuplicates": "none", "where": "LabelPosition = 2", "useCodedValues": false, "maxScale": 0, "minScale": 2500, "name": "COGO Left", "priority": -1, "symbol": { "type": "esriTS", "color": [ 0, 0, 0, 255 ], "backgroundColor": null, "borderLineColor": null, "borderLineSize": null, "verticalAlignment": "bottom", "horizontalAlignment": "left", "rightToLeft": false, "angle": 0, "xoffset": 0, "yoffset": 0, "kerning": true, "haloColor": [ 255, 255, 255, 255 ], "haloSize": 2, "font": { "family": "Tahoma", "size": 8, "style": "normal", "weight": "normal", "decoration": "none" } } }, { "labelExpressionInfo": { "expression": "// Change the settings portion to configure direction format, color, rounding and abbreviations\r\n// This is an Arcade expression\r\n\r\n// SETTINGS\r\nvar QuadrantBearingFormat = true; //set 'true' for quadrant bearing, 'false' for north azimuth\r\nvar ShowDistance = true; //set as 'true' to show distance\r\nvar ShowDirection = true; //set as 'true' to show direction\r\nvar ShowRadius = true; //set as 'true' to show radius\r\nvar ShowCurveParemater = true; //set as 'true' to show a curve parameter\r\nvar CurveParameter = \"ArcLength\"; //set as 'ArcLength' or 'Chord' or 'Angle' for central angle. Case sensitive!\r\nvar ErrorString = \"COGO ERROR\"; //set to display invalid COGO combinations\r\nvar RadiusAbbr = 'R='; //radius abbreviation\r\nvar Radius2Abbr = 'R2='; //radius2 abbreviation for spiral curves\r\nvar ArclengthAbrr = 'L='; //arclength abbreviation\r\nvar ChordAbbr = 'C='; //chord abbreviation\r\nvar AngleAbbr = 'A='; //central Angle abbreviation\r\nvar DistUnitRounding = 2; //number of decimal places for distance units: distance, radius, arclength & chord\r\nvar NumberFormat = \"#,###.00\" //number format. In this example: thousands separator with padding of 2 zeros \r\nvar directionColor = \"blue='255'\"; //direction color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar distanceColor = \"red='255'\"; //distance color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar radiusColor = \"blue='255'\"; //radius color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar curveParamColor = \"red='255'\"; //curve parameter color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar partialCOGOColor = \"magenta='255'\"; //partial COGO color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar invalidCOGOColor = \"red='255'\"; //invalid COGO color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\r\nvar fontNameSize = \"\"; //font type and size\r\n\r\n// VARIABLES\r\nvar direction=$feature.Direction;\r\nvar dist=$feature.Distance;\r\nvar radius=$feature.Radius;\r\nvar arclength=$feature.Arclength;\r\nvar radius2=$feature.Radius2\r\nvar prefix; // quadrant bearing prefix\r\nvar postfix; // quadrant bearing postfix\r\nvar tempBearing; \r\nvar quadbearing;\r\nvar binaryDictionary; //binary dictionary to check COGO combinations\r\nvar checksum=0; //initialize checksum\r\nvar validValuesArray; //array of valid values for COGO combinations\r\nvar partialValuesArray; //array of partial values for COGO\r\nvar degrees;\r\nvar minutes;\r\nvar seconds;\r\nvar DMS;\r\nvar directionStr = \"\"; //direction string using for label\r\nvar distanceStr = \"\"; //distance string using for label\r\nvar radiusStr = \"\"; //radius string using for label\r\nvar radius2Str = \"\"; //radius2 string using for labeling spiral curves\r\nvar curveStr = \"\"; //curve parameter string using for label\r\nvar angleRad; //curve angle in radians\r\nvar COGOValidity; //COGO combinations validity. can be valid, partial or invalid.\r\n\r\n\r\nfunction NorthAzimuth2Quadbearing(azimuth){\r\n if (azimuth<90 && azimuth>=0){\r\n tempBearing=azimuth;\r\n prefix = \"N\";\r\n postfix= \"E\";}\r\n else if (azimuth<180 && azimuth>=90){\r\n tempBearing=180-azimuth;\r\n prefix = \"S\";\r\n postfix= \"E\";}\r\n else if (azimuth<270 && azimuth>=180){\r\n tempBearing=abs(180-azimuth);\r\n prefix = \"S\";\r\n postfix= \"W\";}\r\n else if (azimuth<360 && azimuth>=270){\r\n tempBearing=360-azimuth;\r\n prefix = \"N\";\r\n postfix= \"W\";}\r\n \r\n degrees=floor(tempBearing);\r\n minutes=floor((tempBearing-degrees)*60)\r\n seconds=((tempBearing-degrees-minutes/60)*3600)\r\n if (seconds>=59.5){\r\n seconds=0;\r\n minutes+=1;\r\n if (minutes==60){\r\n minutes=0;\r\n degrees+=1;}}\r\n quadbearing=prefix+degrees+\"°\"+text(minutes,\"00\")+\"'\"+text(seconds,\"00\")+\"''\"+postfix;\r\n return quadbearing;\r\n}\r\n\r\nfunction DMS(tempBearing){\r\n degrees=floor(tempBearing);\r\n minutes=floor((tempBearing-degrees)*60)\r\n seconds=((tempBearing-degrees-minutes/60)*3600)\r\n if (seconds>=59.5){\r\n seconds=0;\r\n minutes+=1;\r\n if (minutes==60){\r\n minutes=0;\r\n degrees+=1;}}\r\n DMS=degrees+\"°\"+text(minutes,\"00\")+\"'\"+text(seconds,\"00\")+\"''\";\r\n return DMS;\r\n \r\n}\r\nfunction IsValidCOGO(direction, dist, radius, arclength, radius2) {\r\n binaryDictionary= Dictionary('dir', 1, 'dist',2, 'rad',4, 'arc',8, 'rad2',16)\r\n if (!IsEmpty(direction)) {checksum+=binaryDictionary.dir}\r\n if (!IsEmpty(dist)) {checksum+=binaryDictionary.dist}\r\n if (!IsEmpty(radius)) {checksum+=binaryDictionary.rad}\r\n if (!IsEmpty(arclength)) {checksum+=binaryDictionary.arc}\r\n if (!IsEmpty(radius2)) {checksum+=binaryDictionary.rad2}\r\n \r\n validValuesArray=[0,3,13,29]; //array of valid combinations: '0' for nothing, ... '13' for direction & radius & arclength ...\r\n partialValuesArray=[1,2,4,5,8,9,12,16,20,21,25,28]; //array of partial combinations: '1' for only direction, '2' for only distance, '4' for only radius...\r\n \r\n if (IndexOf(validValuesArray,checksum)>-1) { // a negative value is returned if checksum value is not in the a valid combination array\r\n return \"valid\";\r\n }\r\n if (IndexOf(partialValuesArray,checksum)>-1){\r\n return \"partial\"; \r\n }\r\n return \"invalid\";\r\n}\r\n\r\nCOGOValidity = IsValidCOGO(direction, dist, radius, arclength, radius2);\r\n// ignore the error and proceeds to label):\r\nif ( COGOValidity == \"invalid\") { \r\n COGOValidity = \"partial\"; // Forces it to display the data it has \r\n}\r\n\r\nelse if (COGOValidity == \"partial\") { //if a partial COGO change colors\r\n distanceColor = partialCOGOColor;\r\n directionColor = partialCOGOColor;\r\n radiusColor = partialCOGOColor;\r\n curveParamColor = partialCOGOColor;\r\n}\r\n\r\n\r\n// Distance string\r\nif (ShowDistance) {\r\n if (IsEmpty(dist)==false) {\r\n distanceStr = \"\" + fontNameSize + text(round(dist, DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\";\r\n }\r\n}\r\n\r\n//Radius String\r\nif (ShowRadius) {\r\n if (!IsEmpty(radius)) { //it can be a curve or a spiral\r\n if (IsEmpty(radius2)) { //if radius2 is empty this is a curve\r\n radiusStr = \"\" + fontNameSize + RadiusAbbr + \" \" + text(round(radius, DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\";\r\n }\r\n else { // it is a spiral\r\n radiusStr = \"\" + fontNameSize + RadiusAbbr + \" \" + text(round(radius, DistUnitRounding),NumberFormat) + \"<\/FNT><\/CLR>\";\r\n radius2Str = \"\" + fontNameSize + Radius2Abbr + \" \" + text(round(radius2, DistUnitRounding),NumberFormat) + \"<\/FNT><\/CLR>\";\r\n if (radius == 0) { //substitute to infinity sign\r\n radiusStr = \"\" + fontNameSize + RadiusAbbr + \" ∞ \" + \"<\/FNT><\/CLR>\";\r\n }\r\n if (radius2 == 0) { //substitute to infinity sign\r\n radius2Str = \"\" + fontNameSize + Radius2Abbr + \" ∞ \" + \"<\/FNT><\/CLR>\";\r\n }\r\n } \r\n \r\n }\r\n}\r\n\r\n// Curve Parameter\r\nif (ShowCurveParemater) {\r\n if (!IsEmpty(arclength)) {\r\n if (CurveParameter == 'ArcLength') {\r\n curveStr = \"\" + fontNameSize + ArclengthAbrr + text(round(arclength, DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\"; //return Arc length \r\n }\r\n angleRad = arclength/(abs(radius)) //calculate angle in radians\r\n if (CurveParameter == 'Angle') {\r\n curveStr = \"\" + fontNameSize + AngleAbbr + DMS(angleRad * 180 / pi) + \"<\/FNT><\/CLR>\"; // convert radian to degrees and show as DMS\r\n }\r\n if (CurveParameter == 'Chord') {\r\n curveStr = \"\" + fontNameSize + ChordAbbr + text(round((2 * abs(radius) * Sin(angleRad/2)),DistUnitRounding), NumberFormat) + \"<\/FNT><\/CLR>\"; //calculate chord length\r\n } \r\n }\r\n}\r\n \r\n// Assemble label string\r\nif ((IsEmpty(radius)) && (IsEmpty(curveStr))) { //if radius and curveStr are empty it is not a curve \r\n if (IsEmpty(dist)) {return directionStr;}\r\n return directionStr + \"\\n\" + distanceStr\r\n}\r\nelse { //it's a curve\r\n if ((IsEmpty(radius)) && (IsEmpty(radius2))){return curveStr;}\r\n return radiusStr + \" \" + radius2Str + \" \\n \" + curveStr; \r\n}", "title": "Custom" }, "labelPlacement": "esriServerLinePlacementCenterStart", "textLayout": "followFeature", "deconflictionStrategy": "static", "lineConnection": "none", "multiPart": "labelPerFeature", "useClippedGeometry": true, "stackLabel": false, "removeDuplicates": "none", "where": "LabelPosition = 3", "useCodedValues": false, "maxScale": 0, "minScale": 2500, "name": "COGO Shared", "priority": -1, "symbol": { "type": "esriTS", "color": [ 0, 0, 0, 255 ], "backgroundColor": null, "borderLineColor": null, "borderLineSize": null, "verticalAlignment": "bottom", "horizontalAlignment": "left", "rightToLeft": false, "angle": 0, "xoffset": 0, "yoffset": 0, "kerning": true, "haloColor": [ 255, 255, 255, 255 ], "haloSize": 2, "font": { "family": "Tahoma", "size": 8, "style": "normal", "weight": "normal", "decoration": "none" } } } ] }, "hasM": false, "hasZ": true, "enableZDefaults": false, "supportsVCSProjection": true, "allowGeometryUpdates": false, "allowTrueCurvesUpdates": false, "onlyAllowTrueCurveUpdatesByTrueCurveClients": false, "hasAttachments": false, "supportsApplyEditsWithGlobalIds": false, "htmlPopupType": "esriServerHTMLPopupTypeAsHTMLText", "objectIdField": "OBJECTID", "globalIdField": "", "displayField": "Direction", "typeIdField": "", "subtypeField": "", "fields": [ { "name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID", "domain": null, "editable": false, "nullable": false, "defaultValue": null, "modelName": "OBJECTID" }, { "name": "CreatedByRecord", "type": "esriFieldTypeGUID", "alias": "Created By Record", "domain": null, "editable": true, "nullable": true, "length": 38, "defaultValue": null, "modelName": "CreatedByRecord" }, { "name": "RetiredByRecord", "type": "esriFieldTypeGUID", "alias": "Retired By Record", "domain": null, "editable": true, "nullable": true, "length": 38, "defaultValue": null, "modelName": "RetiredByRecord" }, { "name": "Direction", "type": "esriFieldTypeDouble", "alias": "Direction", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "Direction" }, { "name": "Distance", "type": "esriFieldTypeDouble", "alias": "Distance", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "Distance" }, { "name": "Radius", "type": "esriFieldTypeDouble", "alias": "Radius", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "Radius" }, { "name": "ArcLength", "type": "esriFieldTypeDouble", "alias": "Arc Length", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "ArcLength" }, { "name": "Radius2", "type": "esriFieldTypeDouble", "alias": "Radius2", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "Radius2" }, { "name": "COGOType", "type": "esriFieldTypeInteger", "alias": "COGO Type", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "COGOType" }, { "name": "IsCOGOGround", "type": "esriFieldTypeInteger", "alias": "Is COGO Ground", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "IsCOGOGround" }, { "name": "Rotation", "type": "esriFieldTypeDouble", "alias": "Rotation", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "Rotation" }, { "name": "Scale", "type": "esriFieldTypeDouble", "alias": "Scale", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "Scale" }, { "name": "DirectionAccuracy", "type": "esriFieldTypeDouble", "alias": "Direction Accuracy", "domain": null, "editable": true, "nullable": true, "defaultValue": 30, "modelName": "DirectionAccuracy" }, { "name": "DistanceAccuracy", "type": "esriFieldTypeDouble", "alias": "Distance Accuracy", "domain": null, "editable": true, "nullable": true, "defaultValue": 0.4921249999999999, "modelName": "DistanceAccuracy" }, { "name": "ParentLineID", "type": "esriFieldTypeGUID", "alias": "Parent Line ID", "domain": null, "editable": true, "nullable": true, "length": 38, "defaultValue": null, "modelName": "ParentLineID" }, { "name": "LabelPosition", "type": "esriFieldTypeInteger", "alias": "Label Position", "domain": null, "editable": true, "nullable": true, "defaultValue": 1, "modelName": "LabelPosition" }, { "name": "created_user", "type": "esriFieldTypeString", "alias": "Created By", "domain": null, "editable": false, "nullable": true, "length": 255, "defaultValue": null, "modelName": "created_user" }, { "name": "created_date", "type": "esriFieldTypeDate", "alias": "Created Date", "domain": null, "editable": false, "nullable": true, "length": 8, "defaultValue": null, "modelName": "created_date" }, { "name": "last_edited_user", "type": "esriFieldTypeString", "alias": "Modified By", "domain": null, "editable": false, "nullable": true, "length": 255, "defaultValue": null, "modelName": "last_edited_user" }, { "name": "last_edited_date", "type": "esriFieldTypeDate", "alias": "Modified Date", "domain": null, "editable": false, "nullable": true, "length": 8, "defaultValue": null, "modelName": "last_edited_date" }, { "name": "VALIDATIONSTATUS", "type": "esriFieldTypeSmallInteger", "alias": "Validation status", "domain": null, "editable": true, "nullable": true, "defaultValue": 6, "modelName": "VALIDATIONSTATUS" }, { "name": "ORIG_ID", "type": "esriFieldTypeString", "alias": "ORIG_ID", "domain": null, "editable": true, "nullable": true, "length": 255, "defaultValue": null, "modelName": "ORIG_ID" }, { "name": "DimCode", "type": "esriFieldTypeSmallInteger", "alias": "DimCode", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "DimCode" }, { "name": "NewDim", "type": "esriFieldTypeDouble", "alias": "NewDim", "domain": null, "editable": true, "nullable": true, "defaultValue": null, "modelName": "NewDim" }, { "name": "Shape__Length", "type": "esriFieldTypeDouble", "alias": "Shape.STLength()", "domain": null, "editable": false, "nullable": true, "defaultValue": null, "modelName": "Shape.STLength()", "required": true } ], "geometryField": { "name": "Shape", "type": "esriFieldTypeGeometry", "alias": "Shape", "domain": null, "editable": false, "nullable": true, "defaultValue": null, "modelName": "Shape" }, "indexes": [ { "name": "R105_pk", "isAscending": true, "isUnique": true, "description": "", "fields": "OBJECTID" }, { "name": "S63_idx", "isAscending": true, "isUnique": true, "description": "", "fields": "Shape" } ], "datesInUnknownTimezone": false, "dateFieldsTimeReference": { "timeZone": "Eastern Standard Time", "timeZoneIANA": "America/New_York", "respectsDaylightSaving": true }, "preferredTimeReference": null, "types": [], "templates": [ { "name": "ParcelLines", "description": "", "prototype": { "attributes": { "NewDim": null, "CreatedByRecord": null, "RetiredByRecord": null, "Direction": null, "Distance": null, "Radius": null, "ArcLength": null, "Radius2": null, "COGOType": null, "IsCOGOGround": null, "Rotation": null, "Scale": null, "DirectionAccuracy": 30, "DistanceAccuracy": 0.4921249999999999, "ParentLineID": null, "LabelPosition": 1, "DimCode": null, "ORIG_ID": null, "VALIDATIONSTATUS": 6 } }, "drawingTool": "esriFeatureEditToolLine" } ], "maxRecordCount": 1000, "supportedQueryFormats": "JSON, geoJSON, PBF", "supportedExportFormats": "sqlite,filegdb,shapefile,csv,geojson", "capabilities": "Query", "useStandardizedQueries": true, "bigIntegerRestrictedTo53Bits": true, "supportedSpatialRelationships": [ "esriSpatialRelIntersects", "esriSpatialRelContains", "esriSpatialRelCrosses", "esriSpatialRelEnvelopeIntersects", "esriSpatialRelIndexIntersects", "esriSpatialRelOverlaps", "esriSpatialRelTouches", "esriSpatialRelWithin", "esriSpatialRelRelation" ], "supportsAppend": true, "supportedAppendFormats": "FILEGDB,PBF", "standardMaxRecordCount": 8000, "tileMaxRecordCount": 4000, "standardMaxRecordCountNoGeometry": 32000, "maxRecordCountFactor": 1 }