Changeset 35825 in osm
- Timestamp:
- 2021-10-03T00:20:47+02:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/pbf
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pbf/build.xml
r35650 r35825 3 3 4 4 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 5 <property name="plugin.main.version" value="17 334"/>5 <property name="plugin.main.version" value="17749"/> 6 6 7 7 <property name="plugin.author" value="Don-vip"/> -
applications/editors/josm/plugins/pbf/ivy.xml
r35631 r35825 2 2 <info organisation="org.openstreetmap.josm.plugins" module="pbf"/> 3 3 <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"/> 6 6 </dependencies> 7 7 </ivy-module> -
applications/editors/josm/plugins/pbf/ivy_settings.xml
r35631 r35825 4 4 <resolvers> 5 5 <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>10 6 </resolvers> 11 7 <modules> 12 <module organisation="crosby" name="osmpbf" resolver="mkgmap"/>13 8 </modules> 14 9 </ivysettings> -
applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfReader.java
r35636 r35825 103 103 if (info.hasTimestamp()) { 104 104 checkTimestamp(info.getTimestamp()); 105 osm.set Timestamp(getDate(info));105 osm.setInstant(getDate(info).toInstant()); 106 106 } 107 107 } … … 173 173 timestamp += info.getTimestamp(i); 174 174 checkTimestamp(timestamp); 175 nd.set Timestamp(new Date(date_granularity * timestamp));175 nd.setInstant(new Date(date_granularity * timestamp).toInstant()); 176 176 } 177 177 } … … 365 365 } 366 366 367 @SuppressWarnings("resource") 367 368 public void parse(InputStream source) throws IOException, IllegalDataException { 368 369 new BlockInputStream(source, parser).process(); -
applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfWriter.java
r35636 r35825 21 21 import org.openstreetmap.josm.data.osm.Way; 22 22 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 23 import org.openstreetmap.josm.tools.Logging; 23 24 24 25 import crosby.binary.BinarySerializer; … … 126 127 int uid = e.getUser() == null ? -1 : (int) e.getUser().getId(); 127 128 int userSid = stable.getIndex(getUserId(e)); 128 int timestamp = (int) (e.get Timestamp().getTime() / date_granularity);129 int timestamp = (int) (e.getInstant().toEpochMilli() / date_granularity); 129 130 int version = e.getVersion(); 130 131 long changeset = e.getChangesetId(); … … 150 151 b.setUserSid(stable.getIndex(e.getUser().getName())); 151 152 } 152 b.setTimestamp((int) (e.get Timestamp().getTime() / date_granularity));153 b.setTimestamp((int) (e.getInstant().toEpochMilli() / date_granularity)); 153 154 b.setVersion(e.getVersion()); 154 155 b.setChangeset(e.getChangesetId()); … … 435 436 } else { 436 437 // No data. Is this an empty file? 438 Logging.debug("No PBF data. Is this an empty file?"); 437 439 } 438 440 }
Note:
See TracChangeset
for help on using the changeset viewer.