Select to view content in your preferred language

constructUnion(IEnumGeometry geometries) - Java

574
3
01-18-2011 12:46 PM
LeoDonahue
Deactivated User
constructUnion(IEnumGeometry geometries) -

http://help.arcgis.com/en/sdk/10.0/java_ao_adf/api/arcobjects/com/esri/arcgis/geometry/GeometryBag.h...)

"This method does not support GeometryBags."  and yet it is a method on the Class GeometryBag.

And there is an example here:
http://help.arcgis.com/en/sdk/10.0/java_ao_adf/conceptualhelp/engine/0001/0001000003nq000000.htm

typo?
0 Kudos
3 Replies
Venkata_RaoTammineni
Regular Contributor
0 Kudos
LeoDonahue
Deactivated User
Venkat,

There are no points for awarded for the most posts not relevant to the question.  And there is no reason to reply to every post on the forum with with quotes.

You did see that my post was related to "Java" right?  Replying with a link to 9.2 .NET documentation really doesn't serve a purpose, especially when the example link I posted was a 10.0 Java sample using a GeometryBag.

The point I was trying to make was that the docs indicated that constructUnion() does not work with GeometryBags, yet the sample showed a GeometryBag being cast to IEnumGeometry as a parameter to constructUnion().
0 Kudos
NeilClemmons
Honored Contributor
It's probably just poor wording.  The ConstructUnion method takes a parameter of type IEnumGeometry.  As long as the class instance you pass into the method implements this interface then there should be no reason for it not to work.  The GeometryBag coclass implements IEnumGeometry so therefore it should be just as valid as any other class that implements that interface.  With one stipulation - all of the geometries in the bag must be of the same dimension.

I believe what the help is actually trying to say is that the ConstructUnion is not implemented by the GeometryBag class.  The GeometryBag class implements ITopologicalOperator but the the implementation for the ConstructUnion method may be empty (i.e. there's no actual code there).  I have not run any tests to see if this is true or not.
0 Kudos