package com.ximple.eofms.util;
|
|
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Envelope;
|
|
/**
|
* Created by IntelliJ IDEA.
|
* User: Ulysses
|
* Date: 2007/6/15
|
* Time: 上午 01:20:20
|
* To change this template use File | Settings | File Templates.
|
*/
|
public final class GeomUtil
|
{
|
public static double convertLogicalValue(double value)
|
{
|
return value / 1000.0 + 2147483.648;
|
}
|
|
public static Coordinate convertLogicalCooridate(Coordinate value)
|
{
|
return new Coordinate(convertLogicalValue(value.x), convertLogicalValue(value.y), convertLogicalValue(value.z));
|
}
|
|
public static Envelope convertLogicalEnvelope(Envelope value)
|
{
|
return new Envelope(convertLogicalValue(value.getMinX()), convertLogicalValue(value.getMaxX()),
|
convertLogicalValue(value.getMinY()), convertLogicalValue(value.getMaxY()));
|
}
|
}
|