Ignore:
Timestamp:
2009-08-02T22:03:01+02:00 (10 years ago)
Author:
stoecker
Message:

temporary fix for Lambert projection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/Lambert.java

    r1857 r1887  
    107107                layoutZone = currentZone;
    108108            } else if (layoutZone != currentZone) {
    109                 if ((currentZone < layoutZone && Math.abs(zoneLimits[currentZone] - lt) > cMaxOverlappingZones)
    110                         || (currentZone > layoutZone && Math.abs(zoneLimits[layoutZone] - lt) > cMaxOverlappingZones)) {
     109                if (farawayFromLambertZoneFrance(lt,lg)) {
    111110                    OptionPaneUtil.showMessageDialog(Main.parent,
    112111                            tr("IMPORTANT : data positioned far away from\n"
     
    273272    }
    274273
     274    private boolean farawayFromLambertZoneFrance(double lat, double lon) {
     275        if (lat < (zoneLimits[3] - cMaxOverlappingZones) || (lat > (cMaxLatZone1 + cMaxOverlappingZones))
     276                || (lon < (cMinLonZones - cMaxOverlappingZones)) || (lon > (cMaxLonZones + cMaxOverlappingZones)))
     277            return true;
     278        return false;
     279    }
     280
    275281    public Bounds getWorldBoundsLatLon()
    276282    {
     283        // These are not the Lambert Zone boundaries but we keep these values until coordinates outside the
     284        // projection boundaries are handled correctly.
    277285        return new Bounds(
     286                new LatLon(-85.05112877980659, -180.0),
     287                new LatLon(85.05112877980659, 180.0));
     288        /*return new Bounds(
    278289                new LatLon(45.0, -4.9074074074074059),
    279                 new LatLon(57.0, 10.2));
     290                new LatLon(57.0, 10.2));*/
    280291    }
    281292}
Note: See TracChangeset for help on using the changeset viewer.