2022-04-11 12:26:38 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 11:58:12 +02:00
2022-04-11 12:26:38 +02:00
2022-04-11 11:58:12 +02:00

Oceanbox.GeoJson

Run

dotnet run

Build

dotnet run Bundle

Example usage

let geoJson = """
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [102.0, 0.5]
      },
      "properties": {
        "prop0": "value0"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
            [100.0, 1.0], [100.0, 0.0]
          ]
        ]
      }
    }
  ]
}
"""

let readJson () =
    let result = FeatureCollection.Decode geoJson
    match result with
    | Ok json -> printfn $"%A{json.Features}"
    | Error e -> printfn $"decode failed: {e}"

let encodeJson (json: FeatureCollection) = json.Encode ()
Description
No description provided
Readme MIT 286 KiB
v1.1.1 Latest
2025-09-02 08:29:26 +00:00
Languages
F# 62.3%
Nix 34%
Just 3.7%