Bas Couwenberg pushed to branch upstream at Debian GIS Project / mkgmap


Commits:
b9c42c52 by Bas Couwenberg at 2021-09-01T05:45:04+02:00
New upstream version 0.0.0+svn4806
- - - - -


4 changed files:

- resources/mkgmap-version.properties
- src/uk/me/parabola/imgfmt/app/net/NOD1Part.java
- src/uk/me/parabola/mkgmap/main/MapMaker.java
- src/uk/me/parabola/mkgmap/reader/osm/POIGeneratorHook.java


Changes:

=====================================
resources/mkgmap-version.properties
=====================================
@@ -1,2 +1,2 @@
-svn.version: 4802
-build.timestamp: 2021-07-08T13:19:08+0100
+svn.version: 4806
+build.timestamp: 2021-08-10T09:45:55+0100


=====================================
src/uk/me/parabola/imgfmt/app/net/NOD1Part.java
=====================================
@@ -77,6 +77,11 @@ public class NOD1Part {
        private static final int MAX_TABB_UNSAFE = 0x100;
        private static final int MAX_TABB = MAX_TABB_UNSAFE - 0x2;
 
+       // Last entry in table C should not start at 0x8000 or higher, actual 
limit is unknown
+       private static final int MAX_TABC_OFFSET = 0x8000 - 1;
+       private int lastTabCOffset;
+       private int tabCSize;
+       
        // Nodes size is max 0x2000 to cope with signed 14 bit node offsets
        private static final int MAX_NODES_SIZE = 0x2000;
        private int nodesSize;
@@ -230,6 +235,8 @@ public class NOD1Part {
                }
                
                for (RouteRestriction rr: node.getRestrictions()){
+                       lastTabCOffset = tabCSize;
+                       tabCSize += rr.getSize();
                        List<RouteArc> arcs = rr.getArcs();
                        if (arcs.size() >= 3){
                                for (int i = 0; i < arcs.size(); i++){
@@ -309,11 +316,12 @@ public class NOD1Part {
        }
 
        private boolean satisfiesConstraints() {
-               log.debug("constraints:", bboxActual, tabA.size(), 
destNodes.size(), nodesSize);
+               log.debug("constraints:", bboxActual, tabA.size(), 
destNodes.size(), nodesSize, lastTabCOffset);
                return bboxActual.getMaxDimension() < MAX_SIZE
                        && tabA.size() < MAX_TABA
                        && destNodes.size() < MAX_TABB
-                       && nodesSize < MAX_NODES_SIZE;
+                       && nodesSize < MAX_NODES_SIZE
+                       && lastTabCOffset <= MAX_TABC_OFFSET;
        }
 
        /**


=====================================
src/uk/me/parabola/mkgmap/main/MapMaker.java
=====================================
@@ -69,7 +69,7 @@ public class MapMaker implements MapProcessor {
                        }
                        return makeMap(args, src, "");
                } catch (FormatException e) {
-                       Logger.defaultLogger.error("Bad file format: " + 
filename);
+                       Logger.defaultLogger.error("Bad file format: " + 
filename, e);
                        return filename;
                } catch (FileNotFoundException e) {
                        Logger.defaultLogger.error("Could not open file: " + 
filename);


=====================================
src/uk/me/parabola/mkgmap/reader/osm/POIGeneratorHook.java
=====================================
@@ -234,7 +234,7 @@ public class POIGeneratorHook implements OsmReadingHooks {
                for (int order = 0; order < poiPlacementTags.size(); order++) {
                        Entry<String,String> poiTagDef = 
poiPlacementTags.get(order);
                        String tagValue = elem.getTag(poiTagDef.getKey());
-                       if (tagValue != null && poiTagDef.getValue() == null || 
poiTagDef.getValue().equals(tagValue)) {
+                       if (tagValue != null && (poiTagDef.getValue() == null 
|| poiTagDef.getValue().equals(tagValue))) {
                                return order;
                        }
                }



View it on GitLab: 
https://salsa.debian.org/debian-gis-team/mkgmap/-/commit/b9c42c526293ab4b360a8d227b713663c5105485

-- 
View it on GitLab: 
https://salsa.debian.org/debian-gis-team/mkgmap/-/commit/b9c42c526293ab4b360a8d227b713663c5105485
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
Pkg-grass-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to