Package org.openstreetmap.josm.data.coor

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


        String position = "";
        String format = LogicConstants.get("FORMATO_COORDENADAS_MAPA",
            "UTM");
        if (format.equals(LogicConstants.COORD_UTM)) {
          UTM u = new UTM(LogicConstants.getInt("ZONA_UTM"));
          EastNorth en = u.latlon2eastNorth(ll);
          position = String.format("x: %.1f y: %.1f", en.getX(), en
              .getY());
        } else {
          position = String.format("Lat: %.4f Lon: %.4f", ll.lat(),
              ll.lon());
        }
View Full Code Here


          String format = LogicConstants.get(
              "FORMATO_COORDENADAS_MAPA", "UTM");
          if (format.equals(LogicConstants.COORD_UTM)) {
            UTM u = new UTM(LogicConstants.getInt("ZONA_UTM"));
            LatLon ll = u.eastNorth2latlon(new EastNorth(x, y));
            view.zoomTo(Main.proj.latlon2eastNorth(ll), view
                .getScale());
          } else {
            // en el latlong la x y la y van al reves
            view.zoomTo(Main.proj
View Full Code Here

  }

  private static LatLon extractLatLon(String[] numeros) {
    Double x = new Double(numeros[0]);
    Double y = new Double(numeros[1]);
    EastNorth en = new EastNorth(x, y);

    LatLon latlon = UTMConverter.eastNorth2latlon(en);
    return latlon;
  }
View Full Code Here

    if (from != null) {
      this.from = from;
      if (LogicConstants.get("FORMATO_COORDENADAS_MAPA", "UTM").equals(
          LogicConstants.COORD_UTM)) {
        UTM u = new UTM(LogicConstants.getInt("ZONA_UTM"));
        EastNorth enf = u.latlon2eastNorth(from);
        fy.setText(String.valueOf(enf.getX()));
        fx.setText(String.valueOf(enf.getY()));
      } else {
        fx.setText(String.valueOf(from.getX()));
        fy.setText(String.valueOf(from.getY()));
      }
    }
View Full Code Here

      if (LogicConstants.get("FORMATO_COORDENADAS_MAPA", "UTM").equals(
          LogicConstants.COORD_UTM)) {
        // mirar LogicConstants.transform(Point geom, final String
        // sourceSRID, final String targetSRID)
        UTM u = new UTM(LogicConstants.getInt("ZONA_UTM"));
        EastNorth ent = u.latlon2eastNorth(to);
        ty.setText(String.valueOf(ent.getX()));
        tx.setText(String.valueOf(ent.getY()));
      } else {
        tx.setText(String.valueOf(to.getX()));
        ty.setText(String.valueOf(to.getY()));
      }
    }
View Full Code Here

        }

        zoomToFactor(follow.eastNorth, zoomFactor, PI_MEDIO
            - lastFollowAngle);

        lastFollowPos = new EastNorth(follow.eastNorth.east(),
            follow.eastNorth.north());

        // zoomTo(follow.eastNorth, getScale(), PI_MEDIO -
        // lastFollowAngle);
      }
View Full Code Here

    public ProjectionBounds(EastNorth p) {
        this.min = p;
        this.max = p;
    }
    public ProjectionBounds(EastNorth center, double east, double north) {
        this.min = new EastNorth(center.east()-east/2.0, center.north()-north/2.0);
        this.max = new EastNorth(center.east()+east/2.0, center.north()+north/2.0);
    }
View Full Code Here

        this.max = new EastNorth(center.east()+east/2.0, center.north()+north/2.0);
    }
    public void extend(EastNorth e)
    {
        if (e.east() < min.east() || e.north() < min.north())
            min = new EastNorth(Math.min(e.east(), min.east()), Math.min(e.north(), min.north()));
        if (e.east() > max.east() || e.north() > max.north())
            max = new EastNorth(Math.max(e.east(), max.east()), Math.max(e.north(), max.north()));
    }
View Full Code Here

        double eslt = Ellipsoid.clarke.e * Math.sin(lat);
        double l = Math.log(Math.tan(Math.PI / 4.0 + (lat / 2.0))
                * Math.pow((1.0 - eslt) / (1.0 + eslt), Ellipsoid.clarke.e / 2.0));
        double east = Xs + c * Math.exp(-n * l) * Math.sin(n * (lon - lg0));
        double north = Ys - c * Math.exp(-n * l) * Math.cos(n * (lon - lg0));
        return new EastNorth(east, north);
    }
View Full Code Here

        double theta = n * (Math.toRadians(p.lon()) - lonf);

        double x = ef + r * Math.sin(theta);     //587446.7
        double y = nf + rf - r * Math.cos(theta); //6485401.6

        return new EastNorth(x,y);
    }
View Full Code Here

TOP

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

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.