New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTFGrid driver doesn't specify GetMap format application/json in Capabilities #5560

Closed
AxxL opened this Issue Mar 8, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@AxxL

AxxL commented Mar 8, 2018

I have implemented a simple service with some points and specified an UTFGrid. Problem is, the output-format "application/json" is not specified in the Capabilities. A client can not determine if the service supports UTFGrid or not. I can send a WMS Request with FORMAT="application/json" although it's like a shot in the dark. My proposal: If I define a driver UTFGrid in my mapfile, the corresponding mimetype should be placed in the GetMap Formats section of the capabilities.

Steps to reproduce

I have defined a service with a UTF-Grid output.

OUTPUTFORMAT                                                                                                                                                                                                                                 
    NAME 'UTFGrid'                                                                                                                                                                                                                           
    DRIVER 'UTFGrid'                                                                                                                                                                                                                         
    FORMATOPTION "UTFRESOLUTION=4"                                                                                                                                                                                                           
    FORMATOPTION "DUPLICATES=false"   
END

[...]

LAYER                                                                                                                                                                                                                                        
    NAME "Kundenpunkte"                                                                                                                                                                                                                      
[...]                                                                                                                                                                                                                                             
    UTFITEM   "id"                                                                                                                                                                                                                           
    UTFDATA   "{\"id\":\"[id]\",\"name\":\"[name_k]\"}"    
[...]

Works, if I use my internal example request. I get an UTF-Grid and everythings fine.

Observed problem

This outputformat application/json is not part of the WMS Capabilities:

<WMS_Capabilities>
  <Capability>
    <Request>
      <GetMap>
        <Format>image/png</Format>
        <Format>image/jpeg</Format>
        <Format>image/png; mode=8bit</Format>
        <Format>application/x-pdf</Format>
        <Format>image/svg+xml</Format>
        <Format>image/tiff</Format>
[...]

Therefore I can't determine if a service supports UTFGrid or not and if I can ask as a client for the format application/json.

What I expect to happen and how I workaround at it

I expect to have this definition of the output-format application/json in the GetMap section of my Capabilities:

<GetMap>
  [...]
  <Format>application/json</Format>
  [...]

Right now I get this by defining the output-formats by hand in the WEB-METADATA section of my mapfile:

wms_getmap_formatlist" "image/png,image/jpeg,image/png; mode=8bit,application/x-pdf,image/svg+xml,image/tiff,application/json"     

Proposal

I expect it to happen automatically if I define the driver. You can even define the mimetype for yourself. Which could be also part of the Capabilities.

@rouault rouault closed this in e78e26f Mar 8, 2018

rouault added a commit that referenced this issue Mar 8, 2018

rouault added a commit that referenced this issue Mar 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment