@@ -5,28 +5,96 @@ GeoScript Groovy Releases
5
5
6
6
1.12.0 (Under development)
7
7
--------------------------
8
- The 1.12 release of GeoScript is built on Groovy 2.4.15, GeoTools 20.0, and the Java Topology Suite 1.15.1 and
8
+ The 1.12 release of GeoScript is built on Groovy 2.4.15, GeoTools 20.0, and the Java Topology Suite 1.16.0 and
9
9
requires Java 8.
10
10
11
- Viewer.plot should handle closing the Window like other viewers.
11
+ Update JTS to 1.16.0
12
12
13
- Calling Geometry.validReason on a valid geometry should return an empty string .
13
+ Switch jiffle from jaitools to geosolutions .
14
14
15
- Update to use si.uon.SI.
15
+ Switch to si.uon.SI.
16
16
17
- Add data label option the Scatter plot.
17
+ Calculate a hillshade from a Relief::
18
+
19
+ import geoscript.layer.GeoTIFF
20
+ import geoscript.layer.Raster
21
+ import geoscript.render.Draw
22
+
23
+ File file = new File("mt_rainier.tif")
24
+ GeoTIFF geoTIFF = new GeoTIFF(file)
25
+ Raster raster = geoTIFF.read()
26
+
27
+ Raster shadedReliefRaster = raster.createShadedRelief(1.0, 25, 260)
28
+ File outFile = new File("mt_rainier_shadedrelief.tif")
29
+ new GeoTIFF(outFile).write(shadedReliefRaster)
18
30
19
- Create Band with a description and min and max values.
31
+ Draw.draw(shadedReliefRaster, out: new File("mt_rainier_map.png"), size: [800,400])
20
32
21
- Create Band with a description and min and max values and no data value.
33
+ .. image :: images/hillshade.png
22
34
23
- Create a Raster with bounds, size, and a List of Bands.
35
+ Create Band with a description and min and max values::
24
36
25
- Add an example for creating a new Raster and setting random values.
37
+ Band band = new Band("Red",0,255)
38
+
39
+ Create Band with a description and min and max values and no data value::
40
+
41
+ Band band = new Band("Elevation",100,200, 200)
42
+
43
+ Create a Raster with bounds, size, and a List of Bands::
44
+
45
+ Raster raster = new Raster(
46
+ new Bounds(-180,-90,180,90,"EPSG:4326"),
47
+ 400,300,
48
+ [
49
+ new Band("red", 0, 255, 256),
50
+ new Band("green", 0, 255, 256),
51
+ new Band("blue", 0, 255, 256)
52
+ ]
53
+ )
54
+
55
+ Add an example for creating a new Raster and setting random values::
56
+
57
+ import geoscript.filter.Color
58
+ import geoscript.geom.Bounds
59
+ import geoscript.layer.Band
60
+ import geoscript.layer.GeoTIFF
61
+ import geoscript.layer.Raster
62
+
63
+ // Create a new Raster
64
+ Raster raster = new Raster(
65
+ new Bounds(-180,-90,180,90,"EPSG:4326"),
66
+ 400,300,
67
+ [
68
+ new Band("red", 0, 255, 256),
69
+ new Band("green", 0, 255, 256),
70
+ new Band("blue", 0, 255, 256)
71
+ ]
72
+ )
73
+
74
+ // Set values of each pixel
75
+ raster.eachCell { double value, double x, double y ->
76
+ Color color = Color.randomPastel
77
+ raster.setValue([x,y], color.rgb[0], 0)
78
+ raster.setValue([x,y], color.rgb[1], 1)
79
+ raster.setValue([x,y], color.rgb[2], 2)
80
+ }
81
+
82
+ // Write the Raster to disk
83
+ File file = new File("random.tif")
84
+ GeoTIFF geotiff = new GeoTIFF(file)
85
+ geotiff.write(raster)
86
+
87
+ image:: images/random_raster.png
26
88
27
89
Add getMinValue and getMaxValue to Raster. Both methods first tries to get the value from the Band's metadata
28
90
and then calculates it from the actual data.
29
91
92
+ Viewer.plot should handle closing the Window like other viewers.
93
+
94
+ Add data label option the Scatter plot.
95
+
96
+ Calling Geometry.validReason on a valid geometry should return an empty string.
97
+
30
98
1.11.0
31
99
------
32
100
The 1.11 release of GeoScript is built on Groovy 2.4.14, GeoTools 19.0, and the Java Topology Suite 1.13 and
0 commit comments