ThinkGeo.com    |     Documentation    |     Premium Support

Buffer error

hello,


 i have calculated a route. then find mid point of the route by using GetpointOnALine method.


now i want to create a buffer around that midpoint. but it give error when my app runs


"Object reference not set to an instance of an object."


my code is as follow


 


InMemoryFeatureLayer buffer = (InMemoryFeatureLayer)winformsMap1.FindFeatureLayer("Buffer");



            PointBaseShape baseshape = (PointBaseShape)center.InternalFeatures["Mid"].GetShape();

            MultipolygonShape buffershape = baseshape.Buffer(100,8, BufferCapType.Butt, GeographyUnit.DecimalDegree, DistanceUnit.Kilometer);

            Feature bufferFeature = new Feature(buffershape.GetWellKnownBinary(), "BufferFeature");



            if (!buffer.InternalFeatures.Contains("BufferFeature"))

            {

               // center.InternalFeatures.Add("Mid", mid);

                buffer.InternalFeatures.Add("BufferFeature", bufferFeature);

            }

 



i have solved this problem. kindly tell me how to select vertices lies within the buffer. i want to store vertex that are located inside the created buffer