Geographic scripting in uDig
-
Upload
andrea-antonello -
Category
Technology
-
view
5.031 -
download
0
Transcript of Geographic scripting in uDig
![Page 1: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/1.jpg)
1 /21
nvironmental ngineeringydroloGISHydroloGIS S.r.l. - Via Siemens, 19 - 39100 Bolzano www.hydrologis.com
Geographic scripting in uDig: halfway between developer and user
FOSS4G 2013 - Nottingham
Andrea Antonello, HydroloGISSilvia Franceschi, HydroloGIS
2013-09-19
![Page 2: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/2.jpg)
2 /21
"Geographic scripting..." == Geoscript
...it adds spatial capabilities to scripting languages
groovyscalajavascriptpythonclojure
- bases on the geotools library- making development much simpler- simplicity, batch-ing for non developers- fast prototyping without compiling for developers
![Page 3: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/3.jpg)
3 /21
"Geographic scripting..." == Geoscript
Through geotools it provides support for:
vector data sourcesraster data sourcesvarious web services and databasesprojectionsvector geometry operationsrendering
------
![Page 4: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/4.jpg)
4 /21
"Geographic scripting..." == Geoscript
On what do we depend on?
JavaAdvanced Imaging &
Imageio-ext
Geotools EMF
JTSJava
Topology Suite
Geoscript
![Page 5: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/5.jpg)
5 /21
"Geographic scripting..." == Geoscript
JavaAdvanced Imaging &
Imageio-ext
Geotools EMF
JTSJava
Topology Suite
Deja vu!
Geoscript
uDig
![Page 6: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/6.jpg)
6 /21
"...in uDig" == Userfriendly Desktop Internet GIS
uDig is an open source desktop GIS application framework,
distributed under dual EPL and BSD license.
![Page 7: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/7.jpg)
7 /21
"...in uDig" == Userfriendly Desktop Internet GIS
uDig is an open source desktop GIS application framework,
distributed under dual EPL and BSD license.
![Page 8: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/8.jpg)
8 /21
"...in uDig" == Userfriendly Desktop Internet GIS
uDig has a spatial toolbox to do spatial processing with
the help of the jgrasstools project.
![Page 9: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/9.jpg)
9 /21
"...in uDig" == Userfriendly Desktop Internet GIS
uDig is also an extensible GIS framework to create apps on
![Page 10: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/10.jpg)
10/21
The Scripting Editor in uDig: since 1.4.0
open the editor to create a new script
![Page 11: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/11.jpg)
11/21
The Scripting Editor in uDig: since 1.4.0
the scripting editor
![Page 12: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/12.jpg)
12/21
The Scripting Editor in uDig: since 1.4.0
run and stop scripts
add common imports
handle memory
debug options
have some fun
![Page 13: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/13.jpg)
13/21
Command completion (...ehm suggestion)
minimal editor support
without dynamic access
to Java AST
![Page 14: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/14.jpg)
14/21
Syntax coloring
basic syntax coloring
![Page 15: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/15.jpg)
15/21
Interaction with uDig
Drag and drop support for file based data sources
Access to uDig object model not available (at the moment)
![Page 16: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/16.jpg)
16/21
Running the script
Each script is run in a different process
scripts can be stopped
output console
choose memory wisely
![Page 17: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/17.jpg)
17/21
University course available
http://jgrasstechtips.blogspot.it/2013/03/
course-geographic-scripting-in-udig.html
![Page 18: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/18.jpg)
18/21
Hydro- Geomorphologic processing with JGrasstools
By simply adding the JGrasstools jars to the "spatialtoolbox"
folder in the uDig installation, the jgrasstools processing
modules are enabled.
- aspect
- contour extraction
- network extraction
- slope
- maximum discharge
- lidar tools
}just examplesit is 0.1% of what you can do
![Page 19: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/19.jpg)
19/21
Hydro- Geomorphologic processing with JGrasstools
Raster classes are enabled (now Geoscript also supports them)
![Page 20: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/20.jpg)
20/21
Hydro- Geomorphologic processing with JGrasstools
JGrasstools supplies help for modules and syntax templates:
![Page 21: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/21.jpg)
21/21
Hydro- Geomorphologic processing with JGrasstools
Templates just need to be filled:
![Page 22: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/22.jpg)
22/21
Hydro- Geomorphologic processing with JGrasstools
Extract contours
![Page 23: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/23.jpg)
23/21
Hydro- Geomorphologic processing with JGrasstools
More complex: extract river network from dtm
![Page 24: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/24.jpg)
24/21
Hydro- Geomorphologic processing with JGrasstools
More complex: extract river network from dtm
![Page 25: Geographic scripting in uDig](https://reader033.fdocument.pub/reader033/viewer/2022052300/58ed899f1a28abbb598b463d/html5/thumbnails/25.jpg)
25/21
nvironmental ngineeringydroloGISHydroloGIS S.r.l. - Via Siemens, 19 - 39100 Bolzano www.hydrologis.com
Geoscript http://www.geoscript.orguDig http://www.udig.euJGrasstools http://www.jgrasstools.org
Geographic scripting in uDig:halfway between developer and user
USEFUL LINKS