Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have WKT in this format:

GEOMETRYCOLLECTION(POLYGON((491990.250718 6212873.59755,491492.160493 6212904.94117,491265.64715 6212790.54445,491319.517251 6212550.36334,491579.624164 6212637.87553,491611.164518 6212718.61909,492055.359904 6212718.66908,491990.250718 6212873.59755)))

It is currently in Euref98 projection and I need it converted to LongLat.

I'm a .NET developer so I prefer a .NET solution.

Is there a .NET library that can parse WKT text into an in-memory model and write the in-memory model back to WKT?

share|improve this question
add comment

3 Answers 3

Proj.Net should be able to do that.

share|improve this answer
    
Proj.NET throws an exception, System.ArgumentException : 'GEOMETRYCOLLECTION' is not recognized. –  Morten Lyhr Aug 5 '11 at 6:02
    
Looks like Proj.NET only supports SRS WKT syntax, so no geometries. SharpMap should be able to handle WKT geometries, too: sharpmap.codeplex.com –  Igor Brejc Aug 5 '11 at 6:14
add comment

try this as well - http://csharp-source.net/open-source/geospatial

share|improve this answer
2  
Hi Doug and welcome to GIS.stackexchange! Please summarize the content of the link in your answer. This way, even if the link should break, readers can gain information. –  underdark Aug 4 '11 at 19:21
    
code.google.com/p/nettopologysuite WKTReader does the job –  Morten Lyhr Aug 5 '11 at 6:18
    
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  iant Aug 14 '12 at 10:53
add comment

I suggest class from .NET framework: DbGeography

DbGeography dbg = DbGeography.FromText(wkt_string);
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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