Ticket #19972: 19972-with-mkgmap-jars.patch
File 19972-with-mkgmap-jars.patch, 6.2 KB (added by , 4 years ago) |
---|
-
.classpath
1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <classpath> 3 <classpathentry kind="src" path="gen"/> 4 <classpathentry excluding="crosby/binary/test/" kind="src" path="src"/> 3 <classpathentry kind="src" path="src"/> 5 4 <classpathentry kind="src" output="buildtest" path="test/unit"> 6 5 <attributes> 7 6 <attribute name="test" value="true"/> … … 11 10 <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/> 12 11 <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 13 12 <classpathentry kind="output" path="build"/> 13 <classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?project=pbf&ivyXmlPath=ivy.xml&confs=*&ivySettingsPath=ivy_settings.xml&loadSettingsOnDemand=false&ivyUserDir=&propertyFiles="/> 14 14 </classpath> -
.project
26 26 <nature>org.sonar.ide.eclipse.core.sonarNature</nature> 27 27 <nature>org.eclipse.jdt.core.javanature</nature> 28 28 <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> 29 <nature>org.apache.ivyde.eclipse.ivynature</nature> 29 30 </natures> 30 31 </projectDescription> -
ivy.xml
1 1 <ivy-module version="2.0"> 2 <info organisation="org.openstreetmap.josm.plugins" module="pbf"/> 3 <dependencies> 4 <dependency conf="default->default" org="org.openstreetmap.pbf" name="osmpbf" rev="1.4.0"/> 5 </dependencies> 2 <info organisation="uk.org.mkgmap" module="mkgmap"/> 3 4 <configurations> 5 <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/> 6 <conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/> 7 <conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/> 8 <conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/> 9 <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/> 10 <conf name="optional" visibility="public" description="contains all optional dependencies"/> 11 12 </configurations> 13 14 <publications> 15 <artifact name="mkgmap" conf="master" /> 16 </publications> 17 <dependencies> 18 <dependency org="com.google.protobuf" name="protobuf-java" 19 rev="2.5.0" 20 conf="compile->compile(*),master(*)" /> 21 22 <dependency org="crosby" name="osmpbf" 23 rev="1.3.3" 24 conf="compile->compile(*),master(*)" /> 25 26 27 </dependencies> 6 28 </ivy-module> -
ivy_settings.xml
1 <?xml version="1.0" encoding="utf-8"?>2 1 <ivysettings> 3 <settings defaultResolver="josm-nexus"/> 4 <resolvers> 5 <ibiblio name="josm-nexus" m2compatible="true" root="https://josm.openstreetmap.de/nexus/content/repositories/public/" /> 6 </resolvers> 2 <property name="mkgmap.ivy.repo" value="http://ivy.mkgmap.org.uk/repo" /> 3 <settings defaultResolver="custom" /> 4 5 <include url="${ivy.default.settings.dir}/ivysettings-public.xml"/> 6 <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/> 7 <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/> 8 <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/> 9 <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/> 10 11 <resolvers> 12 <chain name="custom" returnFirst="true"> 13 14 <resolver ref="default" /> 15 16 <url name="mkgmap"> 17 <ivy pattern="${mkgmap.ivy.repo}/[organisation]/[module]/[revision]/ivys/ivy.xml" /> 18 <artifact pattern="${mkgmap.ivy.repo}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" /> 19 </url> 20 21 </chain> 22 23 24 </resolvers> 25 7 26 </ivysettings> -
src/org/openstreetmap/josm/plugins/pbf/io/PbfReader.java
74 74 75 75 if (header.hasBbox()) { 76 76 HeaderBBox bbox = header.getBbox(); 77 if (bbox != null) { 78 double minlat = parseRawDegrees(bbox.getBottom()); 79 double minlon = parseRawDegrees(bbox.getLeft()); 80 double maxlat = parseRawDegrees(bbox.getTop()); 81 double maxlon = parseRawDegrees(bbox.getRight()); 82 Bounds b = new Bounds(minlat, minlon, maxlat, maxlon); 83 if (!b.isCollapsed() && areCoordinatesValid(minlat, minlon, maxlat, maxlon)) { 84 ds.addDataSource(new DataSource(b, header.getSource())); 85 } else { 86 Logging.error("Invalid Bounds: "+b); 87 } 77 double minlat = parseRawDegrees(bbox.getBottom()); 78 double minlon = parseRawDegrees(bbox.getLeft()); 79 double maxlat = parseRawDegrees(bbox.getTop()); 80 double maxlon = parseRawDegrees(bbox.getRight()); 81 Bounds b = new Bounds(minlat, minlon, maxlat, maxlon); 82 if (!b.isCollapsed() && areCoordinatesValid(minlat, minlon, maxlat, maxlon)) { 83 ds.addDataSource(new DataSource(b, header.getSource())); 84 } else { 85 Logging.error("Invalid Bounds: "+b); 88 86 } 89 87 } 90 88 }