| |
Dim gcs As New MapObjects2.GeoCoordSys
Dim pcs As New MapObjects2.ProCoordSys
Dim polyDegrees As MapObjects2.Polygon
Dim polyMeters As MapObjects2.Polygon
Set polyDegrees = 'your unprojected polygon in decimal degrees
gcs.Type = '**A
pcs.Type = '**B
Set polyMeters = pcs.Transform(gcs, polyDegrees)
...where:
**A = Geographic coordinate system constant for
your unprojected data.
**B = Projected coordinate system constant which
preserves accurate area measurements at the scale
and area of the world your data represents.
More info:
The optional third argument to the transform
method is a densification tolerance, helpful with
lines and polygons to ensure that long straight
segments between vertices are broken up into new
vertices so that the transformed shape is as
accurate as you need it to be.
The optional fourth argument to the Transform
method is required if the 'from' and 'to' shapes
are using a different geodetic datum. |