Index: jdbc2/todo.txt =================================================================== RCS file: /home/cvs/postgis/postgis/jdbc2/todo.txt,v retrieving revision 1.1 diff -u -r1.1 todo.txt --- jdbc2/todo.txt 19 Jan 2005 08:54:44 -0000 1.1 +++ jdbc2/todo.txt 28 Jan 2005 14:00:44 -0000 @@ -29,3 +29,6 @@ - Possibly relicensing under LGPL +- Possibly adding server side code to support plJava + http://gborg.postgresql.org/project/pljava/projdisplay.php + Index: jdbc2/src/org/postgis/Point.java =================================================================== RCS file: /home/cvs/postgis/postgis/jdbc2/src/org/postgis/Point.java,v retrieving revision 1.1 diff -u -r1.1 Point.java --- jdbc2/src/org/postgis/Point.java 19 Jan 2005 08:54:44 -0000 1.1 +++ jdbc2/src/org/postgis/Point.java 28 Jan 2005 14:00:44 -0000 @@ -6,6 +6,8 @@ public class Point extends Geometry { + public static final boolean CUTINTS=true; + public int hashCode() { return super.hashCode() ^ hashCode(x) ^ hashCode(y) ^ hashCode(z) ^ hashCode(m); } @@ -109,15 +111,26 @@ public void innerWKT(StringBuffer sb) { sb.append(x); + if (CUTINTS) cutint(sb); sb.append(' '); sb.append(y); + if (CUTINTS) cutint(sb); if (dimension == 3) { sb.append(' '); sb.append(z); + if (CUTINTS) cutint(sb); } if (haveMeasure) { sb.append(' '); sb.append(m); + if (CUTINTS) cutint(sb); + } + } + + private static void cutint(StringBuffer sb) { + int l = sb.length()-2; + if ((sb.charAt(l+1)=='0')&&(sb.charAt(l)=='.')) { + sb.setLength(l); } } Index: jdbc2/src/org/postgis/binary/ValueGetter.java =================================================================== RCS file: /home/cvs/postgis/postgis/jdbc2/src/org/postgis/binary/ValueGetter.java,v retrieving revision 1.1 diff -u -r1.1 ValueGetter.java --- jdbc2/src/org/postgis/binary/ValueGetter.java 19 Jan 2005 08:54:44 -0000 1.1 +++ jdbc2/src/org/postgis/binary/ValueGetter.java 28 Jan 2005 14:00:44 -0000 @@ -83,12 +83,7 @@ } protected int getInt(int index) { - int hg = data.get(index + 3); - int high = ((int) hg << 24); - int hmed = ((int) data.get(index + 2) << 16); - int lmed = ((int) data.get(index + 1) << 8); - int low = (int) data.get(index); - return high + hmed + lmed + low; + return (data.get(index + 3) << 24) + (data.get(index + 2) << 16) + (data.get(index + 1) << 8) + data.get(index); } protected long getLong(int index) {