Point File DeskGet COGO
GIS exchange

Export survey stations to GeoJSON in longitude, latitude order

Build and inspect a two-feature GeoJSON example, preserve station IDs as properties, and establish what to do with projected coordinates and elevations.

On this pageWork from named geographic valuesProjected eastings need a transformationDecide whether height belongs in the geometryTest the result away from the exporter

A mapping library receives a pair of numbers, not a pair of field names. For RFC 7946 GeoJSON, a point position starts with longitude, then latitude. A station listed in a field report as latitude 14.81000°, longitude 120.28000° must therefore begin its GeoJSON position with 120.28000. Transposing these particular values would make the latitude exceed 90°, an immediate sign that the mapping is wrong.

Work from named geographic values

For the exercise, assume both stations already have documented WGS 84 geographic coordinates in decimal degrees. Station G2 lies east of G1 at the same latitude. Preserve the station identifier as an attribute so the recipient can trace each feature to the list.

{
  "type": "FeatureCollection",
  "features": [
    {"type":"Feature","geometry":{"type":"Point","coordinates":[120.28000,14.81000]},"properties":{"point":"G1"}},
    {"type":"Feature","geometry":{"type":"Point","coordinates":[120.28100,14.81000]},"properties":{"point":"G2"}}
  ]
}

Read the output as data. Two features should be present, each with a Point geometry. The longitude difference is +0.00100° and the latitude difference is zero. This is an angular separation. Calling it 0.001 metres would give the number a unit it does not have.

Projected eastings need a transformation

A survey file containing northing 5200000 and easting 500000 cannot be converted by placing those numbers in a JSON array. The syntax would look valid, but the coordinates would be outside the geographic ranges. Establish the projected source CRS, unit and datum. Use a transformation-aware GIS export to derive geographic positions in the target system.

Check one transformed control independently before converting all the detail points. Two plausible geographic values can still be reversed when both absolute values are below 90. A station at longitude 2° and latitude 48° would plot in a very different place if written as longitude 48° and latitude 2°, yet both pairs pass a simple range test. Orientation against a known second station is a valuable additional check.

Decide whether height belongs in the geometry

RFC 7946 defines the optional third position value as height in metres relative to the WGS 84 reference ellipsoid. A field level described as 18.340 m on a local benchmark is a different quantity. Keep that value in named properties with its unit and vertical reference unless an appropriate vertical conversion has actually been completed.

For example, a two-dimensional G1 feature could carry properties for level, level_unit and level_reference. The receiving map can still display the field level in a popup without incorrectly interpreting it as ellipsoidal altitude. If a value is unknown, omit the optional geometry height. An invented zero could put a point on a physical reference surface it never occupied.

Test the result away from the exporter

Open the GeoJSON in a second reader. Confirm G1 and G2 are in the intended vicinity, G2 lies east of G1 and both identifier strings survived. Inspect the raw JSON if an altitude appears unexpectedly or a station name has been promoted to a generated row number. A web viewer may simplify symbol labels while the underlying attributes remain correct.

Send the projected survey master alongside the geographic derivative when the recipient needs engineering coordinates. Include the transformation details and explain which file is intended for web display. That gives a field team a route back from a map marker to its surveyed grid position without relying on the number of decimal places printed by a popup.

When the target is a two-dimensional web map, test one marker by clicking it and reading its identifier, then search the delivered attribute list for that same ID. The spatial display answers where the point is; the property answers which point it is. A web map that looks plausible but cannot distinguish G1 from G2 fails the second part of that test.

References

See how to import your point file into COGO