[osmosis] 09/14: Add patch from upstream master branch: 0001-Increase-maximum-way-node-count-from-16-bit-to-32-bi.patch

Bas Couwenberg sebastic at xs4all.nl
Thu Apr 10 21:38:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository osmosis.

commit 11efeb2e09d316a5632eb2a32482f18e8d039230
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Apr 10 20:20:05 2014 +0200

    Add patch from upstream master branch: 0001-Increase-maximum-way-node-count-from-16-bit-to-32-bi.patch
---
 ...ximum-way-node-count-from-16-bit-to-32-bi.patch | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/debian/patches/0001-Increase-maximum-way-node-count-from-16-bit-to-32-bi.patch b/debian/patches/0001-Increase-maximum-way-node-count-from-16-bit-to-32-bi.patch
new file mode 100644
index 0000000..3106ced
--- /dev/null
+++ b/debian/patches/0001-Increase-maximum-way-node-count-from-16-bit-to-32-bi.patch
@@ -0,0 +1,40 @@
+From f786e62a549276cd1b0fce00d498a2210f8c4eec Mon Sep 17 00:00:00 2001
+From: Brett Henderson <brett at bretth.com>
+Date: Sat, 20 Jul 2013 11:39:57 +1000
+Subject: Increase maximum way node count from 16-bit to 32-bit
+Origin: https://github.com/openstreetmap/osmosis/commit/f786e62a549276cd1b0fce00d498a2210f8c4eec
+
+The Storeable implementation for Way was representing the number of way
+nodes as a Character.  This is sufficient for most purposes (ie. API
+data) but some third-party tools can create very long ways.  This size
+increase adds a small overhead to persistence, but should be largely
+unnoticeable.
+
+--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Way.java
++++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Way.java
+@@ -13,7 +13,6 @@ import org.openstreetmap.osmosis.core.do
+ import org.openstreetmap.osmosis.core.store.StoreClassRegister;
+ import org.openstreetmap.osmosis.core.store.StoreReader;
+ import org.openstreetmap.osmosis.core.store.StoreWriter;
+-import org.openstreetmap.osmosis.core.util.IntAsChar;
+ 
+ 
+ /**
+@@ -181,7 +180,7 @@ public class Way extends Entity implemen
+ 		
+ 		int featureCount;
+ 		
+-		featureCount = sr.readCharacter();
++		featureCount = sr.readInteger();
+ 		
+ 		wayNodes = new ArrayList<WayNode>();
+ 		for (int i = 0; i < featureCount; i++) {
+@@ -197,7 +196,7 @@ public class Way extends Entity implemen
+ 	public void store(StoreWriter sw, StoreClassRegister scr) {
+ 		super.store(sw, scr);
+ 		
+-		sw.writeCharacter(IntAsChar.intToChar(wayNodes.size()));
++		sw.writeInteger(wayNodes.size());
+ 		for (WayNode wayNode : wayNodes) {
+ 			wayNode.store(sw, scr);
+ 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmosis.git



More information about the Pkg-grass-devel mailing list