[mapserver-users] POST support for GetMap requests

2017-05-02 Thread Sushrut Shivaswamy
Hey,

I have a requirement to style a vector layer without polluting the layer
definition
in the map file with classobjects and such.
The method I have adopted is to use the SLD_Body parameter of a WMS GetMap
request
to receive the styled images.
This has worked so far but now the size of the SLD has grown so much that
exceeds the maximum number of characters permitted in a url.
So I can no longer send my SLD as a part of the GET request.
My SLD request till now was as follows

*http://localhost:8000/
<http://localhost:8000/>cgi-bin/mapserv?service=wms=GetMap=1.0.0=namespace:layer_body=sld_as_string..*


To overcome this problem I believe POST rquests are a good solution since
the SLD can then be sent as a part of the request body.

However, I am unable to execute a POST GetMap request.

The request body is as follows.


http://www.opengis.net/ows;
xmlns:gml="http://www.opengis.net/gml;
   version="1.3.0" service="WMS">
   
  
world
  
   
   http://www.opengis.net/gml/srs/epsg.xml#4326;>
  -13024
  -5550
   
   
  image/png
  
  64
  64
   
   



On sending this POST request to mapserver I get the error
*msCalculateScale(): General error message. Invalid image width or height.*

Even though the width and height has been specified in the XML.
The above XML works with Geoserver.
Does Mapserver support POST GetMap requests?

Regards,
Sushrut Shivaswamy
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] (no subject)

2017-01-16 Thread Sushrut Shivaswamy
Hey Sergio,

The definition of mapObject - > applySLD() in the map server documentation
is as follows.

*int applySLD(string sldxml)*
*Apply the SLD document to the map file. *
*The matching between the sld document and the map file will be done using
the layer’s name.*
*See SLD HowTo for more information on the SLD support.*

Assuming that your SLD document is applied to every layer in the mapfile I
see two potential areas for bottle necks to appear.

Since the mapping between SLD and layer is based on the layer name, what
could be happening is that for every NamedLayer occurence
in your SLD,  mapserver must be iterating over all the layers in the map
file to see which layer name matches the name in the SLD.
For 76 occurences( as stated by you) *this would become an order n-squared
complexity search.*
*Unless mapserver has an internal hash-table like structure to associate a
layerName with layerObj which I doubt, this would take a lot of time*
*and request processing times would scale on n-squared basis where n is the
the number of NamedLayerOccurences.*

The actual styling of a layer based on SLD shouldn't increase the time all
that much.

Could you try applying the SLD on a lyer basis instead of for the whole map.

If you have reference to the actual layerObj you could just call layerObj -
> applySLD().

This should cut down the time involved in searching through the entire map
file for a LAYER reference with matching layer name.

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

2017-01-11 Thread Sushrut Shivaswamy
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, Benjamin <schep...@rvr-online.de>
wrote:

> 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
>
>
>
>
>
> <I*s the TILEINDEX property in the map file the name of the shape file or
> 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

2017-01-11 Thread Sushrut Shivaswamy
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

[mapserver-users] WMS T time series data support

2017-01-10 Thread Sushrut Shivaswamy
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