Microsoft.Spatial 9.0.0-preview.3

Microsoft.Spatial

The Microsoft.Spatial library provides classes and methods for geographic and geometric operations. It is a core component of the OData .NET libraries, enabling you to work with geospatial data types such as points in 2D/3D space, lat/long, lines, and polygons.

Installation

You can install the Microsoft.Spatial package via NuGet:

dotnet add package Microsoft.Spatial

Or via the NuGet Package Manager Console:

Install-Package Microsoft.Spatial

Getting Started

Creating and Using Spatial Data

Here's a simple example of how to create and use spatial data types with Microsoft.Spatial:

using Microsoft.Spatial;

// Create a GeographyPoint
var point = GeographyPoint.Create(47.6097, -122.3331);

// Output the point's coordinates
Console.WriteLine($"Latitude: {point.Latitude}, Longitude: {point.Longitude}");

// Create a GeographyLineString
var lineString = GeographyFactory.LineString()
    .LineTo(47.6097, -122.3331)
    .LineTo(47.6205, -122.3493)
    .Build();

// Output the line string's points
foreach (var position in lineString.Points)
{
    Console.WriteLine($"Point: Latitude {position.Latitude}, Longitude {position.Longitude}");
}

Documentation

For more detailed information, please refer to the official documentation.

Community

Contribution

There are many ways for you to contribute to OData .NET. The easiest way is to participate in discussion of features and issues. You can also contribute by sending pull requests of features or bug fixes to us. Contribution to the documentations is also highly welcomed. Please refer to the CONTRIBUTING.md for more details.

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

5.3 Support

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Showing the top 20 packages that depend on Microsoft.Spatial.

Packages Downloads
Microsoft.Azure.Search.Service
Use this package if you're developing automation in .NET to manage Azure Cognitive Search indexes, synonym maps, indexers, data sources, or other service-level resources. If you only need to query or update documents in your indexes, use the Microsoft.Azure.Search.Data package instead. If you need all the functionality of Azure Cognitive Search, use the Microsoft.Azure.Search package instead.
2
Microsoft.Azure.Search.Service
Use this package if you're developing automation in .NET to manage Azure Search indexes, synonym maps, indexers, data sources, or other service-level resources. If you only need to query or update documents in your indexes, use the Microsoft.Azure.Search.Data package instead. If you need all the functionality of Azure Search, use the Microsoft.Azure.Search package instead.
2
Microsoft.Azure.Search.Service
Use this package if you're developing automation in .NET to manage Azure Search indexes, synonym maps, indexers, data sources, or other service-level resources. If you only need to query or update documents in your indexes, use the Microsoft.Azure.Search.Data package instead. If you need all the functionality of Azure Search, use the Microsoft.Azure.Search package instead.
1

This package has no dependencies.

Version Downloads Last updated
9.0.0-preview.3 5 12/10/2025
9.0.0-preview.2 0 08/21/2025
9.0.0-preview.1 0 07/10/2025
8.4.3 2 12/11/2025
8.4.2 2 12/10/2025
8.4.0 0 09/10/2025
8.3.0 2 12/12/2025
8.2.4 0 06/24/2025
8.2.3 1 12/12/2025
8.2.2 0 11/19/2024
8.2.1 1 12/16/2025
8.2.0 0 11/08/2024
8.1.0 0 10/17/2024
8.0.2 1 12/12/2025
8.0.1 0 08/19/2024
8.0.0 0 08/12/2024
8.0.0-rc.1 0 07/11/2024
8.0.0-preview.3 0 05/31/2024
8.0.0-preview.2 0 05/03/2024
8.0.0-preview.1 0 04/26/2024
7.22.0 0 07/10/2025
7.21.7 1 12/16/2025
7.21.6 0 11/08/2024
7.21.5 0 10/22/2024
7.21.4 0 09/30/2024
7.21.3 1 12/12/2025
7.21.2 0 05/23/2024
7.21.1 1 12/16/2025
7.21.0 0 04/17/2024
7.20.0 0 12/08/2023
7.19.0 1 12/16/2025
7.18.0 0 09/06/2023
7.17.0 0 06/23/2023
7.16.0 0 05/16/2023
7.15.0 0 03/01/2023
7.14.1 0 02/15/2023
7.14.0 0 01/11/2023
7.13.0 0 12/09/2022
7.12.5 0 10/25/2022
7.12.4 0 10/18/2022
7.12.3 0 09/19/2022
7.12.2 1 12/15/2025
7.12.1 0 07/20/2022
7.12.0 0 06/21/2022
7.11.1 0 06/16/2022
7.10.0 0 01/31/2022
7.9.4 2 12/12/2025
7.9.3 0 10/08/2021
7.9.2 0 09/14/2021
7.9.1 1 12/12/2025
7.9.0 0 05/12/2021
7.8.3 1 12/16/2025
7.8.2 0 02/15/2021
7.8.1 1 12/12/2025
7.7.3 2 12/12/2025
7.7.2 0 09/23/2020
7.7.1 1 12/13/2025
7.7.0 0 06/26/2020
7.7.0-beta 0 05/29/2020
7.6.4 1 12/15/2025
7.6.3 1 12/12/2025
7.6.2 0 11/21/2019
7.6.1 1 12/12/2025
7.6.1-beta 0 09/18/2019
7.6.0 1 12/15/2025
7.6.0-beta 1 12/12/2025
7.5.4 0 02/15/2019
7.5.3 0 12/18/2018
7.5.2 0 11/20/2018
7.5.1 2 12/11/2025
7.5.0 1 12/12/2025
7.4.4 0 04/04/2018
7.4.3 0 03/21/2018
7.4.1 2 12/09/2025
7.4.0 0 01/22/2018
7.4.0-beta3 1 12/12/2025
7.4.0-beta2 0 12/18/2017
7.4.0-beta 0 11/02/2017
7.3.1 1 12/11/2025
7.3.0 0 07/24/2017
7.3.0-beta 0 07/17/2017
7.2.0 0 05/03/2017
7.1.1 0 04/11/2017
7.0.0 0 08/22/2016
7.0.0-beta 0 08/04/2016
6.19.0 0 11/14/2017
6.18.0 0 09/07/2017
6.18.0-beta 0 07/27/2017
6.17.0 1 12/12/2025
6.16.0 0 04/03/2017
6.16.0-beta 0 01/13/2017
6.15.0 0 03/18/2016
6.15.0-beta 0 01/25/2016
6.14.0 0 12/15/2015
6.14.0-rc2 0 12/02/2015
6.14.0-rc 0 10/30/2015
6.14.0-beta 0 10/16/2015
6.13.0 0 07/22/2015
6.13.0-rc 0 07/14/2015
6.13.0-beta 0 06/19/2015
6.12.0 0 05/22/2015
6.12.0-beta 0 05/15/2015
6.11.0 0 03/30/2015
6.10.0 0 02/06/2015
6.9.0 1 12/12/2025
6.8.1 0 10/20/2014
6.8.0 2 12/12/2025
6.7.0 0 08/29/2014
6.6.0 0 07/31/2014
6.5.0 1 12/15/2025
6.4.0 0 05/30/2014
6.3.0 1 12/13/2025
6.2.0 0 04/01/2014
6.1.0 1 12/11/2025
6.0.0 1 12/12/2025
6.0.0-beta1 0 12/09/2013
6.0.0-alpha2 0 11/07/2013
6.0.0-alpha1 0 10/04/2013