{ "extent": { "ymin": 1187390.7099737525, "xmin": 275006.31003937125, "ymax": 2186459.0265748054, "xmax": 1054532.1938976385, "spatialReference": { "falseM": -100000, "xyTolerance": 0.0032808398950131203, "mUnits": 10000, "zUnits": 10000, "latestWkid": 2223, "zTolerance": 0.001, "wkid": 2223, "xyUnits": 3048, "mTolerance": 0.001, "falseX": -17746700, "falseY": -44067300, "falseZ": -100000 } }, "maxRecordCount": 2000, "datesInUnknownTimezone": false, "ownershipBasedAccessControlForFeatures": {"allowOthersToQuery": true}, "type": "Feature Layer", "displayFieldExpressionInfo": { "expression": "// Change the settings portion to configure direction format, rounding and abbreviations\n// This is an Arcade expression\n\n// SETTINGS\nvar ShowDistance = true; //set as 'true' to show distance\nvar ShowDirection = true; //set as 'true' to show direction\nvar DirectionType = 1; // 1 = Quadrant Bearing; 2 = North Azimuth; 3 = South Azimuth\nvar ShowRadius = true; //set as 'true' to show radius\nvar ShowCurveParameter = true; //set as 'true' to show a curve parameter\nvar CurveParameter = \"ArcLength\"; //set as 'ArcLength' or 'Chord' or 'Angle' for central angle. Case sensitive!\nvar ErrorString = \"COGO ERROR\"; //set to display invalid COGO combinations\nvar RadiusAbbr = 'R='; //radius abbreviation\nvar Radius2Abbr = 'R2='; //radius2 abbreviation for spiral curves\nvar ArclengthAbrr = 'L='; //arclength abbreviation\nvar ChordAbbr = 'C='; //chord abbreviation\nvar AngleAbbr = 'A='; //central Angle abbreviation\nvar DistUnitRounding = 2; //number of decimal places for distance units: distance, radius, arclength & chord\nvar NumberFormat = \"#,###.00\" //number format. In this example: thousands separator with padding of 2 zeros\n\n// VARIABLES\nvar cogo_direction = $feature.Direction;\nvar cogo_distance = $feature.Distance;\nvar cogo_radius = $feature.Radius;\nvar cogo_arclength = $feature.Arclength;\nvar cogo_radius2 = $feature.Radius2\nvar binaryDictionary; //binary dictionary to check COGO combinations\nvar checksum = 0; //initialize checksum\nvar validValuesArray; //array of valid values for COGO combinations\nvar partialValuesArray; //array of partial values for COGO\nvar directionStr = \"\"; //direction string using for label\nvar distanceStr = \"\"; //distance string using for label\nvar radiusStr = \"\"; //radius string using for label\nvar radius2Str = \"\"; //radius2 string using for labeling spiral curves\nvar curveStr = \"\"; //curve parameter string using for label\nvar angleRad; //curve angle in radians\nvar COGOValidity; //COGO combinations validity. can be valid, partial or invalid.\n\nif (IsEmpty(cogo_direction) && IsEmpty(cogo_distance) && IsEmpty(cogo_radius) && IsEmpty(cogo_radius2) && IsEmpty(cogo_arclength)){\n return \"\"\n}\n\nfunction NorthAzimuth2Quadbearing(azimuth){\n return ConvertDirection(azimuth, {directionType:'North', angleType: 'Degrees'}, {directionType:'Quadrant', angleType: 'DMS', outputType: 'text', format: 'pd[°]mm[\\']ss[\"]b'})\n}\n\nfunction DMS_North(azimuth){\n return ConvertDirection(azimuth, {directionType:'North', angleType: 'Degrees'}, {directionType:'North', angleType: 'DMS', outputType: 'text', format: 'd[°]mm[\\']ss[\"]'})\n}\n\nfunction DMS_South(azimuth){\n return ConvertDirection(azimuth, {directionType:'North', angleType: 'Degrees'}, {directionType:'South', angleType: 'DMS', outputType: 'text', format: 'd[°]mm[\\']ss[\"]'})\n}\n\nfunction IsValidCOGO(cogo_direction, cogo_distance, cogo_radius, cogo_arclength, cogo_radius2) {\n binaryDictionary= Dictionary('dir', 1, 'dist',2, 'rad',4, 'arc',8, 'rad2',16)\n if (!IsEmpty(cogo_direction)) {checksum+=binaryDictionary.dir}\n if (!IsEmpty(cogo_distance)) {checksum+=binaryDictionary.dist}\n if (!IsEmpty(cogo_radius)) {checksum+=binaryDictionary.rad}\n if (!IsEmpty(cogo_arclength)) {checksum+=binaryDictionary.arc}\n if (!IsEmpty(cogo_radius2)) {checksum+=binaryDictionary.rad2}\n \n validValuesArray=[0,3,13,29]; //array of valid combinations: '0' for nothing, ... '13' for direction & radius & arclength ...\n partialValuesArray=[1,2,4,5,8,9,12,16,17,20,21,24,25,27,28]; //array of partial combinations: '1' for only direction, '2' for only distance, '4' for only radius...\n //Invalid Values = [6,7,10,11,14,15,18,19,22,23,26,30,31]\n\n if (IndexOf(validValuesArray,checksum)>-1) { // a negative value is returned if checksum value is not in the a valid combination array\n return \"valid\";\n }\n if (IndexOf(partialValuesArray,checksum)>-1){\n return \"partial\";\n }\n return \"invalid\";\n}\n\nfunction COGOTypePrefixPostfix(cogotypeValue){\n if (ShowCOGOType){\n if (cogotypeValue == 1) { //Entered\n return COGOType_Entered\n }\n else if(cogotypeValue == 2) { //From Geometry\n return COGOType_FromGeom\n }\n else if(cogotypeValue == 3) { //Computed\n return COGOType_Computed\n }\n else { //If not set or invalid value\n return ['', '']\n }\n }\n else{\n return(['', ''])\n }\n}\n\nCOGOValidity = IsValidCOGO(cogo_direction, cogo_distance, cogo_radius, cogo_arclength, cogo_radius2);\nif ( COGOValidity == \"invalid\") { //if invalid COGO return error string\n return ErrorString;\n}\n\n\n// Direction string\nif (ShowDirection) {\n if (IsEmpty(cogo_direction)==false) {\n if (DirectionType == 1) { //using quadrant bearing format\n directionStr = NorthAzimuth2Quadbearing(cogo_direction);\n }\n else if (DirectionType == 2) { //using north azimuth format\n directionStr = DMS_North(cogo_direction);\n }\n else if (DirectionType == 3) { //using south azimuth format\n directionStr = DMS_South(cogo_direction);\n }\n }\n}\n\n// Distance string\nif (ShowDistance) {\n if (IsEmpty(cogo_distance)==false) {\n distanceStr = text(round(cogo_distance,DistUnitRounding), NumberFormat);\n }\n}\n\n//Radius String\nif (ShowRadius) {\n if (!IsEmpty(cogo_radius)) { //it can be a curve or a spiral\n if (IsEmpty(cogo_radius2)) { //if radius2 is empty this is a curve\n radiusStr = RadiusAbbr + \" \" + text(round(cogo_radius, DistUnitRounding), NumberFormat);\n }\n else { // it is a spiral\n radiusStr = RadiusAbbr + \" \" + text(round(cogo_radius, DistUnitRounding),NumberFormat);\n radius2Str = Radius2Abbr + \" \" + text(round(cogo_radius2, DistUnitRounding),NumberFormat);\n if (cogo_radius == 0) { //substitute to infinity sign\n radiusStr = RadiusAbbr + \" ∞ \";\n }\n if (cogo_radius2 == 0) { //substitute to infinity sign\n radius2Str = Radius2Abbr + \" ∞ \";\n }\n }\n\n }\n}\n\n// Curve Parameter\nif (ShowCurveParameter) {\n if (!IsEmpty(cogo_arclength)) {\n if (CurveParameter == 'ArcLength') {\n curveStr = text(round(cogo_arclength, DistUnitRounding), NumberFormat); //return Arc length\n }\n angleRad = cogo_arclength/(abs(cogo_radius)) //calculate angle in radians\n if (CurveParameter == 'Angle') {\n curveStr = DMS_North(angleRad * 180 / pi); // convert radian to degrees and show as DMS\n }\n if (CurveParameter == 'Chord') {\n curveStr = text(round((2 * abs(cogo_radius) * Sin(angleRad/2)),DistUnitRounding), NumberFormat); //calculate chord length\n }\n }\n}\n\n//Determine type of curve displayed\nvar CurveTypePrefix = \"\"\nif (!IsEmpty(curveStr)){\n if (CurveParameter == 'ArcLength'){\n CurveTypePrefix = ArclengthAbrr\n }\n else if (CurveParameter == 'Angle'){\n CurveTypePrefix = AngleAbbr\n }\n else if (CurveParameter == 'Chord'){\n CurveTypePrefix = ChordAbbr\n }\n}\n\nvar isStraightLine = IsEmpty(radiusStr) && IsEmpty(radius2Str) && IsEmpty(curveStr)\n\n\n// Assemble label string\nif (isStraightLine){\n if (!IsEmpty(directionStr) && !IsEmpty(distanceStr)){ //If Direction and Distance are both NOT Empty\n return directionStr + ' ' + distanceStr;\n }\n else if (IsEmpty(directionStr)){ //If Direction is empty\n return distanceStr;\n }\n else{ //If Distance is empty\n return directionStr\n }\n}\n\n//Curves\n//If one or both radii and the curve string are NOT empty show the full curve\nif ((!IsEmpty(radiusStr) || !IsEmpty(radius2Str)) && !IsEmpty(curveStr)){\n return radiusStr + \" \" + radius2Str + ' ' + CurveTypePrefix + ' ' + curveStr;\n}\n//If the curve is empty\nelse if (IsEmpty(curveStr)){\n return radiusStr + \" \" + radius2Str\n}\n//If both radius are empty\nelse{\n return CurveTypePrefix + ' ' + curveStr;\n}\n\n\n", "title": "Custom" }, "maxSelectionCount": 2000, "subtypes": [], "relationships": [], "cimVersion": "3.6.0", "isDataArchived": true, "id": 1, "archivingInfo": { "startArchivingMoment": 1719915911000, "supportsQueryWithHistoricMoment": true }, "spatialReference": { "falseM": -100000, "xyTolerance": 0.0032808398950131203, "mUnits": 10000, "zUnits": 10000, "latestWkid": 2223, "zTolerance": 0.001, "wkid": 2223, "xyUnits": 3048, "mTolerance": 0.001, "falseX": -17746700, "falseY": -44067300, "falseZ": -100000 }, "subtypeFieldName": null, "supportsStatistics": true, "isDataVersioned": true, "hasGeometryProperties": true, "supportsAdvancedQueries": true, "parentLayer": null, "subLayers": [], "currentVersion": 12, "referenceScale": 0, "canScaleSymbols": false, "name": "Boundary", "displayField": "RECORDBOUNDARYCOMMENT", "fields": [ { "nullable": false, "domain": null, "name": "OBJECTID", "alias": "OBJECTID", "type": "esriFieldTypeOID" }, { "nullable": true, "domain": null, "name": "Direction", "alias": "Direction", "type": "esriFieldTypeDouble" }, { "nullable": true, "domain": null, "name": "Distance", "alias": "Distance", "type": "esriFieldTypeDouble" }, { "nullable": true, "domain": null, "name": "Radius", "alias": "Radius", "type": "esriFieldTypeDouble" }, { "nullable": true, "domain": null, "name": "ArcLength", "alias": "Arc Length", "type": "esriFieldTypeDouble" }, { "nullable": true, "domain": null, "name": "Radius2", "alias": "Radius2", "type": "esriFieldTypeDouble" }, { "nullable": true, "domain": { "splitPolicy": "esriSPTDefaultValue", "name": "Boundary - RecordBoundaryType", "description": "RecordBoundaryType values for Boundary lines", "type": "codedValue", "codedValues": [ { "code": 1, "name": "Parcel" }, { "code": 2, "name": "Right of Way" }, { "code": 3, "name": "Centerline" }, { "code": 4, "name": "Railroad Right of Way" }, { "code": 6, "name": "ROW Non-cadastral" }, { "code": 7, "name": "RR ROW Non-cadastral" }, { "code": 8, "name": "Private ROW Non-cadastral" }, { "code": 9, "name": "Lot Line" }, { "code": 15, "name": "Vacated Right of Way" }, { "code": 16, "name": "Easement" }, { "code": 17, "name": "Private Right of Way" }, { "code": 18, "name": "Abandoned Right of Way - Platted" }, { "code": 19, "name": "Easement Centerline" }, { "code": 20, "name": "Subdivision Boundary - Non-Cadastral" }, { "code": 21, "name": "Non-Cadastral Line" }, { "code": 22, "name": "Abandoned Easement" }, { "code": 23, "name": "Zoning Split" }, { "code": 24, "name": "Historic Line" }, { "code": 25, "name": "Building Envelope" }, { "code": 26, "name": "Hiatus or Disputed Lot" }, { "code": 999, "name": "NoCode" } ], "mergePolicy": "esriMPTDefaultValue" }, "name": "RECORDBOUNDARYTYPE", "alias": "Type", "type": "esriFieldTypeInteger" }, { "nullable": true, "domain": null, "name": "OFFSETLEFT", "alias": "OFFSETLEFT", "type": "esriFieldTypeDouble" }, { "nullable": true, "domain": null, "name": "OFFSETRIGHT", "alias": "OFFSETRIGHT", "type": "esriFieldTypeDouble" }, { "nullable": true, "domain": null, "name": "RECORDBOUNDARYCOMMENT", "length": 255, "alias": "Comment", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "DIRECTIONLEG", "length": 12, "alias": "DIRECTION", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "DISTANCELEG", "length": 10, "alias": "DISTANCE", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "RADIUSLEG", "length": 10, "alias": "RADIUS", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "DELTALEG", "length": 10, "alias": "DELTA", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "TANGENTLEG", "length": 10, "alias": "TANGENT", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "ARCLENGTHLEG", "length": 10, "alias": "ARCLENGTH", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "SIDE", "length": 1, "alias": "SIDE", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "RECORDBOUNDARYID", "length": 15, "alias": "RECORDBOUNDARYID", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "CBSOURCEID", "length": 10, "alias": "CBSOURCEID", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "created_user", "length": 255, "alias": "created_user", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "created_date", "length": 8, "alias": "created_date", "type": "esriFieldTypeDate" }, { "nullable": true, "domain": null, "name": "last_edited_user", "length": 255, "alias": "last_edited_user", "type": "esriFieldTypeString" }, { "nullable": true, "domain": null, "name": "last_edited_date", "length": 8, "alias": "last_edited_date", "type": "esriFieldTypeDate" }, { "nullable": false, "domain": null, "name": "GlobalID", "length": 38, "alias": "GlobalID", "type": "esriFieldTypeGlobalID" }, { "nullable": true, "domain": null, "name": "SHAPE.STLength()", "alias": "SHAPE.STLength()", "type": "esriFieldTypeDouble" } ], "dateFieldsTimeReference": null, "preferredTimeReference": null, "useStandardizedQueries": true, "sourceSpatialReference": { "falseM": 0, "xyTolerance": 0.0032808398950131203, "mUnits": 1, "zUnits": 1, "latestWkid": 2223, "zTolerance": 0.001, "wkid": 2223, "xyUnits": 3048, "mTolerance": 0.001, "falseX": -17746700, "falseY": -44067300, "falseZ": 0 }, "description": "", "canModifyLayer": true, "supportedSpatialRelationships": [ "esriSpatialRelIntersects", "esriSpatialRelContains", "esriSpatialRelCrosses", "esriSpatialRelEnvelopeIntersects", "esriSpatialRelIndexIntersects", "esriSpatialRelOverlaps", "esriSpatialRelTouches", "esriSpatialRelWithin", "esriSpatialRelRelation" ], "geometryProperties": { "shapeLengthFieldName": "SHAPE.STLength()", "units": "esriFeet", "mapUnits": {"uwkid": 9002} }, "indexes": null, "htmlPopupType": "esriServerHTMLPopupTypeAsHTMLText", "supportsDatumTransformation": true, "minScale": 0, "supportsDynamicLegends": true, "hasAttachments": false, "advancedQueryCapabilities": { "supportsStatistics": true, "supportsSqlExpression": true, "supportsTrueCurve": true, "supportsOrderBy": true, "supportsQueryRelatedPagination": true, "supportsSqlFormat": false, "useStandardizedQueries": true, "supportsLod": false, "supportsQueryWithDistance": true, "supportsQueryWithDatumTransformation": true, "supportsCountDistinct": true, "supportsCurrentUserQueries": true, "supportsAdvancedQueryRelated": true, "supportsReturningQueryExtent": true, "supportsQueryWithLodSR": false, "supportsPagination": true, "supportsDistinct": true, "supportsTimeRelation": true, "supportsQueryAnalytic": false, "supportsPercentileStatistics": true, "supportsHavingClause": true }, "subtypeField": null, "serviceItemId": "38810f6ab73140e4920d9b8fda900977", "supportsCoordinatesQuantization": true, "capabilities": "Query,Map,Data", "maxScale": 0, "supportsExceedsLimitStatistics": true, "defaultVisibility": true, "hasMetadata": true, "typeIdField": null, "defaultSubtypeCode": null, "supportedQueryFormats": "JSON, geoJSON, PBF", "hasLabels": true, "drawingInfo": { "renderer": { "uniqueValueGroups": [{ "heading": "", "classes": [{ "symbol": { "color": [ 0, 0, 0, 255 ], "width": 0.75, "style": "esriSLSSolid", "type": "esriSLS" }, "values": [["COGO"]], "description": "COGO", "label": "COGO" }] }], "valueExpression": "return \"COGO\"", "authoringInfo": {"colorRamp": { "colorRamps": [ { "toColor": [ 252, 207, 238, 255 ], "fromColor": [ 252, 207, 238, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 195, 252, 179, 255 ], "fromColor": [ 195, 252, 179, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 199, 252, 252, 255 ], "fromColor": [ 199, 252, 252, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 252, 230, 199, 255 ], "fromColor": [ 252, 230, 199, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 191, 179, 252, 255 ], "fromColor": [ 191, 179, 252, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 252, 185, 179, 255 ], "fromColor": [ 252, 185, 179, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 197, 216, 252, 255 ], "fromColor": [ 197, 216, 252, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 197, 252, 217, 255 ], "fromColor": [ 197, 252, 217, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 252, 184, 249, 255 ], "fromColor": [ 252, 184, 249, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 249, 252, 187, 255 ], "fromColor": [ 249, 252, 187, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 252, 215, 212, 255 ], "fromColor": [ 252, 215, 212, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 240, 252, 215, 255 ], "fromColor": [ 240, 252, 215, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" }, { "toColor": [ 252, 179, 199, 255 ], "fromColor": [ 252, 179, 199, 255 ], "type": "algorithmic", "algorithm": "esriCIELabAlgorithm" } ], "type": "multipart" }}, "valueExpressionTitle": "Custom", "uniqueValueInfos": [{ "symbol": { "color": [ 0, 0, 0, 255 ], "width": 0.75, "style": "esriSLSSolid", "type": "esriSLS" }, "label": "COGO", "value": "COGO" }], "type": "uniqueValue", "fieldDelimiter": "," }, "scaleSymbols": true, "transparency": 0, "labelingInfo": [{ "multiPart": "labelPerFeature", "symbol": { "backgroundColor": null, "kerning": true, "color": [ 0, 0, 0, 255 ], "yoffset": 0, "xoffset": 0, "haloColor": [ 255, 255, 255, 255 ], "type": "esriTS", "borderLineColor": null, "borderLineSize": null, "horizontalAlignment": "left", "haloSize": 2, "angle": 0, "rightToLeft": false, "verticalAlignment": "bottom", "font": { "size": 10, "weight": "normal", "style": "normal", "family": "Tahoma", "decoration": "none" } }, "stackLabel": false, "offsetDistance": 3, "maxScale": 0, "lineConnection": "none", "useClippedGeometry": true, "labelExpressionInfo": { "expression": "// Change the settings portion to configure direction format, color, rounding and abbreviations\n// This is an Arcade expression\n\n// SETTINGS\nvar QuadrantBearingFormat = true; //set 'true' for quadrant bearing, 'false' for north azimuth\nvar ShowDistance = true; //set as 'true' to show distance\nvar ShowDirection = true; //set as 'true' to show direction\nvar DirectionType = 1; // 1 = Quadrant Bearing; 2 = North Azimuth; 3 = South Azimuth\nvar ShowRadius = true; //set as 'true' to show radius\nvar ShowCurveParameter = true; //set as 'true' to show a curve parameter\nvar CurveParameter = \"ArcLength\"; //set as 'ArcLength' or 'Chord' or 'Angle' for central angle. Case sensitive!\nvar ErrorString = \"COGO ERROR\"; //set to display invalid COGO combinations\nvar RadiusAbbr = 'R='; //radius abbreviation\nvar Radius2Abbr = 'R2='; //radius2 abbreviation for spiral curves\nvar ArclengthAbrr = 'L='; //arclength abbreviation\nvar ChordAbbr = 'C='; //chord abbreviation\nvar AngleAbbr = 'A='; //central Angle abbreviation\nvar DistUnitRounding = 2; //number of decimal places for distance units: distance, radius, arclength & chord\nvar NumberFormat = \"#,###.00\" //number format. In this example: thousands separator with padding of 2 zeros \nvar directionColor = \"blue='255'\"; //direction color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\nvar distanceColor = \"black='255'\"; //distance color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\nvar radiusColor = \"blue='255'\"; //radius color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\nvar curveParamColor = \"black='255'\"; //curve parameter color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\nvar partialCOGOColor = \"magenta='255'\"; //partial COGO color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\nvar invalidCOGOColor = \"red='255'\"; //invalid COGO color: red, green, blue, cyan, magenta, yellow, black. You can also use RGB or CYMK combinations.\nvar fontNameSize = \"\"; //font type and size\n\n// VARIABLES\nvar cogo_direction = $feature.Direction;\nvar cogo_distance = $feature.Distance;\nvar cogo_radius = $feature.Radius;\nvar cogo_arclength = $feature.Arclength;\nvar cogo_radius2 = $feature.Radius2\nvar binaryDictionary; //binary dictionary to check COGO combinations\nvar checksum = 0; //initialize checksum\nvar validValuesArray; //array of valid values for COGO combinations\nvar partialValuesArray; //array of partial values for COGO\nvar degrees;\nvar minutes;\nvar seconds;\nvar DMS;\nvar directionStr = \"\"; //direction string using for label\nvar distanceStr = \"\"; //distance string using for label\nvar radiusStr = \"\"; //radius string using for label\nvar radius2Str = \"\"; //radius2 string using for labeling spiral curves\nvar curveStr = \"\"; //curve parameter string using for label\nvar angleRad; //curve angle in radians\nvar COGOValidity; //COGO combinations validity. can be valid, partial or invalid.\n\n\nif (IsEmpty(cogo_direction) && IsEmpty(cogo_distance) && IsEmpty(cogo_radius) && IsEmpty(cogo_radius2) && IsEmpty(cogo_arclength)){\n return \"\"\n}\n\nfunction NorthAzimuth2Quadbearing(azimuth){\n return ConvertDirection(azimuth, {directionType:'North', angleType: 'Degrees'}, {directionType:'Quadrant', angleType: 'DMS', outputType: 'text', format: 'pd[°]mm[\\']ss[\"]b'})\n}\n\nfunction DMS_North(azimuth){\n return ConvertDirection(azimuth, {directionType:'North', angleType: 'Degrees'}, {directionType:'North', angleType: 'DMS', outputType: 'text', format: 'd[°]mm[\\']ss[\"]'})\n}\n\nfunction DMS_South(azimuth){\n return ConvertDirection(azimuth, {directionType:'North', angleType: 'Degrees'}, {directionType:'South', angleType: 'DMS', outputType: 'text', format: 'd[°]mm[\\']ss[\"]'})\n}\n\nfunction IsValidCOGO(cogo_direction, cogo_distance, cogo_radius, cogo_arclength, cogo_radius2) {\n binaryDictionary= Dictionary('dir', 1, 'dist',2, 'rad',4, 'arc',8, 'rad2',16)\n if (!IsEmpty(cogo_direction)) {checksum+=binaryDictionary.dir}\n if (!IsEmpty(cogo_distance)) {checksum+=binaryDictionary.dist}\n if (!IsEmpty(cogo_radius)) {checksum+=binaryDictionary.rad}\n if (!IsEmpty(cogo_arclength)) {checksum+=binaryDictionary.arc}\n if (!IsEmpty(cogo_radius2)) {checksum+=binaryDictionary.rad2}\n \n validValuesArray=[0,3,13,29]; //array of valid combinations: '0' for nothing, ... '13' for direction & radius & arclength ...\n partialValuesArray=[1,2,4,5,8,9,12,16,17,20,21,24,25,27,28]; //array of partial combinations: '1' for only direction, '2' for only distance, '4' for only radius...\n //Invalid Values = [6,7,10,11,14,15,18,19,22,23,26,30,31]\n \n if (IndexOf(validValuesArray,checksum)>-1) { // a negative value is returned if checksum value is not in the a valid combination array\n return \"valid\";\n }\n if (IndexOf(partialValuesArray,checksum)>-1){\n return \"partial\"; \n }\n return \"invalid\";\n}\n\nCOGOValidity = IsValidCOGO(cogo_direction, cogo_distance, cogo_radius, cogo_arclength, cogo_radius2);\nif ( COGOValidity == \"invalid\") { //if invalid COGO return error string\n return \"\" + fontNameSize + ErrorString + \"<\/FNT><\/CLR><\/BOL>\"; \n}\n\nif (COGOValidity == \"partial\") { //if a partial COGO change colors\n distanceColor = partialCOGOColor;\n directionColor = partialCOGOColor;\n radiusColor = partialCOGOColor;\n curveParamColor = partialCOGOColor;\n}\n\n// Direction string\nif (ShowDirection) {\n if (IsEmpty(cogo_direction)==false) {\n if (DirectionType == 1) { //using quadrant bearing format\n directionStr = NorthAzimuth2Quadbearing(cogo_direction);\n }\n else if (DirectionType == 2) { //using north azimuth format\n directionStr = DMS_North(cogo_direction);\n }\n else if (DirectionType == 3) { //using south azimuth format\n directionStr = DMS_South(cogo_direction);\n }\n }\n}\n\n// Distance string\nif (ShowDistance) {\n if (IsEmpty(cogo_distance)==false) {\n distanceStr = text(round(cogo_distance,DistUnitRounding), NumberFormat);\n }\n}\n\n//Radius String\nif (ShowRadius) {\n if (!IsEmpty(cogo_radius)) { //it can be a curve or a spiral\n if (IsEmpty(cogo_radius2)) { //if radius2 is empty this is a curve\n radiusStr = RadiusAbbr + \" \" + text(round(cogo_radius, DistUnitRounding), NumberFormat);\n }\n else { // it is a spiral\n radiusStr = RadiusAbbr + \" \" + text(round(cogo_radius, DistUnitRounding),NumberFormat);\n radius2Str = Radius2Abbr + \" \" + text(round(cogo_radius2, DistUnitRounding),NumberFormat);\n if (cogo_radius == 0) { //substitute to infinity sign\n radiusStr = RadiusAbbr + \" ∞ \";\n }\n if (cogo_radius2 == 0) { //substitute to infinity sign\n radius2Str = Radius2Abbr + \" ∞ \";\n }\n } \n \n }\n}\n\n// Curve Parameter\nif (ShowCurveParameter) {\n if (!IsEmpty(cogo_arclength)) {\n if (CurveParameter == 'ArcLength') {\n curveStr = text(round(cogo_arclength, DistUnitRounding), NumberFormat); //return Arc length\n }\n angleRad = cogo_arclength/(abs(cogo_radius)) //calculate angle in radians\n if (CurveParameter == 'Angle') {\n curveStr = DMS_North(angleRad * 180 / pi); // convert radian to degrees and show as DMS\n }\n if (CurveParameter == 'Chord') {\n curveStr = text(round((2 * abs(cogo_radius) * Sin(angleRad/2)),DistUnitRounding), NumberFormat); //calculate chord length\n } \n }\n}\n\n//Determine type of curve displayed\nvar CurveTypePrefix = \"\"\nif (!IsEmpty(curveStr)){\n if (CurveParameter == 'ArcLength'){\n CurveTypePrefix = ArclengthAbrr\n }\n else if (CurveParameter == 'Angle'){\n CurveTypePrefix = AngleAbbr\n }\n else if (CurveParameter == 'Chord'){\n CurveTypePrefix = ChordAbbr\n }\n}\n\nvar isStraightLine = IsEmpty(radiusStr) && IsEmpty(radius2Str) && IsEmpty(curveStr)\n\n// Assemble label string\n\n//Straight lines\nif (isStraightLine){\n if (!IsEmpty(directionStr) && !IsEmpty(distanceStr)){ //If Direction and Distance are both NOT Empty\n return fontNameSize + \"\" + directionStr + \"<\/CLR>\" + \"\\n\" +\n \"\" + distanceStr + \"<\/CLR><\/FNT>\";\n }\n else if (IsEmpty(directionStr)){ //If Direction is empty\n return fontNameSize + \"\" +\n distanceStr + \"<\/CLR><\/FNT>\";\n }\n else{ //If Distance is empty\n return fontNameSize + \"\" + directionStr + \"<\/CLR><\/FNT>\";\n }\n}\n\n//Curves\n//If one or both radii and the curve string are NOT empty show the full curve\nif ((!IsEmpty(radiusStr) || !IsEmpty(radius2Str)) && !IsEmpty(curveStr)){\n return fontNameSize + \"\" + radiusStr + \"<\/CLR>\" + \" \" +\n \"\" + radius2Str + \"<\/CLR>\" + \"\\n\" +\n \"\" + CurveTypePrefix + ' ' +\n curveStr + \"<\/CLR><\/FNT>\";\n}\n//If the curve is empty\nelse if (IsEmpty(curveStr)){\n return fontNameSize + \"\" + radiusStr + \"<\/CLR>\" + \" \" +\n \"\" + radius2Str + \"<\/CLR><\/FNT>\"\n}\n//If both radius are empty\nelse{\n return fontNameSize + \"\" + CurveTypePrefix + ' ' +\n curveStr + \"<\/CLR><\/FNT>\";\n}", "title": "DirectionAndDistance" }, "deconflictionStrategy": "static", "priority": -1, "labelPlacement": "esriServerLinePlacementBelowStart", "removeDuplicates": "none", "textLayout": "followFeature", "lineOrientation": "direction", "name": "Direction and Distance", "minScale": 2000, "useCodedValues": false }] }, "geometryField": {}, "copyrightText": "", "geometryType": "esriGeometryPolyline" }