IEnvelope为IPolygon//by yl 2003.05.10
function EnvToPoly(pEnv: IEnvelope): IPolygon;
var
pPointsColl : IPointCollection;
P1, P2, p3, p4 : IPoint;
pTopo : ITopologicalOperator;
begin
pPointsColl := CoPolygon.Create as IPointCollection;
pEnv.Get_LowerLeft(P1);
pEnv.Get_UpperLeft(P2);
pEnv.Get_UpperRight(p3);
pEnv.Get_LowerRight(p4);
pPointsColl.AddPoints(1, P1);
pPointsColl.AddPoints(1, P2);
pPointsColl.AddPoints(1, p3);
pPointsColl.AddPoints(1, p4);
pTopo := pPointsColl as ITopologicalOperator;
pTopo.Simplify();
result := pPointsColl as IPolygon;
end;