From fb7b698e0cf996bcb1a22226c81b9cef7f4121aa Mon Sep 17 00:00:00 2001 From: ?? ? <ulysseskao@ximple.com.tw> Date: Wed, 07 May 2008 14:44:53 +0800 Subject: [PATCH] update for EOFM-73 --- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/TPCLIDConverter.java | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/TPCLIDConverter.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/TPCLIDConverter.java index 4bbfd75..46a2cc1 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/TPCLIDConverter.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/TPCLIDConverter.java @@ -304,7 +304,7 @@ } tempString = tpclid.substring(0, 1); - int xmapid = Integer.parseInt(tpclid.substring(1, 2)); + int xmapid = Integer.parseInt(tpclid.substring(1, 3)); // Get the origin point point = getOriginPoint(tempString, xmapid); @@ -315,7 +315,7 @@ } - tempString = tpclid.substring(1, 4); + tempString = tpclid.substring(1, 5); width = SX1200; height = SY1200; @@ -328,7 +328,7 @@ if (tpclid.length() >= 7) { - tempString = (asciiToInt(tpclid.substring(5, 1)) - 65) + "" + (asciiToInt(tpclid.substring(6, 1)) - 65); + tempString = (asciiToInt(tpclid.substring(5, 6)) - 65) + "" + (asciiToInt(tpclid.substring(6, 7)) - 65); tempPoint = twoNumberScale(tempString, 100); if (tempPoint != null) { @@ -341,7 +341,7 @@ if (tpclid.length() >= 9) { - tempString = tpclid.substring(7, 2); + tempString = tpclid.substring(7, 8); tempPoint = twoNumberScale(tempString, 10); if (tempPoint != null) { @@ -354,7 +354,7 @@ if (tpclid.length() >= 11) { - tempString = tpclid.substring(9); + tempString = tpclid.substring(10); tempPoint = twoNumberScale(tempString, 1); if (tempPoint != null) { @@ -384,7 +384,7 @@ } tempString = tpclid.substring(0, 1); - int xmapid = Integer.parseInt(tpclid.substring(1, 2)); + int xmapid = Integer.parseInt(tpclid.substring(1, 3)); // Get the origin point point = getOriginPoint(tempString, xmapid); @@ -395,7 +395,7 @@ } - tempString = tpclid.substring(1, 4); + tempString = tpclid.substring(1, 5); tempPoint = twoNumberScale(tempString, 800, 500); if (tempPoint != null) @@ -406,7 +406,7 @@ if (tpclid.length() >= 7) { - tempString = (asciiToInt(tpclid.substring(5, 1)) - 65) + "" + (asciiToInt(tpclid.substring(6, 1)) - 65); + tempString = (asciiToInt(tpclid.substring(5, 6)) - 65) + "" + (asciiToInt(tpclid.substring(6, 7)) - 65); tempPoint = twoNumberScale(tempString, 100); if (tempPoint != null) { @@ -417,7 +417,7 @@ if (tpclid.length() >= 9) { - tempString = tpclid.substring(7, 2); + tempString = tpclid.substring(7, 9); tempPoint = twoNumberScale(tempString, 10); if (tempPoint != null) { @@ -428,7 +428,7 @@ if (tpclid.length() >= 11) { - tempString = tpclid.substring(9); + tempString = tpclid.substring(10); tempPoint = twoNumberScale(tempString, 1); if (tempPoint != null) { @@ -459,7 +459,7 @@ if (number.length() == 2) { tempPoint.x = Double.parseDouble(number.substring(0, 1)) * scaleX; - tempPoint.y = Double.parseDouble(number.substring(1, 1)) * scaleY; + tempPoint.y = Double.parseDouble(number.substring(1, 2)) * scaleY; } else if (number.length() == 1) { tempPoint.x = Double.parseDouble(number.substring(0, 1)) * scaleX; @@ -467,7 +467,7 @@ } else if (number.length() == 4) { tempPoint.x = Double.parseDouble(number.substring(0, 2)) * scaleX; - tempPoint.y = Double.parseDouble(number.substring(2, 2)) * scaleY; + tempPoint.y = Double.parseDouble(number.substring(2, 4)) * scaleY; } else { tempPoint.x = 0; -- Gitblit v0.0.0-SNAPSHOT