[mapserver-users] using gdal subdataset as datasource
Jachym Cepicky
jachym.cepicky at gmail.com
Mon Jun 27 02:32:36 PDT 2011
Hi,
I use gdal 1.9.0 (trunk), mapserver 6.0.0, ubuntu 11.04
I need to access several gdal subdatasets within gdal dataset as
different tileindexes (need to build time-support on top of this).
Situation:
1) I have GDAL WCS data source file, with temporal information in it
2) I created shapefile with 2 attributes: location AND time. location
cotains the subdataset definition, which can be read by gdal
ogrinfo on /tmp/WCS-a7145b1a3d54e8df55f019a136f55f84iYEWBn/20101014T030000_pph.wcs.tindex/20101014T030000_pph.wcs.tindex.shp
(which is the generated time index file):
...
OGRFeature(20101014T030000_pph.wcs.tindex):18
location (String) =
WCS_SDS:time="2010-10-14T21:00:00.000Z",/tmp/WCS-a7145b1a3d54e8df55f019a136f55f84iYEWBn/20101014T030000_pph.wcs
time (String) = 2010-10-14T21:00:00.000Z
POLYGON ((409900 -11700,12900 -11700,12900 0,409900 0,409900 -11700))
...
gdalinfo on tindex location:
gdalinfo 'WCS_SDS:time="2010-10-14T21:00:00.000Z",/tmp/WCS-a7145b1a3d54e8df55f019a136f55f84iYEWBn/20101014T030000_pph.wcs'
Driver: WCS/OGC Web Coverage Service
Files: none associated
Size is 645, 585
Coordinate System is:
PROJCS["GGRS87 / Greek Grid",
GEOGCS["GGRS87",
DATUM["Greek_Geodetic_Reference_System_1987",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[-199.87,74.79,246.62,0,0,0,0],
AUTHORITY["EPSG","6121"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4121"]],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",24],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
AUTHORITY["EPSG","2100"],
AXIS["Easting",EAST],
AXIS["Northing",NORTH]]
Origin = (409900.000000000000000,4503200.000000000000000)
Pixel Size = (20.000000000000000,-20.000000000000000)
Metadata:
TIME_POSITION=2010-10-14T21:00:00.000Z
Corner Coordinates:
Upper Left ( 409900.000, 4503200.000) ( 22d56' 2.07"E, 40d40'29.14"N)
Lower Left ( 409900.000, 4491500.000) ( 22d56' 8.10"E, 40d34' 9.76"N)
Upper Right ( 422800.000, 4503200.000) ( 23d 5'11.49"E, 40d40'33.86"N)
Lower Right ( 422800.000, 4491500.000) ( 23d 5'16.66"E, 40d34'14.45"N)
Center ( 416350.000, 4497350.000) ( 23d 0'39.58"E, 40d37'21.89"N)
Band 1 Block=645x585 Type=Float64, ColorInterp=Undefined
-> works perfectly
BUT when I run GetMap request (WMS) on that layer, I got
mapscript.MapServerError: msDrawMap(): Image handling error. Failed to
draw layer named '20101014T030000_pph'.
msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or
missing file '/tmp/WCS-a7145b1a3d54e8df55f019a136f55f84iYEWBn/20101014T030000_pph.wcs.tindex/WCS_SDS:time="2010-10-14T03:00:00.000Z",/tmp/WCS-a7145b1a3d54e8df55f019a136f55f84iYEWBn/20101014T030000_pph.wcs'
for layer '20101014T030000_pph'. , referer:
http://briseide.localhost/map/index2.php
WMS Mapfile layer definition looks like
LAYER
METADATA
"wms_timeitem" "time"
"wms_timeextent" "2010-10-14T03:00:00.000Z,2010-10-14T04:00:00.000Z,2010-10-14T05:00:00.000Z,2010-10-14T06:00:00.000Z,2010-10-14T07:00:00.000Z,2010-10-14T08:00:00.000Z,2010-10-14T09:00:00.000Z,2010-10-14T10:00:00.000Z,2010-10-14T11:00:00.000Z,2010-10-14T12:00:00.000Z,2010-10-14T13:00:00.000Z,2010-10-14T14:00:00.000Z,2010-10-14T15:00:00.000Z,2010-10-14T16:00:00.000Z,2010-10-14T17:00:00.000Z,2010-10-14T18:00:00.000Z,2010-10-14T19:00:00.000Z,2010-10-14T20:00:00.000Z,2010-10-14T21:00:00.000Z"
"wms_title" "20101014T030000_pph"
END # METADATA
NAME "20101014T030000_pph"
PROJECTION
"proj=tmerc"
"lat_0=0"
"lon_0=24"
"k=0.9996"
"x_0=500000"
"y_0=0"
"datum=GGRS87"
"units=m"
"no_defs"
END # PROJECTION
STATUS OFF
TEMPLATE "foo"
TILEINDEX "/tmp/WCS-a7145b1a3d54e8df55f019a136f55f84iYEWBn/20101014T030000_pph.wcs.tindex/20101014T030000_pph.wcs.tindex.shp"
TILEITEM "location"
TYPE RASTER
UNITS METERS
CLASS
STYLE
ANGLE 0
OFFSET 0 0
END # STYLE
END # CLASS
END # LAYER
The part "/tmp/WCS-a7145b1a3d54e8df55f019a136f55f84iYEWBn/20101014T030000_pph.wcs.tindex/"
of the requested "file name" should *NOT* be there.
Questions:
1) What did I wrong with the configuration?
2) Is there other way, how to access temporal-enabled time data,
available as GDAL subdataset?
Thanks
Jachym
--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp
More information about the MapServer-users
mailing list