Re: [mapserver-users] WMS T time series data support
Hi, Forward step by step. Remove everything that is time-related, read http://www.mapserver.org/optimization/tileindex.html and make your tileindex layer to work and show all your images. Once that works for you, continue to time series stuff. BTW I have never seen this before “CLASS #class to show the image in red”. What makes you think that it works? Is it documented somewhere? -Jukka Rahkonen- Sushrut Shivaswamy wrote: Re: [mapserver-users] WMS T time series data support Hey, I created a WMS-T layer from a time series image mosaic as follows. * Ran gdaltindex on the tiff files to generate the index shapefle called index.shp. * I edited the index.shp file in QGIS and added another column called "timeWater" and added the time value in -MM-DD format next to each location entry. * I added this layer to the mapfie as follows. LAYER NAME "Inundation" TYPE RASTER STATUS ON DEBUG ON PROJECTION "init=epsg:4326" END METADATA "wms_title" "INUN_WMS_T" "wms_srs" "EPSG:4326" "wms_extent" "67.6 7.34 97.7 38.74" "wms_timeextent" "2015-12-01/2015-12-03" "wms_timeitem" "timeWater" #timeWater is a column in the index shapefile specifying time value for each tiff image "wms_timedefault" "2015-12-03" "wms_timeformat" "-MM-DD" END #TILEITEM "location" #filepath is a column in postgis table with varchar of the filepath to each image TILEINDEX "index" #index is the name of the shape file generated with gdaltindex FILTER (`[timeWater]` = `2015-12-03`) CLASS #class to show the image in red STYLE COLOR 236 0 0 END # STYLE END # CLASS END The TILEINDEX property is set to "index" which is the name of the index shapefile haveing the path and time in its columns. The paths to the TIFF files are in the "location" column. The time field is in the column "timeWater". The GetCapabilities request now shows my layer with a field in it so I assume it has been published properly as a layer. Despite this when I make a GetMap request to this layer I get a blank image in png format and a black image in jpeg format. Is the TILEINDEX property in the map file the name of the shape file or the name of a PostGIS table? Any idea on what could be wrong? Note: The paths mentioned in the index shapefile are correct and relative to the map file. The index shapefile has also been placed in the same directory as the .map file. Regards, Sushrut Shivaswamy ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WMS T time series data support
Hey, Thanks for all the responses. They were a great help. A it turns out my dataset was in EPSG:32644 projection. I ran gdaltindex again as: gdaltindex -t_srs "EPSG:4326" *-src_srs_name* "tile_srs" index.shp *.tiff to create an index with the projection of each tiff in the tile_srs column. I then added the time stamp in each row and added the layer to the map file with the TILESRS option set to the attribute name "tile_srs". The GetMap request for the following procedure gave the error "All points failed to reproject". To avoid this I reprojected all my layers to "EPSG:4326" and added to the map file without the TILESRS option. To test whether the layer is time enabled I sent a GetMap request with the time parameter outside the "wms_timeextent" and I got an error saying that the requested time is out of bounds. The images produced by the GetMap request are all still blank. Can anyone point out where I could have gone wrong in this process. Regards, Sushrut Shivaswamy On Wed, Jan 11, 2017 at 9:15 PM, Schepers, Benjaminwrote: > Hey, > > > > h, debugging can be an awful thing….. > > > > Always have a look at the logs (error, etc.). > > > > I’d suppose, that mapserver can’t find the tiles. > > A valid DIMENSION-Element in GetCapabilities could look like this: > > nearestValue="0">2009/2016/P1Yß in this case the dataset > supports time from 2009-2016 in one-year-steps] > > > > > > Are you really sure about the right relations on paths? See: > > http://mapserver.org/optimization/tileindex.html#tileindex > > > > I can’t see any “SHAPEPATH” (directory of index), which is referenced in > MAP-section, see: > > http://mapserver.org/mapfile/map.html [from mapserver-docs: … Normally > the location should contain the path to the tile file relative to the > shapepath, not relative to the tileindex itself. … ] > > > > > > What also works for me is using absolute paths: > > Please try the the absolute path to tileindex, e.g.: > > TILEINDEX "/data/subfolder/index" > > > > My index-file also contains absolute paths to tiff-files > > > > > > the name of a PostGIS table?* > > Both (and still more) ways are possible, for example SpatiaLite-Layer > (OGR-Connection), other layers from same mapfile… > > > > Hope, it helps > > > > Ben > > > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WMS T time series data support
Hey, h, debugging can be an awful thing….. Always have a look at the logs (error, etc.). I’d suppose, that mapserver can’t find the tiles. A valid DIMENSION-Element in GetCapabilities could look like this: 2009/2016/P1Y<-- in this case the dataset supports time from 2009-2016 in one-year-steps] Are you really sure about the right relations on paths? See: http://mapserver.org/optimization/tileindex.html#tileindex I can’t see any “SHAPEPATH” (directory of index), which is referenced in MAP-section, see: http://mapserver.org/mapfile/map.html [from mapserver-docs: … Normally the location should contain the path to the tile file relative to the shapepath, not relative to the tileindex itself. … ] What also works for me is using absolute paths: Please try the the absolute path to tileindex, e.g.: TILEINDEX "/data/subfolder/index" My index-file also contains absolute paths to tiff-files ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WMS T time series data support
Hey, I created a WMS-T layer from a time series image mosaic as follows. - Ran gdaltindex on the tiff files to generate the index shapefle called index.shp. - I edited the index.shp file in QGIS and added another column called "timeWater" and added the time value in -MM-DD format next to each location entry. - I added this layer to the mapfie as follows. *LAYERNAME "Inundation" TYPE RASTER STATUS ON DEBUG ON PROJECTION "init=epsg:4326" END METADATA"wms_title" "INUN_WMS_T""wms_srs" "EPSG:4326""wms_extent" "67.6 7.34 97.7 38.74""wms_timeextent" "2015-12-01/2015-12-03""wms_timeitem" "timeWater" #timeWater is a column in the index shapefile specifying time value for each tiff image "wms_timedefault" "2015-12-03""wms_timeformat" "-MM-DD" END #TILEITEM "location" #filepath is a column in postgis table with varchar of the filepath to each image TILEINDEX "index" #index is the name of the shape file generated with gdaltindex FILTER (`[timeWater]` = `2015-12-03`)CLASS #class to show the image in red STYLECOLOR 236 0 0 END # STYLEEND # CLASSEND* The TILEINDEX property is set to "index" which is the name of the index shapefile haveing the path and time in its columns. The paths to the TIFF files are in the "location" column. The time field is in the column "timeWater". The *GetCapabilities* request now shows my layer with a ** field in it so I assume it has been published properly as a layer. Despite this when I make a GetMap request to this layer I get a blank image in png format and a black image in jpeg format. I*s the TILEINDEX property in the map file the name of the shape file or the name of a PostGIS table?* Any idea on what could be wrong? Note: The paths mentioned in the index shapefile are correct and relative to the map file. The index shapefile has also been placed in the same directory as the .map file. Regards, Sushrut Shivaswamy On Tue, Jan 10, 2017 at 7:15 PM, Schepers, Benjamin <schep...@rvr-online.de> wrote: > Hi Sushrut, > > > > yes this should be possible. > > > > Here are general information: > > http://mapserver.org/ogc/wms_time.html > > > > Build index with time-information for your needs (also works for wms): > > http://mapserver.org/ogc/wcs_server.html#building-spatio- > temporal-tile-indexes > > > > è This is a index-shapefile including a BBOX of every tif-file, the > tif-path within the filesystem and another column with the date of the > specific file. The date-field needs to be created/filled manually… > > > > I just thought of writing a python script (extending “gdaltindex” > commandline-utility), which reads the date from tif-metadata > ('TIFFTAG_DATETIME' ) and writes it to the index-shape. > > > > > > Regards > > Ben > > > > Mit freundlichen Grüßen > Im Auftrag > > > > *Benjamin Schepers * > Luftbild und Geoinformationssysteme > Kronprinzenstraße 6 > 45128 Essen > Fon: +49 201 2069-232 > Fax: +49 201 2069-369 > schep...@rvr-online.de > > > > > *Die Regionaldirektorin *Kronprinzenstraße 35 > 45128 Essen > Zentrale: +49 (0) 201 2069-0 > Fax: +49 (0) 201 2069-500 > www.metropoleruhr.de > > Postfach 10 32 64 > 45032 Essen > > Steuernummer: RVR 112/5797/0116 > USt.-ldNr.: DE 173867500 > > Diese E-Mail koennte vertrauliche und/oder rechtlich geschuetzte > Informationen enthalten. > Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich > erhalten haben, informieren Sie bitte sofort den Absender und vernichten > Sie diese Mail. > Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail sind > nicht gestattet. > This e-mail may contain confidential and/or privileged information. > If you are not the intended recipient (or have received this e-mail in > error) please notify the sender immediately and destroy this e-mail. > Any unauthorised copying, disclosure or distribution of the material in > this e-mail is strictly forbidden. > > *Von:* mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] *Im > Auftrag von *Sushrut Shivaswamy > *Gesendet:* Dienstag, 10. Januar 2017 14:34 > *An:* mapserver-users@lists.osgeo.org > *Betreff:* [mapserver-users] WMS T time series data support > > > > Hey, > > > > I'm trying to visualise my time series data set using map server. > > I have a series of files with file names in the format > * {coveragename}_{timestamp}.tif*. > > > I need to query a single layer composed of the data from all these files > and > see the data by varying the TIME parameter in my GetMap request. > > GeoServer provides a tutorial on how to setup an Image Mosaic as time > series layer. > > Is there way to get the same effect in MapServer. > > Regards, > Sushrut Shivaswamy > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WMS T time series data support
Hi Sushrut, yes this should be possible. Here are general information: http://mapserver.org/ogc/wms_time.html Build index with time-information for your needs (also works for wms): http://mapserver.org/ogc/wcs_server.html#building-spatio-temporal-tile-indexes è This is a index-shapefile including a BBOX of every tif-file, the tif-path within the filesystem and another column with the date of the specific file. The date-field needs to be created/filled manually… I just thought of writing a python script (extending “gdaltindex” commandline-utility), which reads the date from tif-metadata ('TIFFTAG_DATETIME' ) and writes it to the index-shape. Regards Ben Mit freundlichen Grüßen Im Auftrag Benjamin Schepers Luftbild und Geoinformationssysteme Kronprinzenstraße 6 45128 Essen Fon: +49 201 2069-232 Fax: +49 201 2069-369 schep...@rvr-online.de [cid:image001.jpg@01D26B4F.354A0EC0] Die Regionaldirektorin Kronprinzenstraße 35 45128 Essen Zentrale: +49 (0) 201 2069-0 Fax: +49 (0) 201 2069-500 www.metropoleruhr.de Postfach 10 32 64 45032 Essen Steuernummer: RVR 112/5797/0116 USt.-ldNr.: DE 173867500 Diese E-Mail koennte vertrauliche und/oder rechtlich geschuetzte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail sind nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Sushrut Shivaswamy Gesendet: Dienstag, 10. Januar 2017 14:34 An: mapserver-users@lists.osgeo.org Betreff: [mapserver-users] WMS T time series data support Hey, I'm trying to visualise my time series data set using map server. I have a series of files with file names in the format {coveragename}_{timestamp}.tif. I need to query a single layer composed of the data from all these files and see the data by varying the TIME parameter in my GetMap request. GeoServer provides a tutorial on how to setup an Image Mosaic as time series layer. Is there way to get the same effect in MapServer. Regards, Sushrut Shivaswamy ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] WMS T time series data support
Hey, I'm trying to visualise my time series data set using map server. I have a series of files with file names in the format * {coveragename}_{timestamp}.tif*. I need to query a single layer composed of the data from all these files and see the data by varying the TIME parameter in my GetMap request. GeoServer provides a tutorial on how to setup an Image Mosaic as time series layer. Is there way to get the same effect in MapServer. Regards, Sushrut Shivaswamy ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users