Geoapplications development http://rgeo.wikience.org Higher School - - PowerPoint PPT Presentation

geoapplications development http rgeo wikience org
SMART_READER_LITE
LIVE PREVIEW

Geoapplications development http://rgeo.wikience.org Higher School - - PowerPoint PPT Presentation

Geoapplications development http://rgeo.wikience.org Higher School of Economics, Moscow, www.cs.hse.ru 2 Agenda 3 Sources of geospatial raster data 4 Challenges in managing raster data


slide-1
SLIDE 1

Geoapplications development http://rgeo.wikience.org

Higher School of Economics, Moscow, www.cs.hse.ru

slide-2
SLIDE 2

Agenda

2

slide-3
SLIDE 3

Sources of geospatial raster data

3

slide-4
SLIDE 4

Challenges in managing raster data

4

  • http://rasdaman.org/
slide-5
SLIDE 5

Challenges in storing spatial raster data (slides taken from training 03)

5

slide-6
SLIDE 6

Different geospatial raster types

6

  • http://modis-atmos.gsfc.nasa.gov/MOD04_L2/grids.html http://meso-a.gsfc.nasa.gov/val/projects/gpm/swath/index.html
slide-7
SLIDE 7

Model VS Storage (1)

7

1 2 3 4 1 2 3 4 1 2 3 4

slide-8
SLIDE 8

Model VS Storage (2)

8

slide-9
SLIDE 9

Our goals

9

Desktop: Google Earth WMS or Quantum GIS

slide-10
SLIDE 10

Our goals (2)

10

Web: Godiva or other WMS/etc. tools

slide-11
SLIDE 11

NetCDF (1)

11

Multidimensional array

http://www.narccap.ucar.edu/users/user-meeting-08/handout/netcdf-diagram.png

slide-12
SLIDE 12

NetCDF (2)

12

Multidimensional array

https://trac.osgeo.org/gdal/raw- attachment/wiki/ADAGUC/ADAGUC_NetCDF_dimension_scales.jpg

slide-13
SLIDE 13

File-based and BLOB-based storage approaches

13

BLOB – Binary Large Object

  • data type in a RDBMS for a column
  • holds raw bytes
  • may be used to store geospatial raster data

Examples: PostGIS raster, RasDaMan array File-based storage

  • Store raster data in their original formats
  • Perform access/computations on-the-fly or in-situ

Pros:

  • error-prone import step is eliminated
  • reuse of previous work on format optimization
slide-14
SLIDE 14

Raster data management systems

14

  • http://geoserver.org/
  • http://postgis.net/
  • http://rasdaman.org/
  • http://www.paradigm4.com/
slide-15
SLIDE 15

NOAA TDS

15

http://rasdaman.org/

slide-16
SLIDE 16

Apache Tomcat Installation

16

slide-17
SLIDE 17

setenv.bat

17

set "JRE_HOME=c:\Program Files\Java\jdk1.8.0_25" set "JAVA_OPTS=%JAVA_OPTS% -Xmx4096m -Xms512m -server

  • Djava.awt.headless=true
  • Djava.util.prefs.systemRoot=%CATALINA_BASE%/content/thredds/javaUtilPrefs
  • Dtds.content.root.path=%CATALINA_BASE%/content/thredds"

exit /b 0

slide-18
SLIDE 18

Environment variables

18

CATALINA_BASE

CATALINA_HOME

slide-19
SLIDE 19

Test installation

19

Start Tomcat c:\apache-tomcat-9.0.0.M4\bin\startup.bat and surf to http://localhost:8080/

slide-20
SLIDE 20

THREDDS Data Server Installation

20

slide-21
SLIDE 21

Tomcat 8 feature

21

  • 06-Apr-2016 21:08:30.636 INFO [localhost-startStop-2]
  • rg.apache.catalina.startup.HostConfig.deployWAR Deploying web application

archive C:\apache-tomcat-9.0.0.M4\webapps\tds-4.6.5.war

  • 06-Apr-2016 21:08:32.678 WARNING [localhost-startStop-2]
  • rg.apache.catalina.webresources.Cache.getResource Unable to add the

resource at [/WEB-INF/lib/vecmath-1.5.2.jar] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

slide-22
SLIDE 22

context.xml

22

<Context> <!-- Default set of monitored resources. If one of these changes, the --> <!-- web application will be reloaded. --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> <Resources cachingAllowed="true" cacheMaxSize="100000" /> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" />

  • ->

</Context>

slide-23
SLIDE 23

tomcat-users.xml

23

<role rolename="manager-gui"/> <user username="tomcat" password="tomcat" roles="manager-gui"/>

slide-24
SLIDE 24

war deployment

24

  • Copy tds-4.6.5.war  c:\apache-tomcat-9.0.0.M4\webapps\
  • Wait until deployment completes
  • Remove tds-4.6.5.war from c:\apache-tomcat-9.0.0.M4\webapps\
  • Make sure c:\apache-tomcat-9.0.0.M4\content\ was created

WAR = Web ARchive

Tomcat web applications may be distributed as a single *.war file

slide-25
SLIDE 25

war deployment (2)

25

  • Another way is to use GUI manager
slide-26
SLIDE 26

Check installation

26

http://localhost:8080/tds-4.6.5/

Warning: do not remove tds-4.6.5.war from the webapps folder after it has been deployed

slide-27
SLIDE 27

Check installation (2)

27

http://localhost:8080/manager/html/

slide-28
SLIDE 28

Setting base URL for TDS

28

