IGeometryFactory, v2.0

Jul 25, 2008 at 3:38 PM
I'm trying to open  a shapefile and get the following error using this code (version 2.0):

        ShapeFileProvider

sf = null;

        GeometryServices

pServices = new GeometryServices();

 

 

        IGeometryFactory gFactory = pServices.DefaultGeometryFactory;

 

        sf =

new ShapeFileProvider(filePath, gFactory);

 

gFactory is GISSharpBlog.NetTopolotySuite.Geometries.GeometryFactory<NetTopologySuite.Coordinates.BufferedCoordinate2D>

GeometryServices.cs was taken from the following post (JohnDiss reply)
http://www.codeplex.com/SharpMap/Thread/View.aspx?ThreadId=31198

ERROR:

System.TypeLoadException: Method 'Touches' in type 'GisSharpBlog.NetTopologySuite.Geometries.Extents`1' from assembly 'NetTopologySuite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=f580a05016ebada1' does not have an implementation.
   at GisSharpBlog.NetTopologySuite.Geometries.GeometryFactory`1.GeoAPI.Geometries.IGeometryFactory.CreateExtents(ICoordinate min, ICoordinate max)
   at SharpMap.Data.Providers.ShapeFile.ShapeFileHeader.parseHeader(BinaryReader reader) in D:\Work\SharpMapStuff\V2Layout\SharpMap\SharpMap.Data.Providers\ShapeFileProvider\ShapeFileHeader.cs:line 146
   at SharpMap.Data.Providers.ShapeFile.ShapeFileHeader..ctor(BinaryReader reader, IGeometryFactory geoFactory) in D:\Work\SharpMapStuff\V2Layout\SharpMap\SharpMap.Data.Providers\ShapeFileProvider\ShapeFileHeader.cs:line 38
   at SharpMap.Data.Providers.ShapeFile.ShapeFileProvider..ctor(String filename, IGeometryFactory geoFactory, ICoordinateSystemFactory coordSysFactory, Boolean fileBasedIndex) in D:\Work\SharpMapStuff\V2Layout\SharpMap\SharpMap.Data.Providers\ShapeFileProvider\ShapeFileProvider.cs:line 197
   at SharpMap.Data.Providers.ShapeFile.ShapeFileProvider..ctor(String filename, IGeometryFactory geoFactory) in D:\Work\SharpMapStuff\V2Layout\SharpMap\SharpMap.Data.Providers\ShapeFileProvider\ShapeFileProvider.cs:line 145
Jul 25, 2008 at 4:55 PM
Well, this one is solved - I rebuilt everything and loaded back into project - now working.