{"id":21864776,"url":"https://github.com/fluxera/fluxera.spatial","last_synced_at":"2025-04-14T21:02:04.521Z","repository":{"id":37855820,"uuid":"461791027","full_name":"fluxera/Fluxera.Spatial","owner":"fluxera","description":"A libary that provides spatial types and support for the GeoJSON format.","archived":false,"fork":false,"pushed_at":"2024-11-14T15:36:03.000Z","size":164,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-14T15:52:13.463Z","etag":null,"topics":["dotnet","dotnet8","dotnetcore","geojson","geolocation","geospatial","spatial"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluxera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-21T09:31:55.000Z","updated_at":"2024-11-14T15:35:36.000Z","dependencies_parsed_at":"2023-02-10T15:46:10.350Z","dependency_job_id":"693fc483-a5fb-4b35-a20b-f28ffe614349","html_url":"https://github.com/fluxera/Fluxera.Spatial","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":0.02631578947368418,"last_synced_commit":"15bb411327cae0fce577b0afb19f3e5696d7d2e7"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluxera%2FFluxera.Spatial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluxera%2FFluxera.Spatial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluxera%2FFluxera.Spatial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluxera%2FFluxera.Spatial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluxera","download_url":"https://codeload.github.com/fluxera/Fluxera.Spatial/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226857027,"owners_count":17693016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","dotnet8","dotnetcore","geojson","geolocation","geospatial","spatial"],"created_at":"2024-11-28T04:12:23.370Z","updated_at":"2024-11-28T04:12:24.127Z","avatar_url":"https://github.com/fluxera.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://dev.azure.com/fluxera/Foundation/_apis/build/status/GitHub/fluxera.Fluxera.Spatial?branchName=main\u0026stageName=BuildAndTest)](https://dev.azure.com/fluxera/Foundation/_build/latest?definitionId=81\u0026branchName=main)\n\n# Fluxera.Spatial\nA libary that provides spatial types based on GeoJSON defined in [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946).\n\n## Usage\n\nJust use the provied structs to define your classes that need gep-spatial informations in it.\n\n```C#\npublic sealed class Restaurant\n{\n\tpublic string Name { get; set; }\n\n\tpublic Point Location { get; set; }\n}\n```\n\n## Supported GeoJSON objects\n\nThis libary privide an inclomple implementation of [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946) at the moment.\nThe basic geometries are supported.\n\n- ```Point```\n- ```MultiPoint```\n- ```LineString```\n- ```MultiLineString```\n- ```Polygon```\n- ```MultiPolygon```\n- ```GeometryCollection```\n\nPlease refer to the documentation of [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946) for details.\n\n## Serialization Support\n\nAt the moment serialization support is available for:\n\n- [Newtonsoft.Json (JSON.NET)](https://github.com/JamesNK/Newtonsoft.Json)\n- [LiteDB](https://github.com/mbdavid/LiteDB)\n- [MongoDB](https://github.com/mongodb/mongo-csharp-driver)\n- [System.Text.Json](https://github.com/dotnet/corefx/tree/master/src/System.Text.Json)\n\nThe serializers make sure that the objects are serialized in the GeoJSON format and in case of\ndatabases also stored im the correct format to support indexing and geo queries.\n\n### Newtonsoft.Json (JSON.NET)\n\nTo support the GeoJSON objects in JSON.NET use the ```UseSpatial``` extension method on the ```JsonSerializerSettings```.\n\n```c#\nJsonSerializerSettings settings = new JsonSerializerSettings();\n\n// Use the serialization support for GeoJSON objects.\nsettings.UseSpatial();\n\nJsonConvert.DefaultSettings = () =\u003e settings;\n```\n\n### LiteDB\n\nTo support the GeoJSON objects in LiteDB use the ```UseSpatial``` extension method on the global ```BsonMapper```.\n\n```C#\nBsonMapper.Global.UseSpatial();\n```\n\n### MongoDB\n\nTo support the GeoJSON objects in MongoDB use the ```UseSpatial``` extension method on a ```ConventionPack```.\n\n```C#\nConventionPack pack = new ConventionPack();\npack.UseSpatial();\nConventionRegistry.Register(\"ConventionPack\", pack, t =\u003e true);\n```\n\n### System.Text.Json\n\nTo support the GeoJSON objects in System.Text.Json use the ```UseSpatial``` extension method on the ```JsonSerializerOptions```.\n\n```C#\nprivate JsonSerializerOptions options;\n\nthis.options = new JsonSerializerOptions\n{\n\tWriteIndented = false\n};\nthis.options.UseSpatial();\n\nJsonSerializer.Serialize(Point.Empty, this.options);\n```\n\n## References\n\n[RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946)\n\n## Future\n\nWe plan to add support for EFCore and OData and to add the missing pieces of the RFC Specification.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluxera%2Ffluxera.spatial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluxera%2Ffluxera.spatial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluxera%2Ffluxera.spatial/lists"}