7f19df0271783045430c78faa3d683f603b47415
## [1.0.1](https://gitlab.com/oceanbox/Oceanbox.GeoJson/compare/v1.0.0...v1.0.1) (2022-04-12) ### Bug Fixes * bad parser for MultiPolygons ([10e1f21](10e1f21a74))
Oceanbox.GeoJson
Build
dotnet run
Package
dotnet run pack
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 ()