c:\apache-tomcat-9.0.0.M4\webapps\tds-4.6.5\WEB-INF\web.xml

http://www.unidata.ucar.edu/software/thredds/current/tds/reference/TomcatBehindProxyServer.html

<!-- Provide the context path at init time (otherwise, not available till a request is made). --> <!-- Servlet 2.5 spec provides ServletContext.getContextPath(). But we aren't requiring Servlet 2.5 yet. --> <context-param> <param-name>ContextPath</param-name> <param-value>tds-4.6.5</param-value> </context-param>

slide-29
SLIDE 29

Setting base URL for TDS (2)

29

<context-param> <param-name>ContextPath</param-name> <param-value>tds-4.6.5</param-value> </context-param>

slide-30
SLIDE 30

Register Data in TDS

30

slide-31
SLIDE 31

catalog.xml

31

  • Server-side XML to specify available data
  • c:\apache-tomcat-9.0.0.M4\content\thredds\thredds\catalog.xml
  • Initially it looks like (almost):

<?xml version="1.0" encoding="UTF-8"?> <catalog name="Raster data collection" xmlns="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0 http://www.unidata.ucar.edu/schemas/thredds/InvCatalog.1.0.6.xsd"> <service name="all" base="" serviceType="compound"> <service name="odap" serviceType="OpenDAP" base="/thredds/dodsC/" /> <service name="dap4" serviceType="DAP4" base="/thredds/dap4/" /> <service name="http" serviceType="HTTPServer" base="/thredds/fileServer/" /> <service name="wcs" serviceType="WCS" base="/thredds/wcs/" /> <!--service name="wms" serviceType="WMS" base="/thredds/wms/" /--> <!--service name="ncss" serviceType="NetcdfSubset" base="/thredds/ncss/" /--> </service>

slide-32
SLIDE 32

catalog.xml (2)

32

<service name="dap" base="" serviceType="compound"> <service name="odap" serviceType="OpenDAP" base="/thredds/dodsC/" /> <service name="dap4" serviceType="DAP4" base="/thredds/dap4/" /> </service> <datasetRoot path="test" location="content/testdata/" /> <dataset name="Test Single Dataset" ID="testDataset" serviceName="dap" urlPath="test/testData.nc" dataType="Grid"/> <dataset name="Test Single Dataset 2" ID="testDataset2" serviceName="odap" urlPath="test/testData2.grib2" dataType="Grid"/> This does not actually work for me: location="content/testdata/ Because path is different: c:\apache-tomcat-9.0.0.M4\content\thredds\thredds\public\testdata\ Anyway, we will make our own collection

slide-33
SLIDE 33

catalog.xml (3)

33

<datasetScan name="Test all files in a directory" ID="testDatasetScan" path="testAll" location="content/testdata"> <metadata inherited="true"> <serviceName>all</serviceName> <dataType>Grid</dataType> </metadata> <filter> <include wildcard="*eta_211.nc"/> <include wildcard="testgrid*.nc"/> </filter> </datasetScan> <catalogRef xlink:title="Test Enhanced Catalog" xlink:href="enhancedCatalog.xml" name=""/> </catalog>

slide-34
SLIDE 34

threddsConfig.xml

34

Enable WCS service (because in catalog.xml WCS service will not work without this server- global option) <!-- The WCS Service is off by default. Also, off by default (and encouraged) is operating on a remote dataset.

  • ->

<WCS> <allow>true</allow> <allowRemote>true</allowRemote> <scour>15 min</scour> <maxAge>30 min</maxAge> </WCS>

slide-35
SLIDE 35

Add WMS layer to Google Earth

35

slide-36
SLIDE 36

Add WMS layer to Google Earth

36

slide-37
SLIDE 37

Add WMS layer to Google Earth

37

slide-38
SLIDE 38

Correct URL using Godiva generated WMS URL

38

Click “test image” on Godiva page http://localhost:8080/tds- 4.6.5/wms/test/testData.nc?LAYERS=Z_sfc&ELEVATION=0&TIME=2003- 09- 25T00%3A00%3A00.000Z&TRANSPARENT=true&STYLES=boxfill%2Frain bow&COLORSCALERANGE=- 50%2C50&NUMCOLORBANDS=20&LOGSCALE=false&SERVICE=WMS&V ERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.og c.se_inimage&FORMAT=image%2Fpng&SRS=EPSG%3A4326& BBOX=-135.33123756732,19.672744972339,- 31.54351738423,60.301526740558&WIDTH=256&HEIGHT=256

slide-39
SLIDE 39

Correct URL using Godiva generated WMS URL

39

Click “Properties”

slide-40
SLIDE 40

Correct URL using Godiva generated WMS URL

40

Insert this (add some parameters to GET query) http://localhost:8080/tds- 4.6.5/wms/test/testData.nc?VERSION=1.1.1&REQUEST=GetMap&SRS= EPSG:4326&WIDTH=512&HEIGHT=512&LAYERS=Z_sfc&STYLES=boxfill/ rainbow&COLORSCALERANGE=- 50%2C50&NUMCOLORBANDS=20&LOGSCALE=false&TRANSPARENT= TRUE&FORMAT=image/png

slide-41
SLIDE 41

Exercise

41

Do the same for Catalog http://localhost:8080/tds- 4.6.5/catalog/NCEP/R2/files/catalog.html Dataset: files/1979.nc

slide-42
SLIDE 42

Readings

42

slide-43
SLIDE 43

Practical task

43

slide-44
SLIDE 44