JTS Topology Suite

【主页】http://tsusiatsoftware.net/jts/main.html

【主页】http://sourceforge.net/projects/jts-topo-suite/

【API】http://tsusiatsoftware.net/jts/javadoc/index.html


主要类及其继承结构:



Coordinate类:

构造——

Coordinate()

         构造一个坐标 (0,0,NaN)。

Coordinate(Coordinate c)

         构造一个坐标,与坐标c具有相同的(x,y,z)值。

Coordinate(double x, double y)

         构造一个坐标 (x,y,NaN)。

Coordinate(double x, double y, double z)

         构造一个坐标 (x,y,z)。

方法——

double distance(Coordinate p)

          计算域另一个坐标p的二维欧氏距离。

boolean equals(java.lang.Object other)

         如果other具有相同的x,y坐标值,则返回true。

boolean  equals2D(Coordinate other)

         返回两个坐标的平面投影是否相等。

boolean equals3D(Coordinate other)

         如果other具有相同的x,y,z值,则返回true。

void    setCoordinate(Coordinate other)

         将坐标值(x,y,z) 设为与other相同的。

String   toString()

         返回字符串形式的 (x,y,z)。

CoordinateList类

坐标的列表,可以设置为不允许有重复坐标。

构造——

CoordinateList()

         创建一个列表,其中不含有任何坐标。

CoordinateList(Coordinate[] coord)

          从一个坐标数组构造出一个新的list,允许有重复点。

方法——

boolean add(Coordinate[] coord, boolean allowRepeated)

         将一个坐标数组添加到list。

boolean add(Coordinate[] coord, boolean allowRepeated, int start, int end)

         将坐标数组的一部分添加到list。

void    add(Coordinate coord, booleanallowRepeated)

         添加一个坐标到list的最末端。

void    closeRing()

         确保这个坐标列表是一个环,如果必要的话添加起点。

Coordinate    getCoordinate(int i)

Coordinate[]  toCoordinateArray()

             返回集合中的坐标。

Geometry类

构造——

Geometry(GeometryFactory factory)

         通过GeometryFactory创建一个新的Geometry。

方法——

Geometry buffer(double distance)

         根据给定的宽度创建该集合的缓冲区域。

boolean  contains(Geometry g)

         测试该集合是否包含了参数中的集合g。

boolean   coveredBy(Geometry g)

        测试该集合是否被参数中的集合g所覆盖。

boolean   covers(Geometry g)

        测试该集合是否覆盖了参数中的集合g。

double   getArea()

        返回该集合的面积。

Point    getCentroid()

        计算该集合的中心。

Coordinate[]  getCoordinates()

        返回一个数组,包含了该集合所有顶点的值。

int    getDimension()

        返回该集合的维度。

double  getLength()

        返回该集合的长度。

int   getNumGeometries()

        返回几何集中的几何数目(如果为1,则它不是一个几何集)。

int   getNumPoints()

        返回该集合的顶点个数。

PrecisionModel   getPrecisionModel()

        返回该几何所用的精度模型。

int   getSRID()

        返回该集合所用的空间参考系统的ID。

 

GeometryCollection类

构造——

GeometryCollection(Geometry[] geometries,GeometryFactory factory)

GeometryCollection(Geometry[] geometries,PrecisionModel precisionModel, int SRID)

 

GeometryFactory类

构造——

GeometryFactory()

         构造一个GeometryFactory,管理具有浮点精度的精度模型和空间参考ID为0的几何。

GeometryFactory(CoordinateSequenceFactory  coordinateSequenceFactory)

GeometryFactory(PrecisionModelprecisionModel)

GeometryFactory(PrecisionModelprecisionModel, int SRID)

GeometryFactory(PrecisionModelprecisionModel, int SRID, CoordinateSequenceFactory  coordinateSequenceFactory)

 

方法——

Geometry  buildGeometry(java.util.Collection geomList)

         建立一个Geometry, MultiGeometry, or GeometryCollection来盛几何。

Geometry  createGeometry(Geometry g)

GeometryCollection         createGeometryCollection(Geometry[] geometries)

LinearRing        createLinearRing(Coordinate[]coordinates)



你可能感兴趣的:(JTS Topology Suite)