Skip to content

Commit b872c7d

Browse files
committed
Update release docs
1 parent b8fd2f5 commit b872c7d

File tree

3 files changed

+77
-9
lines changed

3 files changed

+77
-9
lines changed

doc/images/hillshade.png

226 KB
Loading

doc/images/random_raster.png

87.4 KB
Loading

doc/releases.rst

Lines changed: 77 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,96 @@ GeoScript Groovy Releases
55

66
1.12.0 (Under development)
77
--------------------------
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
99
requires Java 8.
1010

11-
Viewer.plot should handle closing the Window like other viewers.
11+
Update JTS to 1.16.0
1212

13-
Calling Geometry.validReason on a valid geometry should return an empty string.
13+
Switch jiffle from jaitools to geosolutions.
1414

15-
Update to use si.uon.SI.
15+
Switch to si.uon.SI.
1616

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)
1830

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])
2032

21-
Create Band with a description and min and max values and no data value.
33+
.. image:: images/hillshade.png
2234

23-
Create a Raster with bounds, size, and a List of Bands.
35+
Create Band with a description and min and max values::
2436

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
2688

2789
Add getMinValue and getMaxValue to Raster. Both methods first tries to get the value from the Band's metadata
2890
and then calculates it from the actual data.
2991

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+
3098
1.11.0
3199
------
32100
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

Comments
 (0)