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 words Define 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 types o Spatial referencing Support Files o Ancillary Information Service (AIS) OPeNDAP complexity o 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 Line o Nested Sequence Normalized Point o 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 Usage MAP NAME "test" SIZE EXTENT 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 EXTENT UNITS dd CONFIG DODS_CONF "/data2/projects/dods/demo/dodsrc" CONFIG DODS_AIS_FILE "/tmp/ogr_test_eg.xml"
15 Usage ogr_test_eg.xml … …. 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 Usage LAYER NAME "nabd" TYPE POINT CONNECTIONTYPE OGR CONNECTION 'DODS: p?lat,lon' DATA 'profiles' STATUS default CLASS NAME "N. Atlantic Bottle Data" COLOR SYMBOL 'cross' SIZE 8 END
17 Usage Additional examples Subsetting can be done using DODS constraints Basic url: (get all data, including spatial and non-spatial) 'DODS: Constraints Only spatial attributes “DODS: ?lat,lon” Non-spatial attributes “DODS: nc/data/DBDBV/DBDBV_north_atlantic.nc?time” Spatial subsetting “DODS: 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 Server 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