Map projection Plug-in
From World Wind Wiki
| Map projection Plug-in | |
|---|---|
| Sinusoidal reprojection
| |
| Developer | Bjorn Reppen aka "Mashi" |
| Latest release | 1.0 / 2005-07-17 |
| License | Public Domain |
| Web site | mashiharu.com |
World Wind can not currently display images in any other projection than Equidistant Cylindrical, which is often problematic, especially for those of us who have problems using command-line tools like mapserver & gdalwarp, and even bigger problems compiling the same tools. So I figured this would make a pretty good hack.
The plugin works by loading the source map and dividing it into a grid. Each point in the grid is projected from the source coordinate system into the XYZ coordinates (meters) World Wind uses internally and those are turned into a mesh with the map as the texture. Using this method, images can be loaded without any prior processing by external programs. The sample displays a copy of the blue marble bitmap in Sinusoidal projection.
The code depends on proj.4 (proj.dll) for the actual projection. At the bottom of the plug-in there is an interop class. Thanks to Nowak and Norman Vine for feeding me data, and the proj.4 developers for creating a great library that was also easy to link to. This plug-in does not yet have a UI, projection + coordinate info must be specified inside the source code. I'm publishing it because I think it might be of use to other developers (especially the interop part).
Note: The code may (among other things) also be used to simply convert coordinates between different coordinate systems. Think display/input of values in different coordinates than the default latitude/longitude, etc...
Supported projections: Airy, Aitoff, Albers Equal Area, Apian Globular I, August Epicycloidal, Azimuthal Equidistant, Bacon Globular, Bipolar conic of western hemisphere, Boggs Eumorphic, Bonne (Werner lat_1=90), Cassini, Central Cylindrical, Chamberlin Trimetric, Collignon, Craster Parabolic (Putnins P4), Denoyer Semi-Elliptical, Eckert I, Eckert II, Eckert III, Eckert IV, Eckert V, Eckert VI, Equal Area Cylindrical, Equidistant Conic, Equidistant Cylindrical (Plate Caree), Euler, Fahey, Foucaut Sinusoidal, Foucaut, Gall (Gall Stereographic), General Oblique Transformation, General Sinusoidal Series, Geocentric, Geostationary Satellite View, Ginsburg VIII (TsNIIGAiK), Gnomonic, Goode Homolosine, Hammer & Eckert-Greifendorff, Hatano Asymmetrical Equal Area, Internation Map of the World Polyconic, Kavraisky V, Kavraisky VII, Krovak, Laborde, Lagrange, Lambert Azimuthal Equal Area, Lambert Conformal Conic Alternative, Lambert Conformal Conic, Lambert Equal Area Conic, Larrivee, Laskowski, Lat/long (Geodetic), Lat/long (Geodetic), Lee Oblated Stereographic, Loximuthal, McBride-Thomas Flat-Polar Parabolic, McBryde-Thomas Flat-Polar Quartic, McBryde-Thomas Flat-Polar Sine, McBryde-Thomas Flat-Polar Sinusoidal, McBryde-Thomas Flat-Pole Sine (No. 2), Mercator, Miller Cylindrical, Miller Oblated Stereographic, Mod. Stererographics of 48 U.S., Mod. Stererographics of 50 U.S., Mod. Stererographics of Alaska, Modified Polyconic, Mollweide, Murdoch I, Murdoch II, Murdoch III, Near-sided perspective, Nell, Nell-Hammer, New Zealand Map Grid, Nicolosi Globular, Oblated Equal Area, Oblique Cylindrical Equal Area, Oblique Mercator, Oblique Stereographic Alternative, Ortelius Oval, Orthographic, Perspective Conic, Polyconic (American), Putnins P1, Putnins P2, Putnins P3', Putnins P3, Putnins P4', Putnins P5', Putnins P5, Putnins P6', Putnins P6, Quartic Authalic, Rectangular Polyconic, Robinson, Sinusoidal (Sanson-Flamsteed), Space oblique for LANDSAT, Stereographic, Swiss. Obl. Mercator, Tilted perspective, Tissot Conic, Transverse Central Cylindrical, Transverse Cylindrical Equal Area, Transverse Mercator, Two Point Equidistant, Universal Polar Stereographic, Universal Transverse Mercator (UTM), Urmaev Flat-Polar Sinusoidal, Urmaev V, Vitkovsky I, Wagner I (Kavraisky VI), Wagner II, Wagner III, Wagner IV, Wagner V, Wagner VI, Wagner VII, Werenskiold I, Winkel I, Winkel II, Winkel Tripel, van der Grinten (I), van der Grinten II, van der Grinten III, van der Grinten IV.
Installation: Put the proj.dll file in worldwind.exe directory. Put the reproject.cs file in the sub-directory "Plugins". The sinusoidal sample image should download from this site once the plug-in is enabled.

