Package org.openstreetmap.josm.data.coor

Examples of org.openstreetmap.josm.data.coor.LatLon


    }
    return file;
  }

  private WayPoint buildWay(Posicion pos, boolean linea, boolean showTime) {
    WayPoint way = new WayPoint(new LatLon(pos.getY(), pos.getX()));
    way.attr.put("time",
        dateFormat.format(pos.getMarcaTemporal().getTime()));
    String name = pos.getIdentificador();

    if (showTime) {
View Full Code Here


      IncidenciaConsultas.get(objeto.getId());
      if (objeto.getGeometria() == null)
        return;

      Point geom = objeto.getGeometria().getCentroid();
      LatLon ll = new LatLon(geom.getCoordinate().y,
          geom.getCoordinate().x);
      // BasicWindow.showOnMap(ll, 1);
    }
View Full Code Here

          } else if (e.getActionCommand().equals(// nueva incidencia
              i18n.getString("map.menu.newIncidence"))) {
            Incidencia f = new Incidencia();
            f.setCreador(Authentication.getUsuario());
            LatLon from = mapViewLocal.getLatLon(mouseEvent.getX(),
                mouseEvent.getY());
            GeometryFactory gf = new GeometryFactory();
            f.setGeometria(gf.createPoint(new Coordinate(
                from.lon(), from.lat())));
            IncidenceDialog id = new IncidenceDialog(
                f,
                i18n.getString("Incidences.summary.title")
                    + " "
                    + i18n.getString("Incidences.nuevaIncidencia"),
View Full Code Here

    mapView.setAutoTurn(false);
    mapView.setSmoothTurn(false);
    mapView.setAutoZoom(false);

    this.mapView.zoomToFactor(Main.proj
        .latlon2eastNorth(new LatLon(LogicConstants.LATITUD_INICIAL,
            LogicConstants.LONGITUD_INICIAL)),
        LogicConstants.NIVEL_ZOOM_INICIAL, 0);
  }
View Full Code Here

     * @param enlargeDegree
     */
    public void enlargeBoundingBox(double enlargeDegree) {
        if (bounds == null)
            return;
        LatLon minLatlon = Main.getProjection().eastNorth2latlon(bounds.getMin());
        LatLon maxLatlon = Main.getProjection().eastNorth2latlon(bounds.getMax());
        bounds = new ProjectionBounds(
                Main.getProjection().latlon2eastNorth(new LatLon(minLatlon.lat() - enlargeDegree, minLatlon.lon() - enlargeDegree)),
                Main.getProjection().latlon2eastNorth(new LatLon(maxLatlon.lat() + enlargeDegree, maxLatlon.lon() + enlargeDegree)));
    }
View Full Code Here

        sanity();
    }

    public BBox(Way w) {
        for (Node n : w.getNodes()) {
            LatLon coor = n.getCoor();
            if (coor == null) {
                continue;
            }
            add(coor);
        }
View Full Code Here

            add(coor);
        }
    }

    public BBox(Node n) {
        LatLon coor = n.getCoor();
        if (coor == null) {
            xmin = xmax = ymin = ymax = 0;
        } else {
            xmin = xmax = coor.lon();
            ymin = ymax = coor.lat();
        }
    }
View Full Code Here

            if (y1 > y2) {
                double tmpy = y1;
                y1 = y2;
                y2 = tmpy;
            }
            LatLon topLeft  = new LatLon(y2+fudge, x1-fudge);
            LatLon botRight = new LatLon(y1-fudge, x2+fudge);
            List<LatLon> ret = new ArrayList<>(2);
            ret.add(topLeft);
            ret.add(botRight);
            return ret;
        }
View Full Code Here

    /**
     * Returns the top-left point.
     * @return The top-left point
     */
    public LatLon getTopLeft() {
        return new LatLon(ymax, xmin);
    }
View Full Code Here

    /**
     * Returns the bottom-right point.
     * @return The bottom-right point
     */
    public LatLon getBottomRight() {
        return new LatLon(ymin, xmax);
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.coor.LatLon

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.