ConstructBuffersByDistances2

1499
2
02-06-2013 12:25 PM
Highlighted
New Contributor III
Does anyone have a working example of the use of IBufferConstruction.ConstructBuffersByDistances2?
Reply
0 Kudos
2 Replies
Highlighted
Occasional Contributor II
This is a piece of C# code might help.

                IGeometryCollection outGeomColl = new GeometryBagClass() as IGeometryCollection;
                (outGeomColl as IGeometry).SpatialReference = (inFeatureClass as IGeoDataset).SpatialReference;

                IBufferConstruction buffConst = new BufferConstructionClass();
                IBufferConstructionProperties buffProp = buffConst as IBufferConstructionProperties;
                buffProp.DistancesSource = bufferDistance;
                buffProp.GeometriesSource = inGeometryColl as IEnumGeometry; ;
                buffProp.GeometriesSink = outGeomColl;

                buffConst.ConstructBuffersByDistances(buffConst as IGeometricBufferSourceSink);
Reply
0 Kudos
Highlighted
Occasional Contributor II
The call ConstructBuffersByDistances2 is more straight forward.

buffConst.ConstructBuffersByDistances2(inGeometryColl as IEnumGeometry, bufferDistance, outGeomColl);

inGeometryColl is of IGeometryCollection.
Reply
0 Kudos