Ticket #19972: 19972-with-mkgmap-jars.patch

File 19972-with-mkgmap-jars.patch, 6.2 KB (added by GerdP, 4 years ago)
  • .classpath

     
    11<?xml version="1.0" encoding="UTF-8"?>
    22<classpath>
    3         <classpathentry kind="src" path="gen"/>
    4         <classpathentry excluding="crosby/binary/test/" kind="src" path="src"/>
     3        <classpathentry kind="src" path="src"/>
    54        <classpathentry kind="src" output="buildtest" path="test/unit">
    65                <attributes>
    76                        <attribute name="test" value="true"/>
     
    1110        <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
    1211        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
    1312        <classpathentry kind="output" path="build"/>
     13        <classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?project=pbf&amp;ivyXmlPath=ivy.xml&amp;confs=*&amp;ivySettingsPath=ivy_settings.xml&amp;loadSettingsOnDemand=false&amp;ivyUserDir=&amp;propertyFiles="/>
    1414</classpath>
  • .project

     
    2626                <nature>org.sonar.ide.eclipse.core.sonarNature</nature>
    2727                <nature>org.eclipse.jdt.core.javanature</nature>
    2828                <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
     29                <nature>org.apache.ivyde.eclipse.ivynature</nature>
    2930        </natures>
    3031</projectDescription>
  • ivy.xml

     
    11<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>
    628</ivy-module>
  • ivy_settings.xml

     
    1 <?xml version="1.0" encoding="utf-8"?>
    21<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
    726</ivysettings>
  • src/org/openstreetmap/josm/plugins/pbf/io/PbfReader.java

     
    7474
    7575            if (header.hasBbox()) {
    7676                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);
    8886                }
    8987            }
    9088        }