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

Preview:

Citation preview

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

2

MapServer-OGR-OPeNDAP

• Background

• Implementation

• Usage

• Demonstration Application

3

Background

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

4

Background

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

5

Background (MapServer vs. OPeNDAP)

• With MapServer, “Consumer” is an end user

MapServer

Internet

Client

6

Background (MapServer vs. OPeNDAP)

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

DODS Server

Internet

DODS Matlab Client

7

Background

• Project objective MapServer client interface (browsing,

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

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

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)

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;

11

Implementation

• Data translation Other strategies

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

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

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

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>

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;

}

}

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

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]”

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,…)

19

Demonstration

20

Demonstration

N-Query

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/