9

This works: http://mrdata.usgs.gov/services/sc?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=256&HEIGHT=256&FORMAT=image/png&BBOX=-83.4,32,-78.4,35.3&LAYERS=South_Carolina_Lithology&SRS=EPSG:4326&STYLES=

This does not (blank image): http://mrdata.usgs.gov/services/sc?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&WIDTH=256&HEIGHT=256&FORMAT=image/png&BBOX=-83.4,32,-78.4,35.3&LAYERS=South_Carolina_Lithology&CRS=EPSG:4326&STYLES=

Notice the 1.1.1 -> 1.3.0 and SRS->CRS are the only changes. Is this a problem with the service or is my second URL incorrect?

I've observed the same issue with other WMS services:

Works: http://mesonet.agron.iastate.edu/cgi-bin/mapserv/mapserv?map=/mesonet/www/apps/iemwebsite/data/wms/goes/conus_ir.map&SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=256&HEIGHT=256&FORMAT=image/png&TRANSPARENT=TRUE&BBOX=-126,24,-66,50&LAYERS=conus_ir_4km_900913,conus_ir_4km&SRS=EPSG:4326&STYLES=

Does not work (blank image): http://mesonet.agron.iastate.edu/cgi-bin/mapserv/mapserv?map=/mesonet/www/apps/iemwebsite/data/wms/goes/conus_ir.map&SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&WIDTH=256&HEIGHT=256&FORMAT=image/png&TRANSPARENT=TRUE&BBOX=-126,24,-66,50&LAYERS=conus_ir_4km_900913,conus_ir_4km&CRS=EPSG:4326&STYLES=

So I'm assuming it's an issue with my 1.3.0 URLs.

6

The difference between WMS 1.1.1 and 1.3.0 is two fold.

CHANGE NO 1 - CRS/SRS Usage

Use SRS for 1.1.1

Use CRS for 1.3.0

CHANGE No 2 - WMS 1.3.0 ONLY

The order of parameters for BBOX depends on whether the CRS definition has flipped axes. You will see this in the GetCapabilities request at 1.3.0 - the response should show the flipped axes.

BBOX=xmin,ymin,xmax,ymax NON-FLIPPED

BBOX=ymin,xmin,ymax,xmax FLIPPED

I have made a list of EPSG codes that need to be flipped by creating a SpatiaLite 4.3.0 database and then saving this SQL request to file:

SELECT auth_srid, has_flipped_axes, ref_sys_name, axis_1_name, axis_1_orientation, axis_2_name, axis_2_orientation FROM "spatial_ref_sys_all" WHERE auth_name = "epsg";

You will then see that EPSG:4326 needs to have flipped axes.

4326 1 WGS 84 Latitude North Longitude East

THIS IS THE CORRECTED 1.3.0 REQUEST

Change is BBOX=24,-126,50,-66

http://mesonet.agron.iastate.edu/cgi-bin/mapserv/mapserv?map=/mesonet/www/apps/iemwebsite/data/wms/goes/conus_ir.map&SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&WIDTH=256&HEIGHT=256&FORMAT=image/png&TRANSPARENT=TRUE&BBOX=24,-126,50,-66&LAYERS=conus_ir_4km_900913,conus_ir_4km&CRS=EPSG:4326&STYLES=

|improve this answer|||||
  • Strictly this answer is not quite correct, it's not x and y that are flipped, it's the definition of x and y. The BBOX is still xmin,ymin,xmax,ymax in WMS 1.3.0. In a WMS x is the first axis and y is the second axis. In WMS 1.3.0 the order of the axes as defined by the CRS authority are used. In EPSG:4326 the authority (EPSG) define the first axis (x) as latitude, and (y) is longitude. WMS 1.1.1 ignored CRS axis order, and wrongly defined EPSG:4326 as long/lat. – nmtoken Jan 28 at 19:57
6

Replace EPSG:4326 with CRS:84 and it works in both instances:

http://mrdata.usgs.gov/services/sc?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&WIDTH=256&HEIGHT=256&FORMAT=image/png&BBOX=-83.4,32,-78.4,35.3&LAYERS=South_Carolina_Lithology&CRS=CRS:84&STYLES&

http://mesonet.agron.iastate.edu/cgi-bin/mapserv/mapserv?map=/mesonet/www/apps/iemwebsite/data/wms/goes/conus_ir.map&SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&WIDTH=256&HEIGHT=256&FORMAT=image/png&TRANSPARENT=TRUE&BBOX=-126,24,-66,50&LAYERS=conus_ir_4km_900913,conus_ir_4km&CRS=CRS:84&STYLES&

It's possibly worth noting this works because in WMS 1.1.1 EPSG:4326 is wrongly defined as having long/lat coordinate axes. In WMS 1.3.0 the correct axes lat/long are used.

CRS:84 is defined by OGC as having the same datum as EPSG:4326 (that is the World Geodetic System 1984 datum ~ EPSG::6326) but axis order of long/lat.

CRS:84 was introduced with the publication of the WMS 1.3.0 specification, to overcome this issue.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.