I'm new in MapXtreme and I'm bit lost.

I have polygon in MapXtreme 7.0 (in C#) saved as FeatureGeometry type. I need to save this in SqlServer 2008 as geometry type, but I don't have direct access to DB. So, I need to push data through wcf to be read by some process (in C#) on server with DB access.

What could be order of types conversions which lead from MapXtreme's FeatureGeometry through something serializable for wcf to SqlServer's Geometry?

Of course, polygons will be read from DB and pushed back to be displayed on the map. So conversions in this direction needed as well.


You can use either Well-Known Text (WKT) or Well-Known Binary (WKB) as these can be read/written by both MapXtreme and SQL Server 2008.

For MapXtreme you should be able to find utilities for doing so in the MapInfo.OGC namespace.

From the MapXtreme 7.0 documentation:

OGC Conversion for Geometries and Coordinate Systems

The MapXtreme Extensible Data Provider includes utilities that help in the conversion process from an OGC geometry (OpenGIS® Simple Features Interface Standard) into a MapXtreme geometry and vice versa.

This includes OGC-regulated well-known text and well-known binaries that a number of spatial data systems take advantage of, such as PostGIS, mySQL and SQL Server 2008. Well-known text refers to a standard textual representation for spatial reference systems. Well-known binaries are a standard binary representation for geometries.

The utilities are included in the MapInfo.OGC namespace. It implements data readers and writers for well-known text and well-known binaries and supports both big endian and little endian byte ordering.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.