Skip to content

Commit 0d694d5

Browse files
committed
Fix no EPSG found
Defaulting to 4326
1 parent 082ca82 commit 0d694d5

File tree

1 file changed

+4
-1
lines changed
  • adapters/klab.ogc/src/main/java/org/integratedmodelling/klab/stac

1 file changed

+4
-1
lines changed

adapters/klab.ogc/src/main/java/org/integratedmodelling/klab/stac/STACEncoder.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,10 @@ public void getEncodedData(IResource resource, Map<String, String> urnParameters
554554
RegionMap regionTransformed = RegionMap.fromEnvelopeAndGrid(regionEnvelope, (int) grid.getXCells(),
555555
(int) grid.getYCells());
556556
Set<Integer> EPSGsAtItems = items.stream().map(i -> i.getEpsg()).collect(Collectors.toUnmodifiableSet());
557-
if (EPSGsAtItems.size() > 1) {
557+
if (EPSGsAtItems.isEmpty()) {
558+
scope.getMonitor().warn("No EPSGs found on the items. Using the default value.");
559+
collection.setAssumedEpsg(4326);
560+
} else if (EPSGsAtItems.size() > 1) {
558561
scope.getMonitor().warn("Multiple EPSGs found on the items " + EPSGsAtItems.toString() + ". The transformation process could affect the data.");
559562
}
560563

0 commit comments

Comments
 (0)