Construct SharpMap from WKT (Well-Known Text) MS SQL compact database 3.5??

Topics: CompactFramework, SharpMap v0.9 / v1.x, WinForms Controls
Feb 8, 2010 at 5:10 AM

 

Hi,

I am having trouble to find out how to construct SharpMap object to read from a table in a local MS SQL compact database 3.5 with a field of WKT?

 

I am having trouble to locate SharpMap documentation. I wasn't able to locate any code sample on constructing a map from WKT values. 

 

Thank your for you help in advance. 

 

Background:

I am using SQL merge replication to sync data from MS SQL 2008 to local MS SQL compact database 3.5. One of the limitation of compact database is it doesn't support geometry data type. Therefore I am storing geometry data in WKT format in the local database.  I am developing a windows application which will interact with the local compact database and will need to render the map.

Coordinator
Feb 8, 2010 at 10:06 AM

Hi ironbull620 see SharpMap.Converters.WellKnownText.GeometryFromWKT hth jd 

Feb 9, 2010 at 3:32 AM

Thx for the reply johndiss. 

I have more questions:

 

SharpMap.Converters.WellKnownText.GeometryFromWKT myWKTMap;
                SharpMap.Converters.WellKnownText.CoordinateSystemWktReader myWKTReader;
                myWKTReader = new SharpMap.Converters.WellKnownText.CoordinateSystemWktReader();
                
                myWKTMap = new SharpMap.Converters.WellKnownText.GeometryFromWKT()

Functions in "SharpMap.Converters.WellKnownText.GeometryFromWKT" seem to be in-accessible? Please refer to the code below and advice how to construct the object with WKT value? or how to read in WKT value?

 

SharpMap.Converters.WellKnownText.GeometryFromWKT myWKTMap;

                myWKTMap = new SharpMap.Converters.WellKnownText.GeometryFromWKT();

 

There's "SharpMap.Converters.WellKnownText.CoordinateSystemWktReader", but I am unable to call any function to read in WKT value??

                SharpMap.Converters.WellKnownText.CoordinateSystemWktReader myWKTReader;

                myWKTReader = new SharpMap.Converters.WellKnownText.CoordinateSystemWktReader();               

 

Coordinator
Feb 9, 2010 at 9:27 AM

Use the static Parse method on the GeometryFromWKT class.. jd