Envelope, also known as the envelope line, is a rectangular area and is the smallest external rectangle of each ry. Each geometry has an envelope, including the envelope itself.
It defines attributes such as xmax, xmin, Ymax, ymin, height, and width to obtain or set the space coordinates of an object with an envelope.
The ienvelope interface provides the following methods: expand (proportional scaling of the range of the envelope to generate a new envelope object), offset (moving the envelope through a given (x, y ), centerat (moving the envelope line by changing the center of the envelope line), putcoords (constructing the envelope line through the specified coordinate point), and so on.
Ienvelope also has two topology Calculation Methods: intersect (used to calculate the intersection of two envelope lines and return the part as the result) and Union (merge the envelope line, and use the smallest external rectangle of the two envelopes as the merged result ).
Ienvelope envelop1 = new envelopeclass ();
Ienvelope envelop2 = new envelopeclass ();
Envelop1.putcoords (100,100,200,200 );
Envelop2.putcoords (150,150,250,250 );
// Envelop1 becomes the intersection of two envelope
Envelop1.intersect (envelop2 );
Ienvelope envelop1 = new envelopeclass ();
Ienvelope envelop2 = new envelopeclass ();
Envelop1.putcoords (100,100,200,200 );
Envelop2.putcoords (150,150,250,250 );
// Combine two envelope into one
Envelop1.union (envelop2 );