You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,11 @@ Use maven to build, test, and package::
18
18
19
19
mvn clean install
20
20
21
-
The distribution can be found in target/geoscript-groovy-1.0-app/geoscript-groovy-1.0.
21
+
The distribution can be found in target/geoscript-groovy-1.1-app/geoscript-groovy-1.1.
22
22
23
23
Use
24
24
---
25
-
To use GeoScript Groovy you need Java and Groovy installed and on your PATH. Next, download the `latest stable release 1.0 <https://docs.google.com/file/d/0B8cwqNmbcThpQlBmaWsyNDlQMVU/edit?usp=sharing>`_, try the `latest unstable release 1.1-SNAPSHOT <https://docs.google.com/file/d/0B8cwqNmbcThpWFRxQzlHQVJlVW8/edit?usp=sharing>`_ or build the code yourself. Then put the GeoScript Groovy bin directory on your PATH. You are now ready to use GeoScript Groovy!
25
+
To use GeoScript Groovy you need Java and Groovy installed and on your PATH. Next, download the `latest stable release <https://github.com/jericks/geoscript-groovy/releases>`_ or build the code yourself. Then put the GeoScript Groovy bin directory on your PATH. You are now ready to use GeoScript Groovy!
26
26
27
27
GeoScript Groovy has three commands:
28
28
@@ -68,6 +68,25 @@ Drawing a Shapefile::
68
68
shp.style = new Stroke("#999999", 0.1)
69
69
draw(shp)
70
70
71
+
Reading a Raster::
72
+
73
+
import geoscript.layer.GeoTIFF
74
+
75
+
def format = new GeoTIFF()
76
+
def raster = format.read(new File("raster.tif"))
77
+
78
+
println "Format = ${raster.format}"
79
+
println "Proj EPSG = ${raster.proj.id}"
80
+
println "Proj WKT = ${raster.proj.wkt}"
81
+
println "Bounds = ${raster.bounds.geometry.wkt}"
82
+
println "Size = ${raster.size}"
83
+
println "Block Size = ${raster.blockSize}"
84
+
println "Pixel Size = ${raster.pixelSize}"
85
+
println "Band:"
86
+
raster.bands.eachWithIndex{b,i ->
87
+
println " ${i}). ${b}"
88
+
}
89
+
71
90
See the `web site <http://geoscript.org>`_ or the `examples directory <https://github.com/jericks/geoscript-groovy/tree/master/examples>`_ for more examples.
0 commit comments