So I have a bunch of WKT representing a multi-polygon. I exclusively use DotSpatial to manipulate geometries. Specifically I'm trying to get a DotSpatial.Topology.IGeometry out of my WKT.
Unfortunately the DotSpatial guys recently moved a lot of stuff into NetTopologySuit and that is where their WKTreader lives.
But the reader passes back a GeoAPI.Geometries.IGeometry, which you can't just cast to a DotSpatial.Topology.IGeometry because they're not the same class. I'm actually gettting a little aggravated having to transform what is essentially the same class across three different API (DotSpatial, GeoAPI and NetTopologySuite) that all have similarly named similar classes.
All I want to do is pull ina DotSpatial.Topology.IGeometry from well known text. Specifically it's a MultiPolygon that I'm working with but whatever.
I really don't want to have some great bit conditional or select statement to figure out what to do with the GeoAPI IGeometry class so i can use it. I already have a big converter class for convering various geometry classes to dotSpatial and I'd rather get rid of it entirely. Less code is better code.
Can anyone assist with transforming a GeoAPI.Geometries.IGeometry into a DotSpatial.Geometries.IGeometry? I can't just cast it as I get the following error: Unable to cast object of type 'NetTopologySuite.Geometries.MultiPolygon' to type 'DotSpatial.Topology.IGeometry'.
Any ideas?
Thanks in advance, E