|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IBufferConstruction
Provides access to members that buffer sets of geometries.
This interface is new at ArcGIS 9.3.
The BufferConstruction object implements an updated, highly robust geometric buffering operation. It is designed to process a large number of inputs without requiring that all inputs and outputs exist in main memory at the same time. It provides additional buffering options that are not possible with the current ArcObjects Buffer method. For example, geodesic buffers can be generated around points. Finally, it provides a compatibility operation that lets clients of the existing Buffer operation use this object with a minimal impact on their existing code. In fact, the simplest way to use the buffer construction object is:
IBufferConstruction bc = new BufferConstruction()
Buffer = bc.Buffer(myInputGeometry, distance);
Overview of capabilities of the BufferConstruction object
- The IBufferConstructionProperties interface provides several new options for construction of geometric buffers:
- Polyline buffers can be constructed to the left or the right of the polyline
- Polygon buffers can exclude the interior of the polygon
- Curve segments can be added to the output buffers
- Buffers can be dissolved togther in places where they overlap
- Seperate polygons can be generated for each non-overlapping portion of a buffer
- True geodesic buffers can be generated around points that are in a geographic coordinate system
- Geometries of different types can be buffered together
- Multiple buffer offsets can be generated around the same set of inputs
- In the context of a single buffering operation, different features can be buffered by different distances
The buffer construction object requires the use of temporary files. They will be placed in the directory identified by the pathname contained in the environment variable ARCTMPDIR. If the variable does not exist, then the system TEMP location will be used. Temporary files are removed at the end of a buffer operation.
Buffering large sets of geometries and buffering each input geometry with a different distance
You can buffer large collections of geometries, without staging either the inputs or the outputs in memory, by implementing the IGeometricBufferSourceSink interface and using the ConstructBuffersByDistances method, or by implementing the IEnumGeometry and IGeometryCollection interfaces and using the ConstructBuffers method. Alternatively, you can directly use geometry bags and double arrays with the ConstructBuffers method, but then inputs and outputs must be staged in memory.
If you wish to apply a different buffer distance to each input geometry, you can use the ConstructBuffersByDistances2 method, which requires that inputs and outputs be staged in memory first, or implement the IGeometricBufferSourceSink interface and use the IBufferConstruction::ConstructBuffersByDistances method.
If a client chooses to implement IEnumGeometry and IGeometryCollection in conjunction with the ConstructBuffers method, not all IEnumGeometry or IGeometryCollection methods need to be implemented. Only the Next method on IEnumGeometry, and the AddGeometry method on IGeometryCollection, are used by the BufferConstruction object.
| Method Summary | |
|---|---|
IGeometry |
buffer(IGeometry pInGeometry,
double distance)
Compatibility method for clients wishing to replace useages of ITopologicalOperator::Buffer. |
void |
constructBuffers(IEnumGeometry pInputGeometries,
double distance,
IGeometryCollection pOutputBuffers)
Constructs buffer polygons at the specified distance for the set of input geometries. |
void |
constructBuffersByDistances(IGeometricBufferSourceSink pBufferInputOutput)
Constructs buffer polygons for the set of input geometries and distances supplied from the specified source-sink interface. |
void |
constructBuffersByDistances2(IEnumGeometry pInputGeometries,
IDoubleArray pDistances,
IGeometryCollection pOutputBuffers)
Constructs buffer polygons for the set of input geometries and distances supplied from arrays. |
ILongArray |
getEmptyBufferIDs()
Returns an array of identifiers of input geometries that result in empty buffers - typically as a result of buffering polygons by negative distances. |
| Method Detail |
|---|
void constructBuffers(IEnumGeometry pInputGeometries,
double distance,
IGeometryCollection pOutputBuffers)
throws IOException,
AutomationException
ConstructBuffers can be used with GeometryBag objects to buffer collections of geometries that are staged in memory. Alternatively, clients can provide implementations of IEnumGeometry and IGeometryCollection to avoid staging inputs and outputs in memory.
The behavior of this method is affected by the various properties exposed on the IBufferConstructionProperties interface. For example, you can define the DistanceOffsets property in order to have this method generate multiple buffers for each input geometry. You can control the quality of the curve approximations used during buffering using the DensifyDeviation property. You can specify that overlapping buffers will be unioned together before being returned using the UnionOverlappingBuffers property, etc.
pInputGeometries - A reference to a com.esri.arcgis.geometry.IEnumGeometry (in)distance - The distance (in)pOutputBuffers - A reference to a com.esri.arcgis.geometry.IGeometryCollection (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
void constructBuffersByDistances(IGeometricBufferSourceSink pBufferInputOutput)
throws IOException,
AutomationException
pBufferInputOutput - A reference to a com.esri.arcgis.geometry.IGeometricBufferSourceSink (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
void constructBuffersByDistances2(IEnumGeometry pInputGeometries,
IDoubleArray pDistances,
IGeometryCollection pOutputBuffers)
throws IOException,
AutomationException
pInputGeometries - A reference to a com.esri.arcgis.geometry.IEnumGeometry (in)pDistances - A reference to a com.esri.arcgis.system.IDoubleArray (in)pOutputBuffers - A reference to a com.esri.arcgis.geometry.IGeometryCollection (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
IGeometry buffer(IGeometry pInGeometry,
double distance)
throws IOException,
AutomationException
pInGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)distance - The distance (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
ILongArray getEmptyBufferIDs()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||