Package org.openstreetmap.josm.data

Examples of org.openstreetmap.josm.data.Bounds


            return null;
        return new Bounds(values);
    }

    private boolean parseURL(DownloadDialog gui) {
        Bounds b = OsmUrlToBounds.parse(tfOsmUrl.getText());
        if(b == null) return false;
        gui.boundingBoxChanged(b,BoundingBoxSelection.this);
        updateBboxFields(b);
        updateUrl(b);
        return true;
View Full Code Here


                return null;
            if (minlon > maxlon)
                return null;
            if (minlat > maxlat)
                return null;
            return new Bounds(minlat,minlon,maxlat,maxlon);
        }
View Full Code Here

                return null;
            return new Bounds(minlat,minlon,maxlat,maxlon);
        }

        protected void refreshBounds() {
            Bounds  b = build();
            parent.boundingBoxChanged(b, BoundingBoxSelection.this);
        }
View Full Code Here

    }

    @Override
    public void propertyChange(PropertyChangeEvent evt) {
        if (evt.getPropertyName().equals(BBoxChooser.BBOX_PROP)) {
            Bounds bbox = (Bounds)evt.getNewValue();
            parent.boundingBoxChanged(bbox, this);
        }
    }
View Full Code Here

            return null;
        if (minlon > maxlon)
            return null;
        if (minlat > maxlat)
            return null;
        return new Bounds(minlon,minlat,maxlon,maxlat);
    }
View Full Code Here

            return null;
        return new Bounds(minlon,minlat,maxlon,maxlat);
    }

    private boolean parseURL() {
        Bounds b = OsmUrlToBounds.parse(tfOsmUrl.getText());
        if(b == null) return false;
        updateBboxFields(b);
        return true;
    }
View Full Code Here

                    }
                    currentResult.nearestPlace = tr(atts.getValue("type"));
                    currentResult.lat = Double.parseDouble(atts.getValue("lat"));
                    currentResult.lon = Double.parseDouble(atts.getValue("lon"));
                    String[] bbox = atts.getValue("boundingbox").split(",");
                    currentResult.bounds = new Bounds(
                            Double.parseDouble(bbox[0]), Double.parseDouble(bbox[2]),
                            Double.parseDouble(bbox[1]), Double.parseDouble(bbox[3]));
                    data.add(currentResult);
                }
            } catch (NumberFormatException x) {
View Full Code Here

        iSelectionRectStart = pStart;
        iSelectionRectEnd = pEnd;

        Coordinate l1 = getPosition(p_max); // lon may be outside [-180,180]
        Coordinate l2 = getPosition(p_min); // lon may be outside [-180,180]
        Bounds b = new Bounds(
                new LatLon(
                        Math.min(l2.getLat(), l1.getLat()),
                        LatLon.toIntervalLon(Math.min(l1.getLon(), l2.getLon()))
                        ),
                        new LatLon(
                                Math.max(l2.getLat(), l1.getLat()),
                                LatLon.toIntervalLon(Math.max(l1.getLon(), l2.getLon())))
                );
        Bounds oldValue = this.bbox;
        this.bbox = b;
        repaint();
        firePropertyChange(BBOX_PROP, oldValue, this.bbox);
    }
View Full Code Here

        this.pref = pref;
        if (pref == null) {
            ellps = Ellipsoid.WGS84;
            datum = WGS84Datum.INSTANCE;
            proj = new Mercator();
            bounds = new Bounds(
                    -85.05112877980659, -180.0,
                    85.05112877980659, 180.0, true);
        } else {
            Map<String, String> parameters = parseParameterList(pref);
            ellps = parseEllipsoid(parameters);
View Full Code Here

    public static Bounds parseBounds(String boundsStr) throws ProjectionConfigurationException {
        String[] numStr = boundsStr.split(",");
        if (numStr.length != 4)
            throw new ProjectionConfigurationException(tr("Unexpected number of arguments for parameter ''+bounds'' (must be 4)"));
        return new Bounds(parseAngle(numStr[1], "minlat (+bounds)"),
                parseAngle(numStr[0], "minlon (+bounds)"),
                parseAngle(numStr[3], "maxlat (+bounds)"),
                parseAngle(numStr[2], "maxlon (+bounds)"), false);
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.Bounds

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.