Changeset 15449 in josm


Ignore:
Timestamp:
2019-10-10T17:06:20+02:00 (5 years ago)
Author:
GerdP
Message:

see #13538: deprecate LatLon.isOutSideWorld()

Location:
trunk/src/org/openstreetmap/josm/data
Files:
2 edited

Legend:

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

    r14794 r15449  
    1818
    1919import org.openstreetmap.josm.data.Bounds;
     20import org.openstreetmap.josm.data.osm.Node;
    2021import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    2122import org.openstreetmap.josm.tools.Logging;
     
    193194     * Determines if this lat/lon is outside of the world
    194195     * @return <code>true</code>, if the coordinate is outside the world, compared by using lat/lon.
    195      */
     196     * @deprecated use {@link Node#isOutSideWorld} instead, see also #13538.
     197     */
     198    @Deprecated
    196199    public boolean isOutSideWorld() {
    197200        Bounds b = ProjectionRegistry.getProjection().getWorldBoundsLatLon();
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r15335 r15449  
    1111import java.util.stream.Collectors;
    1212
     13import org.openstreetmap.josm.data.Bounds;
    1314import org.openstreetmap.josm.data.coor.EastNorth;
    1415import org.openstreetmap.josm.data.coor.LatLon;
     
    411412        LatLon ll = getCoor();
    412413        if (ll != null) {
    413             if (ll.isOutSideWorld())
     414            Bounds b = ProjectionRegistry.getProjection().getWorldBoundsLatLon();
     415            if (lat() < b.getMinLat() || lat() > b.getMaxLat() || lon() < b.getMinLon() || lon() > b.getMaxLon()) {
    414416                return true;
     417            }
    415418            if (!ProjectionRegistry.getProjection().latlon2eastNorth(ll).equalsEpsilon(getEastNorth(), 1.0)) {
    416419                // we get here if a node was moved or created left from -180 or right from +180
Note: See TracChangeset for help on using the changeset viewer.