forked from geodmms/xdgnjobs

?? ?
2008-05-15 0acf7a49b2da4dd1873d64012ba360eaf51754f4
xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/LineElement.java
@@ -2,9 +2,13 @@
//~--- non-JDK imports --------------------------------------------------------
import org.apache.log4j.Logger;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.ximple.util.DgnUtility;
/**
 * LineElement
@@ -15,6 +19,8 @@
 */
public class LineElement extends Element implements GeometryConverter
{
    private static final Logger logger = Logger.getLogger(LineElement.class);
    public LineElement(byte[] raw)
    {
        super(raw);
@@ -31,8 +37,8 @@
        int endY = ((raw[24] << 16) & 0xffff0000) | (raw[25] & 0x0000ffff);
        double x = Utility.converUnitToCoord(endX);
        double y = Utility.converUnitToCoord(endY);
        double x = DgnUtility.converUnitToCoord(endX);
        double y = DgnUtility.converUnitToCoord(endY);
        return new Coordinate(x, y);
    }
@@ -52,12 +58,12 @@
        int startX = ((raw[18] << 16) & 0xffff0000);
        startX = startX + (raw[19] & 0x0000ffff);
        double x      = Utility.converUnitToCoord(startX);
        double x      = DgnUtility.converUnitToCoord(startX);
        int    startY = ((raw[20] << 16) & 0xffff0000);
        startY = startY + (raw[21] & 0x0000ffff);
        double y = Utility.converUnitToCoord(startY);
        double y = DgnUtility.converUnitToCoord(startY);
        return new Coordinate(x, y);
    }
@@ -74,7 +80,7 @@
        Coordinate p1 = getStartPoint();
        Coordinate p2 = getEndPoint();
        return Utility.getLength(p1.x, p1.y, p2.x, p2.y);
        return DgnUtility.getLength(p1.x, p1.y, p2.x, p2.y);
    }
    public Coordinate pointAtDistance(double dDistance, double dTolerance)