Opened 15 years ago

Closed 15 years ago

#3068 closed defect (fixed)

Non-conformant behaviour with WMS 1.3.0 GetCapabilities response

Reported by: jpassmore Owned by: mapserverbugs
Priority: normal Milestone: 5.6 release
Component: WMS Server Version: 5.4
Severity: major Keywords: WMS BoundingBox GetCapabilities
Cc: assefa, nsavard

Description

Required BoundingBox element is not returned in the WMS 1.3.0 GetCapabilites response when using a projection not defined in the proj.4 files.

<cite> OGC(r) 06-042 7.2.4.6.8 BoundingBox WMS service metadata shall declare one or more bounding boxes (as defined in 6.7.4) for each Layer. </ite>

Example

A map file beginning:

MAP
   NAME "ONEGEOLOGY"
   STATUS on
   SIZE 800 400
   EXTENT 59.7812 26.9152 75.5985 40.9476
   UNITS dd	
   SHAPEPATH "data"
   IMAGECOLOR 255 255 255
   IMAGETYPE png
   RESOLUTION 96
   PROJECTION
	# we created a file 'crs' put in the nad folder 
        # and copied the epsg 4326 content from the epsg file
	"init=crs:84"
   END #projection
   DEBUG on
	
   OUTPUTFORMAT
     NAME png
     DRIVER "GD/PNG"
     MIMETYPE "image/png"
     IMAGEMODE RGBA
     EXTENSION "png"
   END
	
   WEB
      HEADER "myheader..."
      FOOTER "myfooter..."   
      IMAGEPATH "mypath..."
      IMAGEURL "myvirtualdir..."  
      LOG "pathtolog"
         METADATA 
	      MAX_EXTENTS "59.443 26.4857 75.7411 41.2513"
	      OWS_TITLE "AGS Bedrock and Structural geology"
	      OWS_ABSTRACT "AGS 1:1 million scale ..."
              OWS_KEYWORDLIST "OneGeology..."
	      OWS_CONTACTPERSON "The Director General"
	      OWS_CONTACTORGANIZATION "Afghanistan Geological Survey"
	      OWS_ADDRESSTYPE "postal"
	      OWS_ADDRESS "Afghanistan Geological Survey building,..."
	      OWS_CITY "Kabul"
	      OWS_STATEORPROVINCE "Kabul"
	      OWS_POSTCODE "District 9"
	      OWS_COUNTRY "Afghanistan"
	      OWS_FEES "none"
	      OWS_ACCESSCONSTRAINTS "..."
	      OWS_FEATURE_INFO_MIME_TYPE  "text/html"
	      OWS_SRS "CRS:84 EPSG:32641 EPSG:32642 EPSG:32643"
	   END #metadata 
	END #web
	
	LEGEND
         OUTLINECOLOR 200 200 200
         KEYSPACING 10 10
         LABEL
            TYPE bitmap
            SIZE small
         END #Label
      END #Legend

	LAYER
	   NAME "AFG_AGS_1M_BLS"
	   GROUP "Bedrock"
	   DATA "1MgeolbyLCe4326"
	   TYPE polygon
	   STATUS off	
           #TRANSPARENCY 100
           OPACITY 100
           TOLERANCE 0
           TOLERANCEUNITS pixels
           TRANSFORM true
           DUMP true # return GML format
           HEADER "mypath..."
           TEMPLATE "mypath..." 			
		
   PROJECTION
      "proj=longlat"
      "ellps=WGS84"
      "datum=WGS84"
      "no_defs"
   END #projection
		
   METADATA
       	GML_INCLUDE_ITEMS "L_CODE"
	GML_FEATUREID "GID"
	OWS_TITLE "AFG AGS 1:1M Bedrock Lithostratigraphy"       	
        OWS_SRS "CRS:84 EPSG:32641 EPSG:32642 EPSG:32643"
...

returns:

http://194.66.252.156/cgi-bin/AGS_Bedrock_and_Structural_Geology/wms?service=WMS&version=1.3.0&request=GetCapabilities&

Change History (5)

comment:2 by jpassmore, 15 years ago

I'm reading the above clarification as, the WMS 1.3.0 schema cannot fully define the nuances of the specification, that this will always be the case, and there is no need to put in a change request to OGC WMS 1.4 draft in an attempt to resolve this issue.

I reading too that this confirms that the WMS 1.3.0 GetCapabilities response is non-conformant in this example, because according to the specification BoundingBox must be returned.

I'm not certain if I should be reading that, because the of the schema problem this issue can't be resolved in MapServer WMS.

comment:3 by tomkralidis, 15 years ago

Cc: assefa nsavard added

We ran this through the CITE WMS 1.3.0 tests and this did not come out as an issue. When the CITE assertions are updated and this is recognized as an issue, I think that's a good time to update things. At this point, I don't see this as a defect.

Can you not use EX_GeographicBoundingBox to accomplish the same info?

in reply to:  3 comment:4 by tomkralidis, 15 years ago

Can you not use EX_GeographicBoundingBox to accomplish the same info?

Ooops, sorry, ignore that comment. You can also use WxS mapscript to push out BoundingBox as well.

comment:5 by dmorissette, 15 years ago

Milestone: 5.6 release
Resolution: fixed
Status: newclosed

This may be more an annoyance than an actual compliance issue, but I think we should do something about it.

I have committed a simple fix in SVN trunk r9308 so that msOWSGetEPSGProj() recognizes CRS:xx codes in addition to EPSG:xx codes.

Note that a mapfile using "init=crs:84" like yours at the top level will not produce a valid GetCapabilities for WMS 1.0.0 to 1.1.1 since CRS:84 is not recognized in those older versions of the WMS spec, so for real compliance with multiple WMS versions it is still better that you use an "init=epsg:..." code for your default projection since that is supported by all versions of the WMS spec". I have created ticket #3126 about skipping CRS:xx codes in WMS 1.0.0-1.1.1 GetCapabilities.

Note: See TracTickets for help on using tickets.