Skip to content

Commit

Permalink
Merge pull request #1023 from AtlasOfLivingAustralia/feature/issue3292
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala authored Sep 25, 2024
2 parents 3fedd33 + 94bec0a commit 3ac5ffb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions grails-app/services/au/org/ala/ecodata/SpatialService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ class SpatialService {
} else {
geo = GeometryUtils.geoJsonMapToGeometry (geoJson)
GeometryCollection geometryCollection = (GeometryCollection)geo
Geometry correctGeometry = geometryCollection
if(!geometryCollection.isValid()) {
geometryCollection = geometryCollection.buffer(0)
correctGeometry = geometryCollection.buffer(0)
}

Geometry convexHullGeometry = geometryCollection.union().convexHull()
Geometry convexHullGeometry = correctGeometry.union().convexHull()
wkt = convexHullGeometry.toText()
}

Expand Down

0 comments on commit 3ac5ffb

Please sign in to comment.