Changeset 35825 in osm


Ignore:
Timestamp:
2021-10-03T00:20:47+02:00 (3 years ago)
Author:
Don-vip
Message:

update to JOSM 17749 / osmpbf 1.5.0

Location:
applications/editors/josm/plugins/pbf
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pbf/build.xml

    r35650 r35825  
    33
    44    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    5     <property name="plugin.main.version" value="17334"/>
     5    <property name="plugin.main.version" value="17749"/>
    66
    77    <property name="plugin.author" value="Don-vip"/>
  • applications/editors/josm/plugins/pbf/ivy.xml

    r35631 r35825  
    22  <info organisation="org.openstreetmap.josm.plugins" module="pbf"/>
    33  <dependencies>
    4     <dependency conf="default->default" org="com.google.protobuf" name="protobuf-java" rev="2.5.0"/>
    5     <dependency conf="default->default" org="crosby" name="osmpbf" rev="1.3.3"/>
     4    <dependency conf="default->default" org="com.google.protobuf" name="protobuf-java" rev="3.13.0"/>
     5    <dependency conf="default->default" org="org.openstreetmap.pbf" name="osmpbf" rev="1.5.0"/>
    66  </dependencies>
    77</ivy-module>
  • applications/editors/josm/plugins/pbf/ivy_settings.xml

    r35631 r35825  
    44  <resolvers>
    55    <ibiblio name="josm-nexus" m2compatible="true" root="https://josm.openstreetmap.de/nexus/content/repositories/public/" />
    6     <url name="mkgmap">
    7       <ivy pattern="http://ivy.mkgmap.org.uk/repo/[organisation]/[module]/[revision]/ivys/ivy.xml"/>
    8       <artifact pattern="http://ivy.mkgmap.org.uk/repo/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"/>
    9     </url>
    106  </resolvers>
    117  <modules>
    12     <module organisation="crosby" name="osmpbf" resolver="mkgmap"/>
    138  </modules>
    149</ivysettings>
  • applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfReader.java

    r35636 r35825  
    103103            if (info.hasTimestamp()) {
    104104                checkTimestamp(info.getTimestamp());
    105                 osm.setTimestamp(getDate(info));
     105                osm.setInstant(getDate(info).toInstant());
    106106            }
    107107        }
     
    173173                                timestamp += info.getTimestamp(i);
    174174                                checkTimestamp(timestamp);
    175                                 nd.setTimestamp(new Date(date_granularity * timestamp));
     175                                nd.setInstant(new Date(date_granularity * timestamp).toInstant());
    176176                            }
    177177                        }
     
    365365    }
    366366
     367    @SuppressWarnings("resource")
    367368    public void parse(InputStream source) throws IOException, IllegalDataException {
    368369        new BlockInputStream(source, parser).process();
  • applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfWriter.java

    r35636 r35825  
    2121import org.openstreetmap.josm.data.osm.Way;
    2222import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     23import org.openstreetmap.josm.tools.Logging;
    2324
    2425import crosby.binary.BinarySerializer;
     
    126127                    int uid = e.getUser() == null ? -1 : (int) e.getUser().getId();
    127128                    int userSid = stable.getIndex(getUserId(e));
    128                     int timestamp = (int) (e.getTimestamp().getTime() / date_granularity);
     129                    int timestamp = (int) (e.getInstant().toEpochMilli() / date_granularity);
    129130                    int version = e.getVersion();
    130131                    long changeset = e.getChangesetId();
     
    150151                        b.setUserSid(stable.getIndex(e.getUser().getName()));
    151152                    }
    152                     b.setTimestamp((int) (e.getTimestamp().getTime() / date_granularity));
     153                    b.setTimestamp((int) (e.getInstant().toEpochMilli() / date_granularity));
    153154                    b.setVersion(e.getVersion());
    154155                    b.setChangeset(e.getChangesetId());
     
    435436            } else {
    436437                // No data. Is this an empty file?
     438                Logging.debug("No PBF data. Is this an empty file?");
    437439            }
    438440        }
Note: See TracChangeset for help on using the changeset viewer.