2

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.

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

  • What libraries are recommended for working with this WKB format?

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

  • 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?

1 Answer 1

1

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

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 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.

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.

Sign up to request clarification or add additional context in comments.

1 Comment

We actually decided our requirements were simple enough to just split the points into two lat/long columns, but it looks like the GeoAPI.Net library is exactly what I was looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.