Skip to content

Commit

Permalink
Merge branch 'alticelabs-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
maesenka committed Feb 3, 2021
2 parents c5c2fdd + ae6325a commit f800583
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion geom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
<version>1.16.0</version>
<version>${jts-core.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
17 changes: 16 additions & 1 deletion geom/src/main/java/org/geolatte/geom/jts/JTS.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@

package org.geolatte.geom.jts;

import org.locationtech.jts.geom.*;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.CoordinateSequence;
import org.locationtech.jts.geom.CoordinateXYM;
import org.locationtech.jts.geom.CoordinateXYZM;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryCollection;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.LinearRing;
import org.locationtech.jts.geom.MultiLineString;
import org.locationtech.jts.geom.MultiPoint;
import org.locationtech.jts.geom.MultiPolygon;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.locationtech.jts.geom.PrecisionModel;
import org.geolatte.geom.*;
import org.geolatte.geom.crs.*;

Expand Down Expand Up @@ -354,6 +359,16 @@ private static <P extends Position> org.geolatte.geom.LineString<P> from(LineStr

}

/*
* Converts a jts linearRing into a geolatte linearRing
*/
private static <P extends Position> org.geolatte.geom.LinearRing<P> from(LinearRing jtsLinearRing,
CoordinateReferenceSystem<P> crs) {
CoordinateSequence cs = jtsLinearRing.getCoordinateSequence();
return new org.geolatte.geom.LinearRing<P>(pscsFactory.toPositionSequence(cs, crs.getPositionClass(), crs),
crs);
}

/*
* Converts a jts multipoint into a geolatte multipoint
*/
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<revision>1.7.0-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jts-core.version>[1.17.0, 1.18.0)</jts-core.version>
</properties>

<licenses>
Expand Down

0 comments on commit f800583

Please sign in to comment.