|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geometry.BufferConstruction
public class BufferConstruction
Buffers collections of lines or collections of polygons.
Refer to IBufferConstruction
for details of the BufferConstruction object.
Constructor Summary | |
---|---|
BufferConstruction()
Constructs a BufferConstruction using ArcGIS Engine. |
|
BufferConstruction(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. BufferConstruction theBufferConstruction = (BufferConstruction) obj; |
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. |
boolean |
equals(Object o)
Compare this object with another |
IBufferProgress |
getBufferProgress()
Report the progress of a buffer operation via this callback interface. |
static String |
getClsid()
getClsid. |
double |
getDensifyDeviation()
The maximum distance between a line connecting two buffer curve points and the true curve (defaults to -1, indicating 1000 * xy tolerance of spatial reference of input geometries ). |
IDoubleArray |
getDistanceOffsets()
Constructs concentric buffers at the base distance plus each distance offset. |
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. |
int |
getEndOption()
Specifies the shape of the end caps of polyline buffers; defaults to 'esriBufferRound'. |
int |
getSideOption()
Specifies on which side of a polyline its buffer is constructed; defaults to 'esriBufferFull' (both sides). |
IUnit |
getUnit()
The unit of measure used for the buffering distance and densification deviation distance (optional, default units are obtained from spatial reference of input geometries). |
int |
hashCode()
the hashcode for this object |
boolean |
isExplodeBuffers()
Specifies whether or not output buffers can have multiple outer rings (defaut is false). |
boolean |
isGenerateCurves()
Specifies whether sequences of curve points are replaced with true curves in the output buffers (default is true). |
boolean |
isOutsideOnly()
Excludes the inside of the input polygon from the output buffer (default = false). |
boolean |
isUnionOverlappingBuffers()
Specifies whether or not overlaps are preserved in the set of output buffers (default is false). |
void |
setBufferProgressByRef(IBufferProgress ppProgress)
Report the progress of a buffer operation via this callback interface. |
void |
setDensifyDeviation(double pDeviation)
The maximum distance between a line connecting two buffer curve points and the true curve (defaults to -1, indicating 1000 * xy tolerance of spatial reference of input geometries ). |
void |
setDistanceOffsetsByRef(IDoubleArray ppDistanceOffsets)
Constructs concentric buffers at the base distance plus each distance offset. |
void |
setEndOption(int pEndOption)
Specifies the shape of the end caps of polyline buffers; defaults to 'esriBufferRound'. |
void |
setExplodeBuffers(boolean pExplodeBuffers)
Specifies whether or not output buffers can have multiple outer rings (defaut is false). |
void |
setGenerateCurves(boolean pbGenerateCurves)
Specifies whether sequences of curve points are replaced with true curves in the output buffers (default is true). |
void |
setOutsideOnly(boolean bpOutsideOnly)
Excludes the inside of the input polygon from the output buffer (default = false). |
void |
setSideOption(int pSideOption)
Specifies on which side of a polyline its buffer is constructed; defaults to 'esriBufferFull' (both sides). |
void |
setUnionOverlappingBuffers(boolean pbUnionOverlapping)
Specifies whether or not overlaps are preserved in the set of output buffers (default is false). |
void |
setUnitByRef(IUnit ppUnit)
The unit of measure used for the buffering distance and densification deviation distance (optional, default units are obtained from spatial reference of input geometries). |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public BufferConstruction() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic BufferConstruction(Object obj) throws IOException
BufferConstruction theBufferConstruction = (BufferConstruction) obj;
obj
to BufferConstruction
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public 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.
constructBuffers
in interface IBufferConstruction
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.public void constructBuffersByDistances(IGeometricBufferSourceSink pBufferInputOutput) throws IOException, AutomationException
constructBuffersByDistances
in interface IBufferConstruction
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.public void constructBuffersByDistances2(IEnumGeometry pInputGeometries, IDoubleArray pDistances, IGeometryCollection pOutputBuffers) throws IOException, AutomationException
constructBuffersByDistances2
in interface IBufferConstruction
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.public IGeometry buffer(IGeometry pInGeometry, double distance) throws IOException, AutomationException
buffer
in interface IBufferConstruction
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.public ILongArray getEmptyBufferIDs() throws IOException, AutomationException
getEmptyBufferIDs
in interface IBufferConstruction
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBufferProgressByRef(IBufferProgress ppProgress) throws IOException, AutomationException
setBufferProgressByRef
in interface IBufferConstructionProperties
ppProgress
- A reference to a com.esri.arcgis.geometry.IBufferProgress (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IBufferProgress getBufferProgress() throws IOException, AutomationException
ConstructBuffers and ConstructBuffersByDistances can report progress, if desired, during lengthy operations. Use this property to specify a callback interface that will receive progress events. This interface will also let clients cancel the current buffer method invocation. Buffer progress is measured in units of “operations”, “stages” and “steps”. An operation is either the action of buffering a group of geometries of the same dimension, or of dissolving together buffers generated from inputs of different dimensions. Each operation has one or more stages. Point buffering always has one stage. Polyline and polygon buffering may have multiple stages. Finally, each stage has several steps. Typically each step corresponds to some number of output buffers being generated, but this is not always the case.
Here are some examples.
1. Buffer 1000 points, without unioning the buffers. There is one operation, one stage and step progress will be reported for every n points buffered, where n is an implementation dependent parameter (every 10 points, say).
2. Buffer 1000 points with dissolve. There is 1 operation, 1 stage, and some number of steps, but in this case the steps correspond to progress made through both the buffering and dissolve operations, and thus do not correspond to individual points being buffered.
3. Buffer 500 points and 500 polygons, without dissolve. There are 2 operations. The polygon buffer operation may be subdivided into multiple stages depending on the buffer distance and complexity of the polygons encountered. Multiple stages mean that the buffers are “grown” incrementally. So for example, buffers at a distance of distance/3 are first generated, then those are rebuffered, etc. The number of stages may not be known in advance and could increase during the course of processing. The steps in each stage correspond to individual features being buffered.
4. 500 points and 500 polygons are buffered with dissolve. There are 3 operations, the final one being the dissolve operation. There may be multiple stages for the polygon buffering operation, depending on the buffer distance and how complicated the polygons are.
getBufferProgress
in interface IBufferConstructionProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDistanceOffsetsByRef(IDoubleArray ppDistanceOffsets) throws IOException, AutomationException
setDistanceOffsetsByRef
in interface IBufferConstructionProperties
ppDistanceOffsets
- A reference to a com.esri.arcgis.system.IDoubleArray (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDoubleArray getDistanceOffsets() throws IOException, AutomationException
ConstructBuffers and ConstructBuffersByDistances can generate multiple, concentric buffers around the same set of input geometries. This property is an array of distance values, specified in the units defined either by the spatial reference of the first input geometry or the Unit property. When this property is defined, each of its elements is added to the base distance specified by ConstructBuffers, or to the per-geometry distance used by ConstructBuffersByDistances. The following graphic shows the effect of specifying this property.
Example of multiple distance offsets and mixed dimension inputs when buffering. A point and a polygon have been buffered at 7 different distances, with the results at each distance unioned together.
Generation of buffers at each distance offset counts as a separate "operation" for the purposes of progress reporting. Refer to the BufferProgress property for more details on progress reporting.
getDistanceOffsets
in interface IBufferConstructionProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setUnitByRef(IUnit ppUnit) throws IOException, AutomationException
setUnitByRef
in interface IBufferConstructionProperties
ppUnit
- A reference to a com.esri.arcgis.geometry.IUnit (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IUnit getUnit() throws IOException, AutomationException
You can specify the buffer distance in a distance unit different than that of the spatial reference of the input geometries. The unit must be of the same type (angular or linear) as that of the input geometries' spatial reference.
See the geometry library overview for an example of using the units property to generate geodesic buffers around points.
getUnit
in interface IBufferConstructionProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSideOption(int pSideOption) throws IOException, AutomationException
setSideOption
in interface IBufferConstructionProperties
pSideOption
- A com.esri.arcgis.geometry.esriBufferConstructionSideEnum constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSideOption() throws IOException, AutomationException
When generating buffers for polylines, the buffered polygon can cover an area to the right of the polyline, to the left, or both. Here are some examples of these combinations.
Side type –end type options for P shape line: (a) left-flat, (b) right-flat, (c) full-flat, (d) left-round, (e) right-round, and (f) full-round.
getSideOption
in interface IBufferConstructionProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOutsideOnly(boolean bpOutsideOnly) throws IOException, AutomationException
setOutsideOnly
in interface IBufferConstructionProperties
bpOutsideOnly
- The bpOutsideOnly (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isOutsideOnly() throws IOException, AutomationException
When buffering polygons, this property controls whether or not the constructed buffer covers only the outside of the polygon. Here is an example of an outside-only buffer.
isOutsideOnly
in interface IBufferConstructionProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setEndOption(int pEndOption) throws IOException, AutomationException
setEndOption
in interface IBufferConstructionProperties
pEndOption
- A com.esri.arcgis.geometry.esriBufferConstructionEndEnum constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getEndOption() throws IOException, AutomationException
When buffering polylines, this option controls the shape of the buffer area around the ends of the polylines. Here is an example of the different options.
getEndOption
in interface IBufferConstructionProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setGenerateCurves(boolean pbGenerateCurves) throws IOException, AutomationException
setGenerateCurves
in interface IBufferConstructionProperties
pbGenerateCurves
- The pbGenerateCurves (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isGenerateCurves() throws IOException, AutomationException
When buffers are constructed around polygons, straight line segments approximating curved parts of the buffer are generated. These sets of line segments can be replaced with single curve segments at the end of the buffering operation, if desired. You should use a small buffer deviation (see the DensifyDeviation property for details) when requesting that curves be stitched back into the output buffers. If a curve can not accurately replace its set of approximating line segments, no replacement will occur, even if this property is true. This could be the case when unioning overlaps between multiple buffers. Additionally, the buffering algorithm will sometimes “grow” buffers in stages (for example, buffer each feature by distance/3, then again, then again) in order to avoid creating very complicated intermediate results. When that happens, curves will not appear in the final version of that buffer.
Example of a buffered polygon with curves
isGenerateCurves
in interface IBufferConstructionProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDensifyDeviation(double pDeviation) throws IOException, AutomationException
setDensifyDeviation
in interface IBufferConstructionProperties
pDeviation
- The pDeviation (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getDensifyDeviation() throws IOException, AutomationException
Buffer construction uses sets of line segments to approximate curved parts of the buffer. You use the DensifyDeviation property to control how good this approximation is. It is the maximum distance, specified in the buffer distance units, between the approximating segment and the true curve.The smaller its value, the more segments will be required to approximate the curve. This will produce a more accurate buffer (particularly when unioning overlaps between buffers) but will take longer.
The first graphic shows a 1000 meter buffer created using a densify deviation of 1 meter.
The second graphic shows the same 1000 meter buffer created using a densify deviation of 0.1 meters.
When you wish to replace sets of buffer line segments with true curves (the GenerateCurves) property, you should use the smallest densify deviation that still produces acceptable performance, particularly in the case where you are unioning overlapping buffers together.
getDensifyDeviation
in interface IBufferConstructionProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setUnionOverlappingBuffers(boolean pbUnionOverlapping) throws IOException, AutomationException
setUnionOverlappingBuffers
in interface IBufferConstructionProperties
pbUnionOverlapping
- The pbUnionOverlapping (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isUnionOverlappingBuffers() throws IOException, AutomationException
When buffering multiple input geometries, you can request that overlaps between individual buffers be unioned (or dissolved) together. The graphic below shows how this property and the ExplodeBuffers property work together.
How the union and explode options determine the output geometries. There are two input geometries, each with two parts.
a. union overlaps = false, explode = false. There is one output geometry for each input geometry. Overlaps are preserved.
b. union overlaps = true, explode = false. One output geometry is produced for all input geometries and overlaps are dissolved.
c. union overlaps = true, explode = true. Overlaps are dissolved and one output geometry per separate area.
d. union overlaps = false, explode= true. One output geometry is produced for each input part. Overlaps are preserved.
isUnionOverlappingBuffers
in interface IBufferConstructionProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setExplodeBuffers(boolean pExplodeBuffers) throws IOException, AutomationException
setExplodeBuffers
in interface IBufferConstructionProperties
pExplodeBuffers
- The pExplodeBuffers (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isExplodeBuffers() throws IOException, AutomationException
You can produce separate buffer polygons for each connected buffer region. Such a polygon could contain nested rings (lakes) but not doubly nested rings (islands). The graphic below shows how the UnionOverlappingBuffers property works together with this property.
How the union and explode options determine the output geometries. There are two input geometries, each with two parts.
a. union overlaps = false, explode = false. There is one output geometry for each input geometry. Overlaps are preserved.
b. union overlaps = true, explode = false. One output geometry is produced for all input geometries and overlaps are dissolved.
c. union overlaps = true, explode = true. Overlaps are dissolved and one output geometry per separate area.
d. union overlaps = false, explode= true. One output geometry is produced for each input part. Overlaps are preserved.
isExplodeBuffers
in interface IBufferConstructionProperties
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 |