WorldWind project shut down, this site probably will be too.

Hello all,

With the recent announcement that the NASA World Wind project has been shut down ( there is really very little reason to continue running this forum, and as NASA staff were providing most of the moderation and responses it will likely fill up with spam shortly.

Unless something changes in the near future, I will be shutting down as well as this forum, as it is no longer useful. Most of the data on WWC is referencing the legacy C# version of World Wind anyway.

See more
See less

Gauss Kruger Projection!

  • Filter
  • Time
  • Show
Clear All
new posts

  • Gauss Kruger Projection!

    I saw the example, which uses the Mercator Projection (the WMS uses EPSG:4326). If I want use Gauss Kruger Projection(the WMS uses EPSG: 2364), How can I do this.

  • #2
    Extends FlatGlobe to add a new projection.
    Like this :


    • #3
      My WMS uses EPSG:4326, not EPSG: 2364, what sould I do?


      • #4
        Find the projection formula for that projection and follow BrunoSpy's advice.


        • #5
          The problem with Gauss Kruger is that it is a family of projections, based on several central meridians, just like the UTMs are, (spanning over 3 degrees instead of 6, if i'm right). So you can't draw the entire world with such a projection, or you'll get important distortion or even crash... It's probably possible to switch from a GK (or UTM) projection to another, following say the mouse position, or the center of the screen, and draw only the valid tiles, but that's a whole new software...


          • #6
            Hi WWJ fellows,

            This projection problem reminded me some old java code I wrote in the past, so I tackled the FlatWorld example with a few algorithms packaged in a 'projections' directory (pretty hard to understand the maths but black-box). Got the data from old CSV converted into XML and wrote the convenient parsing methods to get the projection parameters. Made some minor changes in the FlatGlobe, did not extent it (i would have to create +800 files !), and finally changed the GUI to have a convenient list instead of a combo.
            Happily, WWJ does behave OK in most world projections !! (see attached). Amazing, even with projections which are centered on the Pacific Ocean (Mollweide). Graticules are quite OK too, zoomin-out is OK even if dowload seems blocked...
            BUT, as guessed, the local projections (UTMs,...Gauss, StatePlanes...) do crash in severe math errors... I'll keep you informed, as I'll try to apply list restrictions according to current area...(that's another XML file to read and process).


            • #7
              Getting quite close to the solution now...UTMs, StatePlanes and all local projections do not crash IF the current view is inside the projection's domain of validity...
              I'm trying to use the ViewLimits in order to block the zoom/pan in such situation. I've seen there is a BasicOrbitViewLimit class, but no FlatOrbitViewLimits class...
              If i use the first one, there is no effect (zoom in and out is possible on all map). I've tried to limit every projection on a ((-50,-50),(50,50)) Sector for now with no luck...
              Any hint greatly appreciated.


              • #8
                Hi there,

                Frenchy, I've successfully redefined the lat/lon ranges and zoom limits for WW hosting a RenderableLayer containing a SurfaceImage.
                Here is the code, hope it helps.
                It uses the interfaces OrbitView and OrbitViewLimits, rather than the classes implementations.

                public OrbitView getOrbitView(WorldWindow wwd) {
                View view = wwd.getView();
                return (view != null && view instanceof OrbitView) ? (OrbitView) view : null;

                public void installRenderingLimitsForImage(WorldWind ow wwd, Sector sector, double zoomMin, double zoomMax) {
                OrbitView view = getOrbitView(wwd);
                if (view == null)

                OrbitViewLimits limits = view.getOrbitViewLimits();
                if (limits == null)

                limits.setHeadingLimits(Angle.fromDegree s(0), Angle.fromDegrees(0));
                limits.setPitchLimits(Angle.fromDegrees( 0), Angle.fromDegrees(0));
                limits.setRollLimits(Angle.fromDegrees(0 ), Angle.fromDegrees(0));
                // NB: Réduire la valeur pour augmenter le zoom max !!!
                limits.setZoomLimits(zoomMin, zoomMax);

                I call installRenderingLimitsForImage() just after calling doFlatGlobe():

                Sector sector = new Sector(Angle.fromDegrees(-9), Angle.fromDegrees(9), Angle.fromDegrees(-15), Angle.fromDegrees(15));

                installRenderingLimitsForImage(wwd, sector, 500000.0, 20000000.0);