Description
Construct a GeoJSON LineString Feature from two matching-width positions.
GeoJSON separates a Feature’s identifier, geometry and properties. Null geometry, an explicit null property and an omitted property are distinct states. Coordinate-order labels do not transform positions, and stringifying a value already entered as a number cannot restore lost identifier precision or spelling.
Construct a GeoJSON LineString Feature from two matching-width positions.
When to use this tool
Use Line Two Position Endpoint Feature when checking the stated restricted GeoJSON construction, property or identifier convention.
How to use the tool and how it works
- Enter featureId, startPosition, endPosition. Follow any array-alignment requirements below. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read featureJson. Use the output convention below.
Require startPosition to contain two or three finite coordinates and endPosition to have the same length. Serialize a Feature with supplied ID, a two-position LineString and empty properties.1
GeoJSON positions use longitude then latitude, with optional altitude. This constructor preserves supplied coordinates without checking geographic ranges.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| featureId | Feature Id | Required. Text; maximum UTF-16 length 8192. |
| startPosition | Two or three finite coordinates; longitude/latitude range and order are not validated. | Required. Array of finite number; maximum items 256. |
| endPosition | End Position | Required. Array of finite number; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| featureJson | Feature Json | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"featureId": "F17",
"startPosition": [
1,
2
],
"endPosition": [
3,
4
]
},
"output": {
"featureJson": "{\"type\":\"Feature\",\"id\":\"F17\",\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[1,2],[3,4]]},\"properties\":{}}"
}
} Limitations and assumptions
- Positions are not range-checked or reprojected; the tool does not verify longitude/latitude order, geodesic shape or complete RFC 7946 compatibility.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Validate the complete Feature against the intended GeoJSON contract and use verified longitude/latitude and datum conventions for actual geographic data exchange.
References
Similar or alternative tools
- Geometry Coordinate Order Token
Record a coordinate-order label without changing a geometry's coordinates.
- Feature Null Property Preservation
Construct a null-geometry GeoJSON Feature with an explicit null property or its omission.