Skip to content

Commit

Permalink
New additions to adjust the correct library set to JDK 15/Eclipse 4.17
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed Nov 29, 2020
1 parent 84a8e87 commit b503c8c
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion msi.gama.core/src/msi/gama/util/file/GamaGisFile.java
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 = p.getInteriorRingN(j);
final LinearRing h = (LinearRing) p.getInteriorRingN(j);
if (!hasNullElements(h.getCoordinates())) {
holes.add(h);
}
Expand Down
2 changes: 1 addition & 1 deletion msi.gama.core/src/msi/gaml/operators/Spatial.java
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] = ((Polygon) geometry).getInteriorRingN(i);
lrs[i] = (LinearRing) ((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
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 = p.getInteriorRingN(i);
final LinearRing hole = (LinearRing) 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(p.getExteriorRing(), holes); }
if (change) { return geomFact.createPolygon((LinearRing) p.getExteriorRing(), holes); }
} else if (g instanceof GeometryCollection) {
final GeometryCollection gc = (GeometryCollection) g;
boolean change = false;
Expand Down
3 changes: 1 addition & 2 deletions msi.gama.ext/.classpath
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="jts-1.16.1/jts-core-1.16.1.jar"/>
<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"/>
Expand All @@ -14,8 +15,6 @@
<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="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"/>
<classpathentry exported="true" kind="lib" path="geotools 21.4/commons-collections-3.2.2.jar"/>
<classpathentry exported="true" kind="lib" path="geotools 21.4/commons-dbcp-1.4.jar"/>
Expand Down
8 changes: 2 additions & 6 deletions msi.gama.ext/META-INF/MANIFEST.MF
Expand Up @@ -471,7 +471,6 @@ Export-Package: com.fasterxml.jackson.core,
org.kabeja.parser.table",
org.locationtech.jts,
org.locationtech.jts.algorithm;uses:="org.locationtech.jts.index.chain,org.locationtech.jts.geom,org.locationtech.jts.math",
org.locationtech.jts.algorithm.construct,
org.locationtech.jts.algorithm.distance;uses:="org.locationtech.jts.geom",
org.locationtech.jts.algorithm.locate,
org.locationtech.jts.algorithm.match,
Expand All @@ -488,14 +487,12 @@ Export-Package: com.fasterxml.jackson.core,
org.locationtech.jts.index,
org.locationtech.jts.index.bintree,
org.locationtech.jts.index.chain,
org.locationtech.jts.index.hprtree,
org.locationtech.jts.index.intervalrtree,
org.locationtech.jts.index.kdtree,
org.locationtech.jts.index.quadtree;uses:="org.locationtech.jts.geom,org.locationtech.jts.index",
org.locationtech.jts.index.strtree,
org.locationtech.jts.index.sweepline,
org.locationtech.jts.io;uses:="org.locationtech.jts.geom",
org.locationtech.jts.io.geojson,
org.locationtech.jts.io.gml2,
org.locationtech.jts.io.kml,
org.locationtech.jts.linearref,
Expand Down Expand Up @@ -616,8 +613,6 @@ Bundle-ClassPath: .,
kml/jars/jaxb-api.jar,
kml/jars/jaxb-core.jar,
jfreechart-1.5.0.jar,
jts-1.17.1/jts-core-1.17.1.jar,
jts-1.17.1/jts-io-common-1.17.1.jar,
geotools 21.4/batik-transcoder-1.10.jar,
geotools 21.4/commons-collections-3.2.2.jar,
geotools 21.4/commons-dbcp-1.4.jar,
Expand Down Expand Up @@ -716,6 +711,7 @@ Bundle-ClassPath: .,
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
geotools 21.4/ejml-core-0.34.jar,
jts-1.16.1/jts-core-1.16.1.jar
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: msi.gama.ext
5 changes: 2 additions & 3 deletions msi.gama.ext/build.properties
Expand Up @@ -100,8 +100,6 @@ bin.includes = .,\
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,\
jts-1.17.1/jts-core-1.17.1.jar,\
jts-1.17.1/jts-io-common-1.17.1.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,\
Expand All @@ -115,7 +113,8 @@ bin.includes = .,\
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
geotools 21.4/ejml-core-0.34.jar,\
jts-1.16.1/jts-core-1.16.1.jar
source.. = src/
output.. = bin/
bin.excludes = jgrapht 1.0.1/src.zip,\
Expand Down
Binary file added msi.gama.ext/geotools 21.4/jts-core-1.16.0.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed msi.gama.ext/jts-1.17.1/jts-core-1.17.1-sources.jar
Binary file not shown.
Binary file not shown.
Binary file removed msi.gama.ext/jts-1.17.1/jts-io-common-1.17.1.jar
Binary file not shown.
Expand Up @@ -282,7 +282,7 @@ experiment Run type: gui {
parameter "Height of the dykes" var:dyke_height category:"Obstacles";
parameter "Diffusion rate" var:diffusion_rate category:"Water dynamic";
output {
layout vertical([0::5000,1::5000]) tabs:false editors: false;
//layout vertical([0::5000,1::5000]) tabs:false editors: false;
display map type: opengl {
grid cell triangulation: true;
species buildings aspect: geometry refresh: false;
Expand Down
Expand Up @@ -191,7 +191,7 @@ experiment road_traffic_multi_layer type: gui
};
output
{
display city_display type: opengl
display city_display type: java2D
{
species road aspect: base;
species building aspect: base position: { 0, 0, 0.25 };
Expand Down
Expand Up @@ -202,8 +202,8 @@ public void display(final GLAutoDrawable drawable) {
public void reshape(final GLAutoDrawable drawable, final int arg1, final int arg2, final int w, final int h) {
int width = w, height = h;
// See #2628 and https://github.com/sgothel/jogl/commit/ca7f0fb61b0a608b6e684a5bbde71f6ecb6e3fe0
width = scaleDownIfMac(width);
height = scaleDownIfMac(height);
//width = scaleDownIfMac(width);
//height = scaleDownIfMac(height);
if (width <= 0 || height <= 0) { return; }
if (openGL.getViewWidth() == width && openGL.getViewHeight() == height) { return; }
// DEBUG.OUT("Reshaped to " + width + " x " + height);
Expand Down

0 comments on commit b503c8c

Please sign in to comment.