Buffer, version 2.0

Jul 26, 2008 at 9:19 PM
Hi,  Using the following code, I get the error below on the Buffer command - ANY IDEAS on code or error:
(Version 2.0)

sf =

new ShapeFileProvider(filePath, gFactory, cFactory);

 

sf.Open();

 

 

ICoordinateFactory coordFactory = gFactory.CoordinateFactory;

 

 

ICoordinate pCoord = coordFactory.Create(lon, lat);

 

 

IPoint pPoint = gFactory.CreatePoint(pCoord);

 

 

IGeometry pGeom = pPoint.Buffer(1.0, GeoAPI.Operations.Buffer.BufferStyle.Round);

 

System.NullReferenceException: Object reference not set to an instance of an object.
   at GisSharpBlog.NetTopologySuite.Index.Strtree.StrTree`2.StrNode.ComputeBounds()
   at GisSharpBlog.NetTopologySuite.Index.AbstractNode`2.get_Bounds()
   at GisSharpBlog.NetTopologySuite.Index.Strtree.StrTree`2.StrNode.Intersects(IExtents`1 bounds)
   at GisSharpBlog.NetTopologySuite.Index.Strtree.AbstractStrTree`2.<Query>d__0.MoveNext()
   at GisSharpBlog.NetTopologySuite.Noding.MonotoneChainIndexNoder`1.intersectChains()
   at GisSharpBlog.NetTopologySuite.Noding.MonotoneChainIndexNoder`1.Node(IEnumerable`1 inputSegmentStrings)
   at GisSharpBlog.NetTopologySuite.Operation.Buffer.BufferBuilder`1.computeNodedEdges(IEnumerable`1 bufferSegStrList, IPrecisionModel`1 precisionModel)
   at GisSharpBlog.NetTopologySuite.Operation.Buffer.BufferBuilder`1.Buffer(IGeometry`1 g, Double distance)
   at GisSharpBlog.NetTopologySuite.Operation.Buffer.BufferOp`1.bufferOriginalPrecision()
   at GisSharpBlog.NetTopologySuite.Operation.Buffer.BufferOp`1.computeGeometry()
   at GisSharpBlog.NetTopologySuite.Operation.Buffer.BufferOp`1.GetResultGeometry(Double distance)
   at GisSharpBlog.NetTopologySuite.Operation.Buffer.BufferOp`1.Buffer(IGeometry`1 g, Double distance, BufferStyle endCapStyle)
   at GisSharpBlog.NetTopologySuite.Geometries.Geometry`1.Buffer(Double distance, BufferStyle endCapStyle)
   at GisSharpBlog.NetTopologySuite.Geometries.Geometry`1.GeoAPI.Geometries.ISpatialOperator.Buffer(Double distance, BufferStyle endCapStyle)