[mapserver-users] Raster input file delete access prohibited by MapScript

Frank Warmerdam warmerdam at pobox.com
Fri Jan 21 09:59:28 EST 2011


On 11-01-20 10:13 AM, Anzel, Phil - Fort Collins, CO wrote:
> All,
>
> I have an application that uses the MapScript API under C# to create map
> images. Without exiting the application, I need to delete the input raster
> (JPEG) files that have been used in the image creation. Deletion of the
> input files is not possible until the application terminates.
...
> Can you help? I'm guessing that the input JPG file is opened for reading by
> MapServer and is never explicitly closed, even when the layer is closed. Is
> there a method defined in the API that will force the closure, if that is
> even the situation?

Phil,

In recent versions MapServer aggressively keeps single raster files used for
raster layers open even after the map is destroyed in order accelerate the
next access to it.  This can be controlled/disabled by adding the following
line in your raster layer:

   PROCESSING "CLOSE_CONNECTION=NORMAL"

The default setting is DEFER for raster files.

Best regards,
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list