Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Microsoft.Spatial and System.Spatial libraries

I would like to know what is the difference between two spatial libraries - Microsoft.Spatial and System.Spatial?

When I'm looking into the code of those two I see almost the same classes. Both has for example GeographyPoint or Geography abstract classes. The same with implementation of those.

Which one should be used when?

To add little bit more context - I'm working on Azure Search with some geospatial features.

like image 903
Dawid Rutkowski Avatar asked Nov 17 '16 10:11

Dawid Rutkowski


1 Answers

One difference I found reading the description about these two libraries on their respective Nuget packages is that Microsoft.Spatial library is for OData Version 4 while System.Spatial library is for OData Version 1-3.

Microsoft.Spatial:

Contains classes and methods that facilitate geography and geometry spatial operations. Support OData v4 only. Targets .NET Portable Lib with support for .NET 4.5, Win Phone 8.1, and Win 8. Localized for CHS, CHT, DEU, ESN, FRA, ITA, JPN, KOR and RUS.

System.Spatial:

Contains classes and methods that facilitate geography and geometry spatial operations. Targets .NET 4.0, Silverlight 4.0 or .NET Portable Lib with support for .NET 4.0, SL 5.0, Win Phone 8, Win Phone 8.1, and Win 8. Localized for CHS, CHT, DEU, ESN, FRA, ITA, JPN, KOR and RUS.

To install System.Spatial for OData V1-3 , run the following command in the Package Manager Console

The Azure Search REST API is based on OData V4, so for consistency the .NET SDK uses the version of the Spatial library for OData V4 as well (Microsoft.Spatial).

like image 68
Gaurav Mantri Avatar answered Oct 14 '22 19:10

Gaurav Mantri