Skip to content

Commit b94d7d9

Browse files
committed
support imported .tif layers
1 parent 3194343 commit b94d7d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/groovy/au/org/ala/spatial/process/LayerCreation.groovy

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,15 @@ class LayerCreation extends SlaveProcess {
4444
String dir = grailsApplication.config.data.dir
4545
File shpUploaded = new File(dir + "/uploads/" + uploadId + "/" + uploadId + ".shp")
4646
File bilUploaded = new File(dir + "/uploads/" + uploadId + "/" + uploadId + ".bil")
47+
File tifUploaded = new File(dir + "/uploads/" + uploadId + "/" + uploadId + ".tif")
4748
File txtUploaded = new File(dir + "/uploads/" + uploadId + "/" + uploadId + ".txt")
4849
File diva = new File(dir + "/layer/" + layer.name + ".grd")
4950

50-
if (bilUploaded.exists()) {
51+
if (bilUploaded.exists() || tifUploaded.exists()) {
5152
String srcPath = bilUploaded.getPath()
53+
if (tifUploaded.exists()) {
54+
srcPath = tifUploaded.getPath()
55+
}
5256
String outPath = dir + "/layer/" + layer.name
5357
FileUtils.forceMkdir(new File(outPath).getParentFile())
5458

0 commit comments

Comments
 (0)