在.NET中使用MySQL的地理空间数据类型数据类型、地理、空间、NET

2023-09-08 08:32:07 作者:所有

我正在寻找的信息,如何使用MySQL的几何类型的.NET。我使用的亚音速ORM的,并不真的需要支持远远超过MySQL的点类型。

I'm looking for information on how to use MySQL geometry types in .NET. I'm using Sub-sonic for ORM and don't really need to support much more than MySQL's POINT type.

MySQL的.NET连接器似乎返回点数据作为开放GIS WKB格式的byte []数组。

The MySQL .NET connector seems to return point data as a byte[] array in the OpenGIS WKB format.

的图书馆有哪些建议与该WKB格式的工作?

What libraries are recommended for working with this WKB format?

另外,因为我只需要点支持,例子就转换WKB /从.NET类型可能就够了。

Alternatively, since I only need support for Point, examples on converting WKB to/from a .NET type would probably suffice.

假如我能找到(或建立)一个类可以处理点数据类型,多少麻烦我我将有越来越亚音速(V3),将它的工作?

Assuming I can find (or build) a class that can handle the Point data type, how much trouble am I going to have getting Sub-sonic (v3) to work with it?

推荐答案

退房的开源GeoAPI.Net - HTTP ://geoapi.$c$cplex.com

Check out the OpenSource GeoAPI.Net - http://geoapi.codeplex.com

这有.NET类的所有几何类型和一些工具从其他类型转换为这些如WKB。看看源$ C ​​$下的版本2.11A来源> GeoAPI> IO> WellKnownBinary。有读/写器/分析器等。

This has .NET classes for all geometry types and a number of tools to convert to these from other types such as WKB. Look at the sourcecode for version 2.11a src > GeoAPI > IO > WellKnownBinary. There are readers / writers / parsers etc.

GeoAPI.Net用于一些项目,如 HTTP://sharpmap.$c$cplex。 COM 具有使用GeoAPI.Net类型更复杂的空间操作。 HTTP://$c$c.google.com/p/nettopologysuite/ 还采用thse类,所以你将有一个广泛的功能强大的操作,如果需要的类来使用。

GeoAPI.Net is used in a number of projects such as http://sharpmap.codeplex.com which have more complex spatial operations using the GeoAPI.Net types. http://code.google.com/p/nettopologysuite/ also uses thse classes so you will have a wide range of powerful operations to use on the classes if needed.

我什么都不知道亚音速,但随着点类/接口是相当标准的.NET我不明白为什么前人的精力这导致任何问题。你总是可以看看源网上检查。

I know nothing about Sub-sonic, but as the Point classes / interface are fairly standard .NET I don't see why this sould cause any problems. You can always have a look at the source online to check.