Take the 2-minute tour ×
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 having trouble with my web-based application, where my tmp images are not being stored for later retrieval. The images are generated each time they have to be loaded, so zooming out and then back in to the same location requires mapserv.exe to re-generate the tiles for that view.

The application lives here: http://rinnerweb.arts.ryerson.ca/moot2

A sample map file snippet is below:

    OUTPUTFORMAT                                        #-> BEGIN OUTPUT FORMATTING DEFINITION
        NAME "png"                                      # Name of format
        DRIVER AGG/PNG                                  # Image driver
        MIMETYPE "image/png"                            # Type of image
        IMAGEMODE RGBA                                  # Image mode
        EXTENSION "png"                                 # Image filetype
        TRANSPARENT ON                                  # Transparency
    END                                                 #-> END OUTPUT FORMATTING DEFINITION

    WEB                                                 #-> BEGIN WEB DEFINITION
        IMAGEPATH "/ms4w/tmp/ms_tmp/"
        IMAGEURL "/ms_tmp/"
    END                                                 #-> END WEB DEFINITION

The web page's source will show the OpenLayers init code, but I've pasted some sample layer init code below:

hii_1 = new OpenLayers.Layer.MapServer("Land Cover","../../cgi-bin/mapserv.exe",{
    map:'C:/ms4w/Apache/htdocs/hii/hii_landcover.map'},{
    isBaseLayer:false,
    transparent:true,
    format:"image/png",
    alpha:true,
    displayInLayerSwitcher:false
    });

Any ideas?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

The temp files are automatically deleted by MapServer. If you want to cache generated images you should look at something like TileCache, MapProxy, or the MapServer's new MapCache.

share|improve this answer
    
thanks. learn something new everyday! would you recomend one over the other? I have 6 geotiff files being rendered by mapserver that are 65mb each. as far as raster optimization goes, they are tiled, 8bit and projected correctly. cheers. –  Michael Markieta Jan 18 '12 at 6:25
add comment

Your Answer

 
discard

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.