Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to display a raster image with Mapserver using different bbox arguments in a mapserv cgi request. I have been trying to specify different bbox arguments to "crop" the raster display, but mapserver returns the full map ignoring the bbox argument.

How can I corectly specify the bounding box to display the raster?

The following example call renders the map at its full extent, although only a small part is requested,0,10,10&WIDTH=128

Here is the mapfile I am using:

SHAPEPATH     "shapefiles"
EXTENT        -180 -90 180 90
SIZE          400 200
IMAGECOLOR    255 255 255
UNITS         DD
STATUS        ON
DEBUG         ON


    NAME      "HYP_50M_SR_W"
    DATA      HYP_50M_SR_W/HYP_50M_SR_W.tif
    STATUS    ON
    TYPE      RASTER
share|improve this question

1 Answer 1

up vote 4 down vote accepted

You request is a WMS request, but you have not completed the required configuration in the map file. In fact the map file that you have posted is only good for cgi usage through mapserver's own url format.

You can either add the required WMS params to the map file and keep invoking mapserver as a WMS server (I would recommend this approach):

or change your URL so that it conforms to mapserver's own standard and do away with the map file changes. A sample application that you can use to infer the actual URL can be found here:

share|improve this answer
thanks a lot, this was what I needed to know. – yellowcap Nov 7 '11 at 8:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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