/*
* The JTS Topology Suite is a collection of Java classes that
* implement the fundamental operations required to validate a given
* geo-spatial data set to a known topological specification.
*
* Copyright (C) 2001 Vivid Solutions
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, contact:
*
* Vivid Solutions
* Suite #1A
* 2328 Government Street
* Victoria BC V8T 5G5
* Canada
*
* (250)385-6040
* www.vividsolutions.com
*/
package com.vividsolutions.jts.geom;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import com.vividsolutions.jts.algorithm.*;
import com.vividsolutions.jts.io.WKTWriter;
import com.vividsolutions.jts.operation.buffer.BufferOp;
import com.vividsolutions.jts.operation.distance.DistanceOp;
import com.vividsolutions.jts.operation.overlay.OverlayOp;
import com.vividsolutions.jts.operation.predicate.RectangleIntersects;
import com.vividsolutions.jts.operation.predicate.RectangleContains;
import com.vividsolutions.jts.operation.relate.RelateOp;
import com.vividsolutions.jts.operation.valid.IsValidOp;
import com.vividsolutions.jts.util.Assert;
/**
* The base class for all geometric objects.
* <P>
*
* <H3>Binary Predicates</H3>
* Because it is not clear at this time
* what semantics for spatial
* analysis methods involving <code>GeometryCollection</code>s would be useful,
* <code>GeometryCollection</code>s are not supported as arguments to binary
* predicates (other than <code>convexHull</code>) or the <code>relate</code>
* method.
*
* <H3>Set-Theoretic Methods</H3>
*
* The spatial analysis methods will
* return the most specific class possible to represent the result. If the
* result is homogeneous, a <code>Point</code>, <code>LineString</code>, or
* <code>Polygon</code> will be returned if the result contains a single
* element; otherwise, a <code>MultiPoint</code>, <code>MultiLineString</code>,
* or <code>MultiPolygon</code> will be returned. If the result is
* heterogeneous a <code>GeometryCollection</code> will be returned. <P>
*
* Because it is not clear at this time what semantics for set-theoretic
* methods involving <code>GeometryCollection</code>s would be useful,
* <code>GeometryCollections</code>
* are not supported as arguments to the set-theoretic methods.
*
* <H4>Representation of Computed Geometries </H4>
*
* The SFS states that the result
* of a set-theoretic method is the "point-set" result of the usual
* set-theoretic definition of the operation (SFS 3.2.21.1). However, there are
* sometimes many ways of representing a point set as a <code>Geometry</code>.
* <P>
*
* The SFS does not specify an unambiguous representation of a given point set
* returned from a spatial analysis method. One goal of JTS is to make this
* specification precise and unambiguous. JTS will use a canonical form for
* <code>Geometry</code>s returned from spatial analysis methods. The canonical
* form is a <code>Geometry</code> which is simple and noded:
* <UL>
* <LI> Simple means that the Geometry returned will be simple according to
* the JTS definition of <code>isSimple</code>.
* <LI> Noded applies only to overlays involving <code>LineString</code>s. It
* means that all intersection points on <code>LineString</code>s will be
* present as endpoints of <code>LineString</code>s in the result.
* </UL>
* This definition implies that non-simple geometries which are arguments to
* spatial analysis methods must be subjected to a line-dissolve process to
* ensure that the results are simple.
*
* <H4> Constructed Points And The Precision Model </H4>
*
* The results computed by the set-theoretic methods may
* contain constructed points which are not present in the input <code>Geometry</code>
* s. These new points arise from intersections between line segments in the
* edges of the input <code>Geometry</code>s. In the general case it is not
* possible to represent constructed points exactly. This is due to the fact
* that the coordinates of an intersection point may contain twice as many bits
* of precision as the coordinates of the input line segments. In order to
* represent these constructed points explicitly, JTS must truncate them to fit
* the <code>PrecisionModel</code>. <P>
*
* Unfortunately, truncating coordinates moves them slightly. Line segments
* which would not be coincident in the exact result may become coincident in
* the truncated representation. This in turn leads to "topology collapses" --
* situations where a computed element has a lower dimension than it would in
* the exact result. <P>
*
* When JTS detects topology collapses during the computation of spatial
* analysis methods, it will throw an exception. If possible the exception will
* report the location of the collapse. <P>
*
* #equals(Object) and #hashCode are not overridden, so that when two
* topologically equal Geometries are added to HashMaps and HashSets, they
* remain distinct. This behaviour is desired in many cases.
*
*@version 1.7.2
*/
public abstract class Geometry
implements Cloneable, Comparable, Serializable
{
private static final long serialVersionUID = 8763622679187376702L;
/**
* The bounding box of this <code>Geometry</code>.
*/
protected Envelope envelope;
private final static Class[] sortedClasses = new Class[] {
Point.class,
MultiPoint.class,
LineString.class,
LinearRing.class,
MultiLineString.class,
Polygon.class,
MultiPolygon.class,
GeometryCollection.class
};
private final static GeometryComponentFilter geometryChangedFilter = new GeometryComponentFilter() {
public void filter(Geometry geom) {
geom.geometryChangedAction();
}
};
public Geometry(GeometryFactory factory) {
this.factory = factory;
this.SRID = factory.getSRID();
}
private GeometryFactory factory;
/**
* The ID of the Spatial Reference System used by this <code>Geometry</code>
*/
protected int SRID;
/**
* Returns the name of this object's <code>com.vivid.jts.geom</code>
* interface.
*
*@return the name of this <code>Geometry</code>s most specific <code>com.vividsolutions.jts.geom</code>
* interface
*/
//I wonder if we need this method, now that we have renamed the classes to
//what their old interfaces were named. Now we can perhaps simply use
//getClass().getName(). Who calls this method anyway? [Jon Aquino]
public abstract String getGeometryType();
/**
* Returns true if the array contains any non-empty <code>Geometry</code>s.
*
*@param geometries an array of <code>Geometry</code>s; no elements may be
* <code>null</code>
*@return <code>true</code> if any of the <code>Geometry</code>s
* <code>isEmpty</code> methods return <code>false</code>
*/
protected static boolean hasNonEmptyElements(Geometry[] geometries) {
for (int i = 0; i < geometries.length; i++) {
if (!geomet
没有合适的资源?快使用搜索试试~ 我知道了~
jts.rar_gis java
共636个文件
class:313个
java:268个
html:52个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 173 浏览量
2022-09-20
22:27:14
上传
评论
收藏 971KB RAR 举报
温馨提示
jts是GIS系统空间分析必需组件,这里提供的是其1.6开源版本,欢迎下载!
资源推荐
资源详情
资源评论
收起资源包目录
jts.rar_gis java (636个子文件)
Geometry.class 14KB
IsValidOp.class 12KB
WKTWriter.class 12KB
OverlayOp.class 11KB
GeometryFactory.class 11KB
GeometryGraph.class 10KB
LineSequencer.class 10KB
WKTReader.class 10KB
OffsetCurveBuilder.class 10KB
Polygon.class 10KB
PolygonizeGraph.class 10KB
DistanceOp.class 9KB
BufferBuilder.class 9KB
RelateComputer.class 9KB
LineString.class 8KB
DirectedEdgeStar.class 8KB
GeometryTransformer.class 8KB
WKBReader.class 8KB
AbstractSTRtree.class 8KB
Envelope.class 8KB
EdgeRing.class 8KB
Edge.class 7KB
PlanarGraph.class 7KB
OffsetCurveSetBuilder.class 7KB
LineSegment.class 7KB
ConvexHull.class 7KB
PolygonBuilder.class 7KB
GeometryCollection.class 7KB
RobustLineIntersector.class 7KB
ConnectedInteriorTester.class 7KB
WKBWriter.class 7KB
EdgeEndStar.class 6KB
BufferSubgraph.class 6KB
EdgeRing.class 6KB
Point.class 6KB
IntersectionMatrix.class 6KB
LineIntersector.class 6KB
SegmentNodeList.class 6KB
TaggedLineStringSimplifier.class 6KB
CGAlgorithms.class 6KB
DirectedEdge.class 6KB
Debug.class 6KB
STRtree.class 6KB
CoordinateArrays.class 6KB
SimpleSnapRounder.class 5KB
LineBuilder.class 5KB
BufferOp.class 5KB
NodingValidator.class 5KB
GeometryEditor.class 5KB
Polygonizer.class 5KB
LinearLocation.class 5KB
IsSimpleOp.class 5KB
GeometricShapeFactory.class 5KB
LineMerger.class 5KB
MCIndexSnapRounder.class 5KB
DirectedEdge.class 5KB
PrecisionModel.class 5KB
ExtractLineByLocation.class 5KB
MCPointInRing.class 5KB
SegmentIntersector.class 4KB
EdgeEnd.class 4KB
ExtendedCoordinateSequence.class 4KB
SimpleMCSweepLineIntersector.class 4KB
SubgraphDepthLocater.class 4KB
NodeBase.class 4KB
MonotoneChain.class 4KB
PointLocator.class 4KB
HotPixel.class 4KB
RightmostEdgeFinder.class 4KB
Label.class 4KB
SimpleSweepLineIntersector.class 4KB
PlanarGraph.class 4KB
MinimumDiameter.class 4KB
SweeplineNestedRingTester.class 4KB
DefaultCoordinateSequence.class 4KB
Node.class 4KB
EdgeEndBundle.class 4KB
CentroidArea.class 4KB
CoordinateArraySequence.class 4KB
SegmentString.class 4KB
EdgeIntersectionList.class 4KB
PrecisionModelExample.class 4KB
NonRobustLineIntersector.class 4KB
Node.class 4KB
MCIndexNoder.class 4KB
LengthIndexedLine.class 4KB
RelateNodeGraph.class 4KB
ClosestPointExample.class 4KB
TaggedLineString.class 4KB
MonotoneChainEdge.class 4KB
MultiLineString.class 3KB
IntersectionAdder.class 3KB
RectangleContains.class 3KB
LocationIndexedLine.class 3KB
TopologyLocation.class 3KB
LocationIndexOfPoint.class 3KB
InteriorPointArea.class 3KB
ScaledNoder.class 3KB
EdgeList.class 3KB
QuadtreeNestedRingTester.class 3KB
共 636 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
JaniceLu
- 粉丝: 79
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功