Skip to content

Commit

Permalink
Addition of several libraries to satisfy the dependencies of GeoTools
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed Nov 28, 2020
1 parent 4d1dddf commit 84a8e87
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 29 deletions.
4 changes: 2 additions & 2 deletions msi.gama.core/src/msi/gama/util/file/GamaGisFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected Geometry multiPolygonManagement(final Geometry geom) {
final LinearRing lr = GEOMETRY_FACTORY.createLinearRing(coords.toCoordinateArray());
try (final Collector.AsList<LinearRing> holes = Collector.getList()) {
for (int j = 0; j < p.getNumInteriorRing(); j++) {
final LinearRing h = (LinearRing) p.getInteriorRingN(j);
final LinearRing h = p.getInteriorRingN(j);
if (!hasNullElements(h.getCoordinates())) {
holes.add(h);
}
Expand All @@ -131,7 +131,7 @@ protected Geometry multiPolygonManagement(final Geometry geom) {
protected static boolean hasNullElements(final Object[] array) {
for (final Object element : array) {
if (element == null) {
return true;
return true;
}
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion msi.gama.core/src/msi/gaml/operators/Spatial.java
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ private static Geometry createPolygonWithPoint(final Geometry geometry, final Co
}
final LinearRing[] lrs = new LinearRing[((Polygon) geometry).getNumInteriorRing()];
for (int i = 0; i < lrs.length; i++) {
lrs[i] = (LinearRing) ((Polygon) geometry).getInteriorRingN(i);
lrs[i] = ((Polygon) geometry).getInteriorRingN(i);
}
final Geometry g = GeometryUtils.GEOMETRY_FACTORY
.createPolygon(GeometryUtils.GEOMETRY_FACTORY.createLinearRing(coord), lrs);
Expand Down
4 changes: 2 additions & 2 deletions msi.gama.core/src/msi/gaml/statements/SaveStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ private static Geometry fixesPolygonCWS(final Geometry g) {
final LinearRing[] holes = new LinearRing[p.getNumInteriorRing()];
final GeometryFactory geomFact = new GeometryFactory();
for (int i = 0; i < p.getNumInteriorRing(); i++) {
final LinearRing hole = (LinearRing) p.getInteriorRingN(i);
final LinearRing hole = p.getInteriorRingN(i);
if (!clockwise && !CGAlgorithms.isCCW(hole.getCoordinates())
|| clockwise && CGAlgorithms.isCCW(hole.getCoordinates())) {
change = true;
Expand All @@ -909,7 +909,7 @@ private static Geometry fixesPolygonCWS(final Geometry g) {
holes[i] = hole;
}
}
if (change) { return geomFact.createPolygon((LinearRing) p.getExteriorRing(), holes); }
if (change) { return geomFact.createPolygon(p.getExteriorRing(), holes); }
} else if (g instanceof GeometryCollection) {
final GeometryCollection gc = (GeometryCollection) g;
boolean change = false;
Expand Down
16 changes: 10 additions & 6 deletions msi.gama.ext/.classpath
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="geotools 21.4/ejml-core-0.34.jar"/>
<classpathentry exported="true" kind="lib" path="geotools 21.4/jackson-core-2.9.10.jar"/>
<classpathentry exported="true" kind="lib" path="commons-lang3-3.11/commons-lang3-3.11.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/si-quantity-0.7.1.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/si-units-java8-0.7.1.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/systems-common-java8-0.7.2.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/systems-quantity-0.7.2.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/unit-api-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/uom-lib-common-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/uom-se-1.0.8.jar"/>
<classpathentry exported="true" kind="lib" path="geotools 21.4/gt-xsd-gml3-21.4.jar"/>
<classpathentry exported="true" kind="lib" path="geotools 21.4/gt-xsd-wfs-21.4.jar"/>
<classpathentry exported="true" kind="lib" path="geotools 21.4/gt-xsd-gml2-21.4.jar"/>
<classpathentry exported="true" kind="lib" path="streamex 0.6.7/streamex-0.6.8.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/si-quantity-2.0.1.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/si-units-java8-1.3.1.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/systems-common-java8-1.3.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/unit-api-2.1.1.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/uom-lib-common-1.0.3.jar"/>
<classpathentry exported="true" kind="lib" path="jsr 363/uom-se-1.0.10.jar"/>
<classpathentry exported="true" kind="lib" path="jts-1.17.1/jts-core-1.17.1.jar"/>
<classpathentry exported="true" kind="lib" path="jts-1.17.1/jts-io-common-1.17.1.jar"/>
<classpathentry exported="true" kind="lib" path="geotools 21.4/batik-transcoder-1.10.jar"/>
Expand Down
83 changes: 75 additions & 8 deletions msi.gama.ext/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ Bundle-Version: 1.8.1.qualifier
Bundle-Activator: msi.gama.ext.Activator
Bundle-Vendor: MSI
Bundle-ActivationPolicy: lazy
Export-Package: com.google.protobuf,
Export-Package: com.fasterxml.jackson.core,
com.fasterxml.jackson.core.async,
com.fasterxml.jackson.core.base,
com.fasterxml.jackson.core.filter,
com.fasterxml.jackson.core.format,
com.fasterxml.jackson.core.io,
com.fasterxml.jackson.core.json,
com.fasterxml.jackson.core.json.async,
com.fasterxml.jackson.core.sym,
com.fasterxml.jackson.core.type,
com.fasterxml.jackson.core.util,
com.google.protobuf,
com.google.protobuf.compiler,
com.mysql.jdbc,
com.mysql.jdbc.exceptions,
Expand Down Expand Up @@ -141,6 +152,23 @@ Export-Package: com.google.protobuf,
org.apache.commons.dbcp.cpdsadapter,
org.apache.commons.dbcp.datasources,
org.apache.commons.dbcp.managed,
org.apache.commons.lang3,
org.apache.commons.lang3.arch,
org.apache.commons.lang3.builder,
org.apache.commons.lang3.compare,
org.apache.commons.lang3.concurrent,
org.apache.commons.lang3.concurrent.locks,
org.apache.commons.lang3.event,
org.apache.commons.lang3.exception,
org.apache.commons.lang3.function,
org.apache.commons.lang3.math,
org.apache.commons.lang3.mutable,
org.apache.commons.lang3.reflect,
org.apache.commons.lang3.stream,
org.apache.commons.lang3.text,
org.apache.commons.lang3.text.translate,
org.apache.commons.lang3.time,
org.apache.commons.lang3.tuple,
org.apache.commons.math3.distribution,
org.apache.commons.math3.exception;uses:="org.apache.commons.math3.exception.util,org.apache.commons.math3.util",
org.apache.commons.math3.geometry.euclidean.threed,
Expand Down Expand Up @@ -172,6 +200,41 @@ Export-Package: com.google.protobuf,
org.apache.commons.math3.stat.descriptive.moment,
org.apache.commons.math3.stat.regression;uses:="org.apache.commons.math3.exception.util,org.apache.commons.math3.exception,org.apache.commons.math3.linear",
org.apache.commons.math3.util;uses:="org.apache.commons.math3,org.apache.commons.math3.exception.util,new org.apache.commons.math3.util",
org.ejml,
org.ejml.data,
org.ejml.dense.block,
org.ejml.dense.block.decomposition.bidiagonal,
org.ejml.dense.block.decomposition.chol,
org.ejml.dense.block.decomposition.hessenberg,
org.ejml.dense.block.decomposition.qr,
org.ejml.dense.block.linsol.chol,
org.ejml.dense.block.linsol.qr,
org.ejml.dense.fixed,
org.ejml.dense.row,
org.ejml.dense.row.decomposition,
org.ejml.dense.row.decomposition.bidiagonal,
org.ejml.dense.row.decomposition.chol,
org.ejml.dense.row.decomposition.eig,
org.ejml.dense.row.decomposition.eig.symm,
org.ejml.dense.row.decomposition.eig.watched,
org.ejml.dense.row.decomposition.hessenberg,
org.ejml.dense.row.decomposition.lu,
org.ejml.dense.row.decomposition.qr,
org.ejml.dense.row.decomposition.svd,
org.ejml.dense.row.decomposition.svd.implicitqr,
org.ejml.dense.row.factory,
org.ejml.dense.row.linsol,
org.ejml.dense.row.linsol.chol,
org.ejml.dense.row.linsol.lu,
org.ejml.dense.row.linsol.qr,
org.ejml.dense.row.linsol.svd,
org.ejml.dense.row.misc,
org.ejml.dense.row.mult,
org.ejml.generic,
org.ejml.interfaces,
org.ejml.interfaces.decomposition,
org.ejml.interfaces.linsol,
org.ejml.ops,
org.geotools.brewer.color,
org.geotools.console,
org.geotools.coverage,
Expand Down Expand Up @@ -640,15 +703,19 @@ Bundle-ClassPath: .,
geotools 21.4/mysql-connector-java-5.1.46.jar,
geotools 21.4/postgresql-42.2.5.jar,
geotools 21.4/sqlite-jdbc-3.27.2.1.jar,
jsr 363/si-quantity-2.0.1.jar,
jsr 363/si-units-java8-1.3.1.jar,
jsr 363/systems-common-java8-1.3.jar,
jsr 363/unit-api-2.1.1.jar,
jsr 363/uom-lib-common-1.0.3.jar,
jsr 363/uom-se-1.0.10.jar,
streamex 0.6.7/streamex-0.6.8.jar,
geotools 21.4/gt-xsd-gml2-21.4.jar,
geotools 21.4/gt-xsd-gml3-21.4.jar,
geotools 21.4/gt-xsd-wfs-21.4.jar
geotools 21.4/gt-xsd-wfs-21.4.jar,
jsr 363/uom-se-1.0.8.jar,
jsr 363/si-quantity-0.7.1.jar,
jsr 363/si-units-java8-0.7.1.jar,
jsr 363/systems-common-java8-0.7.2.jar,
jsr 363/systems-quantity-0.7.2.jar,
jsr 363/unit-api-1.0.jar,
jsr 363/uom-lib-common-1.0.2.jar,
commons-lang3-3.11/commons-lang3-3.11.jar,
geotools 21.4/jackson-core-2.9.10.jar,
geotools 21.4/ejml-core-0.34.jar
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: msi.gama.ext
18 changes: 11 additions & 7 deletions msi.gama.ext/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,20 @@ bin.includes = .,\
geotools 21.4/sqlite-jdbc-3.27.2.1.jar,\
jts-1.17.1/jts-core-1.17.1.jar,\
jts-1.17.1/jts-io-common-1.17.1.jar,\
jsr 363/si-quantity-2.0.1.jar,\
jsr 363/si-units-java8-1.3.1.jar,\
jsr 363/systems-common-java8-1.3.jar,\
jsr 363/unit-api-2.1.1.jar,\
jsr 363/uom-lib-common-1.0.3.jar,\
jsr 363/uom-se-1.0.10.jar,\
streamex 0.6.7/streamex-0.6.8.jar,\
geotools 21.4/gt-xsd-gml2-21.4.jar,\
geotools 21.4/gt-xsd-gml3-21.4.jar,\
geotools 21.4/gt-xsd-wfs-21.4.jar
geotools 21.4/gt-xsd-wfs-21.4.jar,\
jsr 363/uom-se-1.0.8.jar,\
jsr 363/si-quantity-0.7.1.jar,\
jsr 363/si-units-java8-0.7.1.jar,\
jsr 363/systems-common-java8-0.7.2.jar,\
jsr 363/systems-quantity-0.7.2.jar,\
jsr 363/unit-api-1.0.jar,\
jsr 363/uom-lib-common-1.0.2.jar,\
commons-lang3-3.11/commons-lang3-3.11.jar,\
geotools 21.4/jackson-core-2.9.10.jar,\
geotools 21.4/ejml-core-0.34.jar
source.. = src/
output.. = bin/
bin.excludes = jgrapht 1.0.1/src.zip,\
Expand Down
Binary file not shown.
Binary file added msi.gama.ext/geotools 21.4/ejml-core-0.34.jar
Binary file not shown.
Binary file not shown.
Binary file added msi.gama.ext/jsr 363/si-quantity-0.7.1.jar
Binary file not shown.
Binary file added msi.gama.ext/jsr 363/si-units-java8-0.7.1.jar
Binary file not shown.
Binary file not shown.
Binary file added msi.gama.ext/jsr 363/systems-quantity-0.7.2.jar
Binary file not shown.
Binary file added msi.gama.ext/jsr 363/unit-api-1.0.jar
Binary file not shown.
Binary file added msi.gama.ext/jsr 363/uom-lib-common-1.0.2.jar
Binary file not shown.
Binary file added msi.gama.ext/jsr 363/uom-se-1.0.8.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public double getEnvHeight() {

@Override
public double getDisplayWidth() {
return (double) viewPort.width;
return viewPort.width;
}

protected void setDisplayWidth(final int displayWidth) {
Expand All @@ -516,7 +516,7 @@ public LayeredDisplayData getData() {

@Override
public double getDisplayHeight() {
return (double) viewPort.height;
return viewPort.height;
}

protected void setDisplayHeight(final int displayHeight) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class GeometryCache {
.010718, .04, .018716, .028577, .028577, .018716, .04, .010718, .052638, .004825, .066108, .001215, .08,
0 };

static DoubleBuffer db = (DoubleBuffer) Buffers.newDirectDoubleBuffer(roundRect.length).put(roundRect).rewind();
static DoubleBuffer db = Buffers.newDirectDoubleBuffer(roundRect.length).put(roundRect).rewind();

public static class BuiltInGeometry {
Integer bottom, top, faces;
Expand Down

0 comments on commit 84a8e87

Please sign in to comment.