提交 e71dad1b authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Update JTS to version 1.15.0 from LocationTech

上级 ee756ecb
......@@ -74,9 +74,9 @@
<version>${osgi.version}</version>
</dependency>
<dependency>
<groupId>com.vividsolutions</groupId>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
<version>1.14.0</version>
<version>1.15.0</version>
</dependency>
<!-- END COMPILE DEPENDENCIES !-->
......
......@@ -2647,7 +2647,7 @@ ENUM('clubs', 'diamonds', 'hearts', 'spades')
"Data Types","GEOMETRY Type","
GEOMETRY
","
A spatial geometry type, based on the ""com.vividsolutions.jts"" library.
A spatial geometry type, based on the ""org.locationtech.jts"" library.
Normally represented in textual format using the WKT (well known text) format.
Use a quoted string containing a WKT formatted string or ""PreparedStatement.setObject()"" to store values,
......
......@@ -1433,16 +1433,16 @@ that means the probability is about 0.000'000'000'06.
<h2 id="spatial_features">Spatial Features</h2>
<p>
H2 supports the geometry data type and spatial indexes if
the <a href="http://tsusiatsoftware.net/jts/main.html">JTS Topology Suite</a>
the <a href="https://projects.eclipse.org/projects/locationtech.jts">JTS Topology Suite</a>
is in the classpath.
To run the H2 Console tool with the JTS tool, you need to download the
<a href="http://search.maven.org/remotecontent?filepath=com/vividsolutions/jts-core/1.14.0/jts-core-1.14.0.jar">JTS-CORE 1.14.0 jar file</a>
<a href="https://search.maven.org/remotecontent?filepath=org/locationtech/jts/jts-core/1.15.0/jts-core-1.15.0.jar">JTS-CORE 1.15.0 jar file</a>
and place it in the h2 bin directory. Then edit the <code>h2.sh</code> file as follows:
</p>
<pre>
#!/bin/sh
dir=$(dirname "$0")
java -cp "$dir/h2.jar:jts-core-1.14.0.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Console "$@"
java -cp "$dir/h2.jar:jts-core-1.15.0.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Console "$@"
</pre>
<p>
Here is an example SQL script to create a table with a spatial column and index:
......
......@@ -32,8 +32,7 @@ Import-Package: javax.management,
org.apache.lucene.search;version="[3.6.2,4.0.0)";resolution:=optional,
org.apache.lucene.store;version="[3.6.2,4.0.0)";resolution:=optional,
org.apache.lucene.util;version="[3.6.2,4.0.0)";resolution:=optional,
com.vividsolutions.jts.geom;version="1.14.0";resolution:=optional,
com.vividsolutions.jts.io;version="1.14.0";resolution:=optional,
org.locationtech.jts.geom;version="1.15.0";resolution:=optional,
org.h2;version="[${version},1.5.0)",
org.h2.api;version="[${version},1.5.0)",
org.h2.fulltext;version="[${version},1.5.0)",
......
......@@ -23,8 +23,8 @@ import org.h2.table.TableFilter;
import org.h2.value.Value;
import org.h2.value.ValueGeometry;
import org.h2.value.ValueNull;
import com.vividsolutions.jts.geom.Envelope;
import com.vividsolutions.jts.geom.Geometry;
import org.locationtech.jts.geom.Envelope;
import org.locationtech.jts.geom.Geometry;
/**
* This is an index based on a MVR-TreeMap.
......
......@@ -34,8 +34,8 @@ import org.h2.value.Value;
import org.h2.value.ValueGeometry;
import org.h2.value.ValueLong;
import org.h2.value.ValueNull;
import com.vividsolutions.jts.geom.Envelope;
import com.vividsolutions.jts.geom.Geometry;
import org.locationtech.jts.geom.Envelope;
import org.locationtech.jts.geom.Geometry;
/**
* This is an index based on a MVRTreeMap.
......
......@@ -60,7 +60,7 @@ public class DataType {
public static final Class<?> GEOMETRY_CLASS;
private static final String GEOMETRY_CLASS_NAME =
"com.vividsolutions.jts.geom.Geometry";
"org.locationtech.jts.geom.Geometry";
/**
* The list of types. An ArrayList so that Tomcat doesn't set it to null
......
......@@ -11,17 +11,17 @@ import java.util.Arrays;
import org.h2.engine.Mode;
import org.h2.message.DbException;
import org.h2.util.StringUtils;
import com.vividsolutions.jts.geom.CoordinateSequence;
import com.vividsolutions.jts.geom.CoordinateSequenceFilter;
import com.vividsolutions.jts.geom.Envelope;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.PrecisionModel;
import com.vividsolutions.jts.io.ParseException;
import com.vividsolutions.jts.io.WKBReader;
import com.vividsolutions.jts.io.WKBWriter;
import com.vividsolutions.jts.io.WKTReader;
import com.vividsolutions.jts.io.WKTWriter;
import org.locationtech.jts.geom.CoordinateSequence;
import org.locationtech.jts.geom.CoordinateSequenceFilter;
import org.locationtech.jts.geom.Envelope;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.PrecisionModel;
import org.locationtech.jts.io.ParseException;
import org.locationtech.jts.io.WKBReader;
import org.locationtech.jts.io.WKBWriter;
import org.locationtech.jts.io.WKTReader;
import org.locationtech.jts.io.WKTWriter;
/**
* Implementation of the GEOMETRY data type.
......@@ -66,7 +66,7 @@ public class ValueGeometry extends Value {
* Get or create a geometry value for the given geometry.
*
* @param o the geometry object (of type
* com.vividsolutions.jts.geom.Geometry)
* org.locationtech.jts.geom.Geometry)
* @return the value
*/
public static ValueGeometry getFromGeometry(Object o) {
......@@ -140,7 +140,7 @@ public class ValueGeometry extends Value {
* @return a copy of the geometry object
*/
public Geometry getGeometry() {
return (Geometry) getGeometryNoCopy().clone();
return getGeometryNoCopy().copy();
}
public Geometry getGeometryNoCopy() {
......
......@@ -19,15 +19,15 @@ import org.h2.tools.SimpleRowSource;
import org.h2.value.DataType;
import org.h2.value.Value;
import org.h2.value.ValueGeometry;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Envelope;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.Point;
import com.vividsolutions.jts.geom.Polygon;
import com.vividsolutions.jts.geom.util.AffineTransformation;
import com.vividsolutions.jts.io.ParseException;
import com.vividsolutions.jts.io.WKTReader;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Envelope;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.locationtech.jts.geom.util.AffineTransformation;
import org.locationtech.jts.io.ParseException;
import org.locationtech.jts.io.WKTReader;
/**
* Spatial datatype and index tests.
......
......@@ -188,7 +188,7 @@ public class Build extends BuildBase {
File.pathSeparator + "ext/h2mig_pagestore_addon.jar" +
File.pathSeparator + "ext/org.osgi.core-4.2.0.jar" +
File.pathSeparator + "ext/org.osgi.enterprise-4.2.0.jar" +
File.pathSeparator + "ext/jts-core-1.14.0.jar" +
File.pathSeparator + "ext/jts-core-1.15.0.jar" +
File.pathSeparator + "ext/slf4j-api-1.6.0.jar" +
File.pathSeparator + "ext/slf4j-nop-1.6.0.jar" +
File.pathSeparator + javaToolsJar;
......@@ -292,7 +292,7 @@ public class Build extends BuildBase {
File.pathSeparator + "ext/slf4j-api-1.6.0.jar" +
File.pathSeparator + "ext/org.osgi.core-4.2.0.jar" +
File.pathSeparator + "ext/org.osgi.enterprise-4.2.0.jar" +
File.pathSeparator + "ext/jts-core-1.14.0.jar" +
File.pathSeparator + "ext/jts-core-1.15.0.jar" +
File.pathSeparator + javaToolsJar;
FileList files;
if (clientOnly) {
......@@ -395,9 +395,9 @@ public class Build extends BuildBase {
downloadOrVerify("ext/org.osgi.enterprise-4.2.0.jar",
"org/osgi", "org.osgi.enterprise", "4.2.0",
"8634dcb0fc62196e820ed0f1062993c377f74972", offline);
downloadOrVerify("ext/jts-core-1.14.0.jar",
"com/vividsolutions", "jts-core", "1.14.0",
"ff63492fba33a395f0da17720dd1716aba0d8c84", offline);
downloadOrVerify("ext/jts-core-1.15.0.jar",
"org/locationtech/jts", "jts-core", "1.15.0",
"705981b7e25d05a76a3654e597dab6ba423eb79e", offline);
downloadOrVerify("ext/junit-4.12.jar",
"junit", "junit", "4.12",
"2973d150c0dc1fefe998f834810d68f278ea58ec", offline);
......@@ -691,7 +691,7 @@ public class Build extends BuildBase {
"org.h2.tools", "org.h2.api", "org.h2.engine", "org.h2.fulltext",
"-classpath",
"ext/lucene-core-3.6.2.jar" +
File.pathSeparator + "ext/jts-core-1.14.0.jar",
File.pathSeparator + "ext/jts-core-1.15.0.jar",
"-docletpath", "bin" + File.pathSeparator + "temp",
"-doclet", "org.h2.build.doclet.Doclet");
copy("docs/javadoc", files("src/docsrc/javadoc"), "src/docsrc/javadoc");
......@@ -717,7 +717,7 @@ public class Build extends BuildBase {
File.pathSeparator + "ext/lucene-core-3.6.2.jar" +
File.pathSeparator + "ext/org.osgi.core-4.2.0.jar" +
File.pathSeparator + "ext/org.osgi.enterprise-4.2.0.jar" +
File.pathSeparator + "ext/jts-core-1.14.0.jar",
File.pathSeparator + "ext/jts-core-1.15.0.jar",
"-subpackages", "org.h2",
"-exclude", "org.h2.test.jaqu:org.h2.jaqu");
......@@ -732,7 +732,7 @@ public class Build extends BuildBase {
File.pathSeparator + "ext/lucene-core-3.6.2.jar" +
File.pathSeparator + "ext/org.osgi.core-4.2.0.jar" +
File.pathSeparator + "ext/org.osgi.enterprise-4.2.0.jar" +
File.pathSeparator + "ext/jts-core-1.14.0.jar",
File.pathSeparator + "ext/jts-core-1.15.0.jar",
"-subpackages", "org.h2.mvstore",
"-exclude", "org.h2.mvstore.db");
......@@ -747,7 +747,7 @@ public class Build extends BuildBase {
File.pathSeparator + "ext/lucene-core-3.6.2.jar" +
File.pathSeparator + "ext/org.osgi.core-4.2.0.jar" +
File.pathSeparator + "ext/org.osgi.enterprise-4.2.0.jar" +
File.pathSeparator + "ext/jts-core-1.14.0.jar",
File.pathSeparator + "ext/jts-core-1.15.0.jar",
"-subpackages", "org.h2",
"-exclude", "org.h2.test.jaqu:org.h2.jaqu",
"-package",
......@@ -964,7 +964,7 @@ public class Build extends BuildBase {
javadoc("-sourcepath", "src/main", "org.h2.tools", "org.h2.jmx",
"-classpath",
"ext/lucene-core-3.6.2.jar" +
File.pathSeparator + "ext/jts-core-1.14.0.jar",
File.pathSeparator + "ext/jts-core-1.15.0.jar",
"-docletpath", "bin" + File.pathSeparator + "temp",
"-doclet", "org.h2.build.doclet.ResourceDoclet");
}
......@@ -1017,7 +1017,7 @@ public class Build extends BuildBase {
File.pathSeparator + "ext/h2mig_pagestore_addon.jar" +
File.pathSeparator + "ext/org.osgi.core-4.2.0.jar" +
File.pathSeparator + "ext/org.osgi.enterprise-4.2.0.jar" +
File.pathSeparator + "ext/jts-core-1.14.0.jar" +
File.pathSeparator + "ext/jts-core-1.15.0.jar" +
File.pathSeparator + "ext/slf4j-api-1.6.0.jar" +
File.pathSeparator + "ext/slf4j-nop-1.6.0.jar" +
File.pathSeparator + javaToolsJar;
......
......@@ -721,7 +721,7 @@ young younger youngest your yourself youtube ytd yuml yyfxyy yyyymmdd zeile zen
zepfred zero zeroes zeros zeta zhang zip ziv zloty zone zones zurich zwj zwnj
recompiled incl reveal designators templates invoked candidate handshake altered
accomplished permanent clarify weaken excl alternatively dita imjcc optimizes
dotall multiline xdoclint scenario
dotall multiline xdoclint scenario locationtech
stefan jobs defunct spain jconn decades chrono courtesy dtl xdg avp lifecycle
experiment throughout staging booth akkuzin observed maxinplace russian
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论