Menu

#107 Additional WMS GetMap parameters

open
nobody
5
2010-05-21
2010-05-21
No

Users should have a possibility to give and edit some extra parameters which will be used with every WMS GetMap request thereafter. These additional parameters would be:
- one of &STYLES= , &SLD= , or &SLD_BODY
- free string of vendor parameters

I believe that the implementation itself is not extremely difficult. OpenJUMP should build the GetMap requests just as it is doing now, but also add to every GetMap request text strings which have been given through an input panel.

A sketch about the new GUI is included as an image.

WMS standard gives three ways for the users to select how the WMS output will look like. One is to use &STYLES parameter for selecting some of the beforehand formatted styles which are available from the server. But users can also do styling themselves and order the server do use their own style. This can be done either by adding a link to a web-accessible SLD file with the &SLD= parameter, or by sending the whole SLD-formatted styling document with the &SLD_BODY= parameter.

WMS standard allows also that WMS server may support additional non-standard features through vendor parameters. They are used simply by adding new key/value pairs to WMS requests, like &vendor_parameter_1=foo

An example about using &STYLES
http://giswebservices.massgis.state.ma.us/geoserver/wms?request=getmap&version=1.1.0&service=wms&layers=massgis:GISDATA.TOWNS_POLY,massgis:GISDATA.AIRPORTS_PT&styles=GISDATA.TOWNS_POLY::Filled_White,GISDATA.AIRPORTS_PT::Default&bbox=209899.0314465409,874160.1289017625,266889.786163522,932123.0073665812&format=image/png&width=234&height=239&SRS=EPSG%3A26986&bgcolor=%2358E8FF

An example about using &SLD=
http://www2.dmsolutions.ca/cgi-bin/mswms_world?SERVICE=WMS&VERSION=1.1.1&Request=GetMap
&LAYERS=WorldGen_Outline&SLD=http://www2.dmsolutions.ca/msapps/world_testdata/tests
/sld_tests/sld_line_simple.xml

An example about using &SLD_BODY=
http://giswebservices.massgis.state.ma.us/geoserver/wms?request=getmap&version=1.1.0&service=wms&SLD_BODY=%3CStyledLayerDescriptor+version=%221.0.0%22+xmlns%3Agml=%22http://www.opengis.net/gml%22+xmlns%3Aogc=%22http://www.opengis.net/ogc%22+xmlns=%22http://www.opengis.net/sld%22%3E%3CNamedLayer%3E%3CName%3Emassgis:GISDATA.OUTLINE25K_ARC%3C/Name%3E%3CNamedStyle%3E%3CName%3EGISDATA.OUTLINE25K_ARC%3A%3ADefault%3C/Name%3E%3C/NamedStyle%3E%3C/NamedLayer%3E%3CNamedLayer%3E%3CName%3Emassgis:GISDATA.AIRPORTS_PT%3C/Name%3E%3CUserStyle+xmlns=%22http://www.opengis.net/sld%22%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CPointSymbolizer%3E%3CGeometry%3E%3CPropertyName+xmlns=%22http://www.opengis.net/ogc%22%3ESHAPE%3C/PropertyName%3E%3C/Geometry%3E%3CGraphic%3E%3CMark%3E%3CWellKnownName%3ESQUARE%3C/WellKnownName%3E%3CFill%3E%3CCssParameter+name=%22fill%22%3E%23FF0000%3C/CssParameter%3E%3C/Fill%3E%3C/Mark%3E%3CSize%3E5%3C/Size%3E%3C/Graphic%3E%3C/PointSymbolizer%3E%3C/Rule%3E%3C/FeatureTypeStyle%3E%3C/UserStyle%3E%3C/NamedLayer%3E%3C/StyledLayerDescriptor%3E&bbox=209899.0314465409,874160.1289017625,266889.786163522,932123.0073665812&format=image/png&width=234&height=239&SRS=EPSG%3A26986

Discussion

  • Jukka Rahkonen

    Jukka Rahkonen - 2010-05-21

    A sketch about new GUI panel

     
  • Jukka Rahkonen

    Jukka Rahkonen - 2010-05-21

    GUI for editing additional parameters

     
  • Jukka Rahkonen

    Jukka Rahkonen - 2010-05-21

    Strings should be captured this way:
    - STYLES is a compulsory parameter and OJ is now sending it always as empty
    &STYLES=
    User input should be taken as a text and added.

    - If SLD is selected then the additional string should be
    &SLD=[URL_given_ by_the_user]

    - SLD_BODY is long and ugly text. User should have is stored always on a disk as plain text and already correctly url-encoded. If SLD_BODY is selected OpenJUMP would build a string as
    &SLD_BODY=[plain_text_from_a_pointed_file]

    - vendor parameters should be added just as the user input string is

     

Log in to post a comment.