Package org.openstreetmap.josm.data.gpx

Examples of org.openstreetmap.josm.data.gpx.GpxData


    @Override
    public void startDocument() {
      accumulator = new StringBuffer();
      states = new Stack<State>();
      currentData = new GpxData();
    }
View Full Code Here


      dcl.dataChanged(this);
    }
  }

  public static GpxData toGpxData(DataSet data, File file) {
    GpxData gpxData = new GpxData();
    gpxData.storageFile = file;
    HashSet<Node> doneNodes = new HashSet<Node>();
    for (Way w : data.ways) {
      if (w.incomplete || w.deleted)
        continue;
View Full Code Here

        LineElemStyle ls = new LineElemStyle();
        float f = random.nextFloat();
        ls.color = Color
            .getHSBColor(f * random.nextFloat(), 0.9f, 0.9f);
        ls.width = LogicConstants.getInt("PLAN_WAY_WIDTH", 2);
        MarkerLayer stops = new MarkerLayer(new GpxData(), "Stops "
            + id_layer, File.createTempFile("stops", "tmp"),
            new GpxLayer(new GpxData()), this.mapView);
        stops.data.add(new StopMarker(latlon_origin, "origin",
            "tsp_stop", stops, 0, 0, ls.color));
        for (String stop : plan.getStops()) {
          String[] array = stop.split(",");
          double[] point = new double[2];
View Full Code Here

   */
  private File writeTo(Posicion[] posiciones, boolean linea, boolean showTime) {
    File file = null;
    try {
      file = File.createTempFile("Historico", ".gpx");
      GpxData data = new GpxData();
      ImmutableGpxTrack track = new ImmutableGpxTrack(
          new LinkedList<Collection<WayPoint>>(),
          new LinkedHashMap<String, Object>());
      LinkedList<WayPoint> linkedList = new LinkedList<WayPoint>();
      if (posiciones != null) {
View Full Code Here

  }

  private Layer loadIncidences() {
    MarkerLayer incidences = null;
    try {
      incidences = new MarkerLayer(new GpxData(),
          i18n.getString("Incidences.incidences"),
          File.createTempFile("incidences", "tmp"), new GpxLayer(
              new GpxData()), this.mapView);
      incidences.visible = Authentication.getUsuario()
          .getIncidenciasVisibles();
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

  }

  private Layer loadPersonas() {
    MarkerLayer resources = null;
    try {
      resources = new MarkerLayer(new GpxData(),
          i18n.getString("Resources.resources.people"),
          File.createTempFile("layer_res", "tmp"), new GpxLayer(
              new GpxData()), this.mapView);
      resources.visible = Authentication.getUsuario()
          .getPersonasVisibles();
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

  }

  private Layer loadVehiculos() {
    MarkerLayer resources = null;
    try {
      resources = new MarkerLayer(new GpxData(),
          i18n.getString("Resources.resources.vehicles"),
          File.createTempFile("layer_res", "tmp"), new GpxLayer(
              new GpxData()), this.mapView);
      resources.visible = Authentication.getUsuario()
          .getVehiculosVisibles();
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

            if (in == null)
                return null;
            progressMonitor.subTask(tr("Downloading OSM data..."));
            GpxReader reader = new GpxReader(compression.getUncompressedInputStream(in));
            gpxParsedProperly = reader.parse(false);
            GpxData result = reader.getGpxData();
            result.fromServer = DownloadGpsTask.isFromServer(url);
            return result;
        }
View Full Code Here

        public MarkerWriter(PrintWriter out) {
            super(out);
        }

        public void write(MarkerLayer layer) {
            GpxData data = new GpxData();
            data.attr.put(GpxData.META_DESC, "exported JOSM marker layer");
            for (Marker m : layer.data) {
                data.waypoints.add(m.convertToWayPoint());
            }
            super.write(data);
View Full Code Here

                new LayerListPopup.InfoAction(this)}));
        return actions.toArray(new Action[actions.size()]);
    }

    public static GpxData toGpxData(DataSet data, File file) {
        GpxData gpxData = new GpxData();
        gpxData.storageFile = file;
        HashSet<Node> doneNodes = new HashSet<>();
        for (Way w : data.getWays()) {
            if (!w.isUsable()) {
                continue;
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.gpx.GpxData

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.