MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets...

21
MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University of Minnesota MUM-2004, Ottawa, Canada

Transcript of MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets...

Page 1: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

MapServer-OGR-OPeNDAP: An Integrated System for

Uniform Access to Land and Oceanographic Datasets

Frank Warmerdam

Consultant

Thomas E. Burk

University of Minnesota

MUM-2004, Ottawa, Canada

Page 2: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

2

MapServer-OGR-OPeNDAP

• Background

• Implementation

• Usage

• Demonstration Application

Page 3: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

3

Background

• MapServer Targeted, easy-to-use application development GIS data Simplified visualization and query

Page 4: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

4

Background

• OPeNDAP Protocol for sharing scientific datasets Generic data types Data formats including NetCDF, HDF, etc. “User” is software system (e.g., Matlab)

Page 5: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

5

Background (MapServer vs. OPeNDAP)

• With MapServer, “Consumer” is an end user

MapServer

Internet

Client

Page 6: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

6

Background (MapServer vs. OPeNDAP)

• With OPeNDAP, “Consumer” is a data analysis system

DODS Server

Internet

DODS Matlab Client

Page 7: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

7

Background

• Project objective MapServer client interface (browsing,

visualization, query) to the scientific data sources distributed through OPeNDAP servers.

Page 8: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

8

Implementation

MapServer

New .map file key wordsDefine specification of OPeNDAP url

MS/OGR Interface

MapServer Client

OGR

Invoke OPeNDAP driver

OPeNDAP URL

OPeNDAP Server

OPeNDAP Data Model(Abstracts various

internal formats into few global (output)

formats)

OPeNDAP spatio- temporal

data

Translate OPeNDAP data into OGR data

Page 9: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

9

Implementation

• Core components New OGR Driver Data translation between OPeNDAP and MapServer

o Convert complex to simple data typeso Spatial referencing

Support Fileso Ancillary Information Service (AIS)

OPeNDAP complexityo Data Descriptor Structure (DDS) o Data Attribute Structure (DAS)

Page 10: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

10

Implementation

• Data translation Simple Point strategy

o From OPeNDAP DDS, return point features, one feature per item in a sequence Example DDS:dataset { sequence { float64 lat; float64 lon; string experimenter; int32 time; } casts;} data;

Page 11: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

11

Implementation

• Data translation Other strategies

o Nested Sequence Lineo Nested Sequence Normalized Pointo Array/Grid Point

Page 12: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

12

Implementation

• Data translation MapServer-side support files

o DODS configuration– Caching

o MapServer-OGR-DODS configuration– Ancillary Information Service (AIS)

» Projection related information

» Additional DAS definitions

Page 13: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

13

UsageMAP

NAME "test"

SIZE 400 400

EXTENT -2 -2 10 10

UNITS dd

CONFIG DODS_CONF "/data2/projects/dods/demo/dodsrc"

CONFIG DODS_AIS_FILE "/tmp/ogr_test_eg.xml"

# DODS client configuration file. See the DODS

# users guide for information.

USE_CACHE=1

MAX_CACHE_SIZE=50

MAX_CACHED_OBJ=5

IGNORE_EXPIRES=0

CACHE_ROOT=/data2/projects/dods/demo/dods_cache/DEFAULT_EXPIRES=86400

ALWAYS_VALIDATE=0

Page 14: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

14

Usage

MAP

NAME "test"

SIZE 400 400

EXTENT -2 -2 10 10

UNITS dd

CONFIG DODS_CONF "/data2/projects/dods/demo/dodsrc"

CONFIG DODS_AIS_FILE "/tmp/ogr_test_eg.xml"

<?xml version="1.0" encoding="US-ASCII" standalone="no"?>

<!DOCTYPE ais SYSTEM "http://www.opendap.org/ais/ais_database.dtd">

<ais xmlns="http://xml.opendap.org/ais">

<entry>

<primary regexp="http://www.epic.noaa.gov:10100/dods/wod2001/natl_prof_bot.cdp*"/>

<ancillary url="/tmp/natl_prof_bot.cdp.das"/>

</entry>

<entry>

<primary regexp="http://www.epic.noaa.gov:10100/dods/wod2001/natl_prof_ctd.cdp*"/>

<ancillary url="/tmp/natl_prof_ctd.cdp.das"/>

</entry>

</ais>

Page 15: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

15

Usage

ogr_test_eg.xml……

<entry> <primary

regexp="http://www.epic.noaa.gov:10100/dods/wod2001/natl_prof_bot.cdp*"/>

<ancillary url="/tmp/natl_prof_bot.cdp.das"/>

</entry>

….….

Attributes {

ogr_layer_info_1 {

string layer_name normalized;

string spatial_ref WGS84;

string target_container location.profile;

x_field {

string name location.lon;

string scope dds;

}

y_field {

string name location.lat;

string scope dds;

}

}

Page 16: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

16

UsageLAYER

NAME "nabd"

TYPE POINT

CONNECTIONTYPE OGR

CONNECTION 'DODS:http://www.epic.noaa.gov:10100/dods/wod2001/natl_prof_bot.cdp?lat,lon'

DATA 'profiles'

STATUS default

CLASS

NAME "N. Atlantic Bottle Data"

COLOR 255 0 0

SYMBOL 'cross'

SIZE 8

END

END

Page 17: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

17

Usage• Additional examples

• Subsetting can be done using DODS constraints

• Basic url: (get all data, including spatial and non-spatial)• 'DODS:http://www.epic.noaa.gov:10100/dods/wod2001/natl_prof_bot.cdp’

• Constraints• Only spatial attributes

• “DODS:http://www.epic.noaa.gov:10100/dods/wod2001/natl_prof_bot.cdp?lat,lon”

• Non-spatial attributes• “DODS:http://pdas.navo.navy.mil/cgi-bin/nph-nc/data/DBDBV/

DBDBV_north_atlantic.nc?time”

• Spatial subsetting

• “DODS:http://pdas.navo.navy.mil/cgi-bin/nph-nc/data/DBDBV/DBDBV_north_atlantic.nc?Depth[300:308][0:5]”

Page 18: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

18

Demonstration

This application is built using North Atlantic Bottle and CTD data served by the OPeNDAP Serverhttp://www.epic.noaa.gov:10100/dods/

Bottle data – data collected using individual bottles for rosettes (attributes include – temperature, salinity, oxygen, silicate, nitrate,…)CTD data - conductivity-temperature-depth data measurements from the ocean (attributes include - pressure, temperature, salinity,…)

Page 19: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

19

Demonstration

Page 20: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

20

Demonstration

N-Query

Page 21: MapServer-OGR-OPeNDAP: An Integrated System for Uniform Access to Land and Oceanographic Datasets Frank Warmerdam Consultant Thomas E. Burk University.

21

Questions

?Documentation and Applications

http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?DODShttp://www.opendap.orghttp://walleye.gis.umn.edu/projects/dods/demo/