Ignore:
Timestamp:
2009-07-03T12:33:32+02:00 (15 years ago)
Author:
stoecker
Message:

Large rework in projection handling - now allows only switching and more specific projections
TODO:

  • allow subprojections (i.e. settings for projections)
  • setup preferences for subprojections
  • better support of the new projection depending world bounds (how to handle valid data outside of world)
  • do not allow to zoom out of the world - zoom should stop when whole world is displayed
  • fix Lambert and SwissGrid to handle new OutOfWorld style and subprojections
  • fix new UTM projection
  • handle layers with fixed projection on projection change
  • allow easier projection switching (e.g. in menu)

NOTE:
This checkin very likely will cause problems. Please report or fix them. Older plugins may have trouble. The SVN plugins
have been fixed but may have problems nevertheless. This is a BIG change, but will make JOSMs internal structure much cleaner
and reduce lots of projection related problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r1209 r1722  
    77import org.openstreetmap.josm.data.Bounds;
    88import org.openstreetmap.josm.data.projection.Projection;
     9import org.openstreetmap.josm.Main;
    910
    1011import java.text.DecimalFormat;
     
    8788     */
    8889    public boolean isOutSideWorld() {
    89         return lat() < -Projection.MAX_LAT || lat() > Projection.MAX_LAT ||
    90             lon() < -Projection.MAX_LON || lon() > Projection.MAX_LON;
     90        Bounds b = Main.proj.getWorldBoundsLatLon();
     91        return lat() < b.min.lat() || lat() > b.max.lat() ||
     92            lon() < b.min.lon() || lon() > b.max.lon();
    9193    }
    9294
Note: See TracChangeset for help on using the changeset viewer.