Is This Content Helpful?
We're glad to know this article was helpful.
How can I use custom map projections?
When it comes to creating projections in MapObjects, there are basically four categories, ranging from the most simple to the most complex. Which approach you take depends on what you want to do versus the projection constants that MapObjects provides. Following the steps below will help you choose the least complex approach necessary.
If you are using a standard projected coordinate system, such as Connecticut State Plane NAD 1983 or UTM Zone 14 North:
1) Make a ProjCoordSys and set the Type property with one of the hundreds of canned projected coordinate systems and go with that. This approach handles the needs of at least 90% of MapObjects developers.
If you want to use a standard projected coordinate system like #1 above but want to tweak some of the parameters to fit your specific target area:
2) Make a ProjCoordSys and set the Type property with one of the hundreds of canned projected coordinate systems. Then use the SetParameter method to tweak any of the parameters for that projected coordinate system, for example, central meridian or standard parallels. This handles most of the remaining 10% of developers' needs.
If there are no ProjCoordSys constants written specifically for your needs, but you have found a Projection constant that does fit that you can build from:
3) Make a Projection object, setting its Type property to one of the several dozen canned projections. Make Spheroid, Datum, Unit, GeoCoordSys, and PrimeMeridian objects. Set all of their properties and plug them all into a new ProjCoordSys object.
If there is no Projection constant that fits your needs.
For example, if you want your map to draw like ArcView's "World From Space", but there is no "Orthographic" projection:
4) When there is no Projection constant that fits your needs, you can write your own as a COM server using MS-VC++ and ATL. Plug that DLL into the Custom
property of a new Projection object and follow the rest of the steps in #3 above to fully implement your custom projection formulas into MapObjects. For a detailed step-by-step process for creating a custom projection COM server usable with MapObjects, see the MapObjects online help topic "Creating custom projections".