GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - GeoJSON-Net/GeoJSON.Net.Contrib: Repository for all GeoJSON.Net *.Contrib projects

BranchesTags
Open more actions menu

Latest commit

 

History

109 Commits
109 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src
src
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

NuGet Version NuGet Version NuGet Version Build status

GeoJSON.Net.Contrib

Repository for all GeoJSON.Net *.Contrib projects

GeoJSON.Net.Contrib.MsSqlSpatial

Allows conversion from / to Microsoft Sql Server geometry and geography data types.

NuGet package: Install-Package GeoJSON.Net.Contrib.MsSqlSpatial

Conversion examples:

using GeoJSON.Net.Geometry;
using Microsoft.SqlServer.Types;
using GeoJSON.Net.Contrib.MsSqlSpatial;

// SqlGeometry sample point
SqlGeometry simplePoint = SqlGeometry.Point(1, 47, 4326);

// SqlGeometry -> GeoJSON example
Point point = simplePoint.ToGeoJSONObject<Point>();

// GeoJSON -> SqlGeometry example
SqlGeometry sqlPoint = point.ToSqlGeometry(4326);

WKT conversion examples:

using GeoJSON.Net.Contrib.MsSqlSpatial;
using GeoJSON.Net.Geometry;

// LineString from WKT
LineString lineString = WktConvert.GeoJSONObject<LineString>("LINESTRING(1 47,1 46,0 46,0 47,1 47)");

// LineString IGeometryObject from WKT
IGeometryObject lineStringGeom = WktConvert.GeoJSONGeometry("LINESTRING(1 47,1 46,0 46,0 47,1 47)");

GeoJSON.Net.Contrib.EntityFramework

Allows conversion from / to EntityFramework geometry and geography data types.

NuGet package: Install-Package GeoJSON.Net.Contrib.EntityFramework

Conversion examples:

using GeoJSON.Net.Geometry;
using GeoJSON.Net.Contrib.EntityFramework;

// DbGeography sample point
var dbGeographyPoint = DbGeography.FromText("POINT(30 10)", 4326);

// DbGeography -> GeoJSON example
Point point = dbGeographyPoint.ToGeoJSONObject<Point>();

// GeoJSON -> DbGeography example
DbGeography dbGeographyPoint = point.ToDbGeography();

GeoJSON.Net.Contrib.Wkb

Allows conversion from / to Wkb binary types. Only X,Y,Z coordinates are supported, attempting to convert a geometry with M coordinates will throw an Exception.

NuGet package: Install-Package GeoJSON.Net.Contrib.Wkb

Conversion examples:

using GeoJSON.Net.Geometry;
using GeoJSON.Net.Contrib.Wkb;

// GeoJson sample point
Point point = new Point(new Position(53.2455662, 90.65464646));

// GeoJson -> Wkb example
byte[] wkbPoint = point.ToWkb();

// Wkb -> GeoJson example
Point pointFromWkb = wkbPoint.ToGeoJSONObject<Point>();

Contribution Guide

Development Environment

  • Git client 2.0+
  • .NET Core SDK 3.0+
  • (Optional) Development IDE, common choices are:
    • Visual Studio Code with C# extension
    • Visual Studio 2019
    • JetBrains Rider

Build, test and package the solution

Use shell of your choice (cmd.exe, powershell.exe, pwsh, bash, etc) to run the following commands:

# verify .NET SDK
dotnet --info
# => .NET Core SDK (reflecting any global.json):
# => Version: 3.1.301
# => ...

# download repository
cd <development-directory-root>
git clone https://github.com/GeoJSON-Net/GeoJSON.Net.Contrib.git
cd GeoJSON.Net.Contrib

# build ("Debug" configuration)
dotnet build src/GeoJSON.Net.Contrib.sln

# test ("Debug" configuration)
dotnet test src/GeoJSON.Net.Contrib.sln

# package ("Release" configuration)
git clean -dfx
dotnet pack --configuration Release src/GeoJSON.Net.Contrib.sln

# push all projects to NuGet server (requires "package" step above to be run first)
# note: in addition to ".nupkg", the command below will automatically
# detect ".snupkg" symbol package and push both ".nupkg" and ".snupkg"
# to the specified NuGet server; for more information see
# https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg
dotnet nuget push **/*.nupkg --api-key SECRET --source https://api.nuget.org/v3/index.json

About

Repository for all GeoJSON.Net *.Contrib projects

Topics

conversiongeojsonspatialsql-server

Resources

Readme
MIT license
Activity
Custom properties

Stars

38 stars

Watchers

11 watching

Forks

25 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.