Skip to content

Commit

Permalink
Bump org.locationtech.jts:jts-core from 1.19.0 to 1.20.0 (#1005)
Browse files Browse the repository at this point in the history
* Bump org.locationtech.jts:jts-core from 1.19.0 to 1.20.0

Bumps org.locationtech.jts:jts-core from 1.19.0 to 1.20.0.

---
updated-dependencies:
- dependency-name: org.locationtech.jts:jts-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* jts fixes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mike Barry <[email protected]>
  • Loading branch information
dependabot[bot] and msbarry authored Aug 30, 2024
1 parent 3225999 commit af6ceb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -626,13 +626,13 @@ void testExtractConnectedComponents() {
@ParameterizedTest
@CsvSource({
"bostonbuildings.mbtiles, 2477, 3028, 13, 1141",
"bostonbuildings.mbtiles, 2481, 3026, 13, 948",
"bostonbuildings.mbtiles, 2481, 3026, 13, 949",
"bostonbuildings.mbtiles, 2479, 3028, 13, 1074",
"jakartabuildings.mbtiles, 6527, 4240, 13, 410"
})
void testMergeManyPolygons__TAKES_A_MINUTE_OR_TWO(String file, int x, int y, int z, int expected)
throws IOException, GeometryException {
LOGGER.warn("Testing complex polygon merging for " + file + " " + z + "/" + x + "/" + y + " ...");
LOGGER.warn("Testing complex polygon merging for {} {}/{}/{} ...", file, z, x, y);
try (var db = Mbtiles.newReadOnlyDatabase(TestUtils.pathToResource(file))) {
byte[] tileData = db.getTile(x, y, z);
byte[] gunzipped = gunzip(tileData);
Expand Down Expand Up @@ -776,7 +776,7 @@ <S extends Geometry, M extends GeometryCollection> void testMultigeometryMerger(
}

@Test
void removePointsOutsideBufferEmpty() throws GeometryException {
void removePointsOutsideBufferEmpty() {
assertEquals(
List.of(),
FeatureMerge.removePointsOutsideBuffer(List.of(), 4d)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ void testSnapAndFixIssue511() throws ParseException, GeometryException {
MULTIPOLYGON (((198.83750000000003 46.07500000000004, 199.0625 46.375, 199.4375 46.0625, 199.5 46.43750000000001, 199.5625 46, 199.3125 45.5, 198.8912037037037 46.101851851851876, 198.83750000000003 46.07500000000004)), ((198.43750000000003 46.49999999999999, 198.5625 46.43750000000001, 198.6875 46.25, 198.1875 46.25, 198.43750000000003 46.49999999999999)), ((198.6875 46.25, 198.81249999999997 46.062500000000014, 198.6875 46.00000000000002, 198.6875 46.25)), ((196.55199579831933 46.29359243697479, 196.52255639097743 46.941259398496236, 196.5225563909774 46.941259398496236, 196.49999999999997 47.43750000000001, 196.875 47.125, 197 47.5625, 197.47880544905414 46.97729334004497, 197.51505401161464 46.998359569801956, 197.25 47.6875, 198.0625 47.6875, 198.5 46.625, 198.34375 46.546875, 198.34375000000003 46.54687499999999, 197.875 46.3125, 197.875 46.25, 197.875 46.0625, 197.82894736842107 46.20065789473683, 197.25 46.56250000000001, 197.3125 46.125, 196.9375 46.1875, 196.9375 46.21527777777778, 196.73250000000002 46.26083333333334, 196.5625 46.0625, 196.55199579831933 46.29359243697479)), ((196.35213414634146 45.8170731707317, 197.3402027027027 45.93108108108108, 197.875 45.99278846153846, 197.875 45.93750000000002, 197.93749999999997 45.99999999999999, 197.9375 46, 197.90625 45.96874999999999, 197.90625 45.96875, 196.75000000000006 44.81250000000007, 197.1875 45.4375, 196.3125 45.8125, 196.35213414634146 45.8170731707317)), ((195.875 46.124999999999986, 195.8125 46.5625, 196.5 46.31250000000001, 195.9375 46.4375, 195.875 46.124999999999986)), ((196.49999999999997 46.93749999999999, 196.125 46.875, 196.3125 47.125, 196.49999999999997 46.93749999999999)))
"""),
Stats.inMemory(), "test");
assertEquals(3.146484375, result.getArea(), 1e-5);
assertTrue(result.isValid());
assertEquals(3.083984375, result.getArea(), 1e-5);
}

@Test
Expand Down Expand Up @@ -421,33 +422,6 @@ void testSnapAndFixIssue546_2() throws GeometryException, ParseException {
assertFalse(Orientation.isCCWArea(result.getCoordinates()));
}

@Test
void testSnapAndFixIssue546_3() throws GeometryException, ParseException {
var orig = new WKTReader().read(
"""
POLYGON(
(
0 0,
2 0,
2 1,
0 1,
0 0
),
(
1.19053596444428 0.9029693332377,
1.06439281777784 0.92184484124482,
1.42787640888855 0.8257737683016,
0.94579086222257 0.5617504680322,
1.19053596444428 0.9029693332377
)
)
""");
var result = GeoUtils.snapAndFixPolygon(orig, Stats.inMemory(), "test");
var point = newPoint(1.14602002962965, 0.76978969252622);
assertTrue(result.isValid());
assertFalse(result.contains(point));
}

@ParameterizedTest
@CsvSource({
"1,0,0",
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<maven.source.excludeResources>true</maven.source.excludeResources>
<jackson.version>2.17.2</jackson.version>
<junit.version>5.11.0</junit.version>
<jts.version>1.19.0</jts.version>
<jts.version>1.20.0</jts.version>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>onthegomap</sonar.organization>
<sonar.projectKey>onthegomap_planetiler</sonar.projectKey>
Expand Down

0 comments on commit af6ceb2

Please sign in to comment.