[mapserver-users] shp2img working, mapserv not

Oliver Christen oliver.christen at camptocamp.com
Fri Jul 4 00:46:44 PDT 2014


open your .dbf file and look at the paths inside (the file is binary but the path are readable), the paths must be something mapserver can find based on your mapfile SHAPEPATH, otherwise Mapserver will not succeed to access the related images.
I would advice using the -write_absolute_path option (if thats not already the case)



> Hi all,
>
> thanks in advance for any help on this.  I've been trying to create a layer
> of tiled geotiffs.  I made a .shp file index with gdaltindex and am
> referencing this in the layer.  When I run shp2img locally I get a correct
> .png image, but when I try to call mapserv from a web browser with the url:
>
> http://192.168.1.200/cgi-bin/mapserv?map=/var/www/html/topex/srtm.map&layer=SRTM30_plus&mode=map
>
> I get the following error:
>
> msDrawMap(): Image handling error. Failed to draw layer named 'SRTM30_Plus'.
> msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing
> file '/var/www/html/topex/../../data/SRTM/srtm30_plus_geotiff/topoN0E0.tiff'
> for layer 'SRTM30_Plus'.
>
> I have the same results trying to look at each of the GeoTIFFs individually.
> Here is the mapfile I'm working with:
>
> MAP
>    NAME Global_Grid
>    SIZE 1200 600
>    UNITS dd
>    EXTENT -180 -84 180 84
>    CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt"
>    DEBUG 5
>
>    LAYER
>       NAME SRTM30_Plus
>       STATUS DEFAULT
>       TYPE RASTER
>       TILEINDEX "../../data/SRTM/srtm_index.shp"
>    END
>
> END
>
> I suspect it may be a permissions problem with the apache server, but I am
> currently at a loss.  Any help would be appreciated.

-- 
Camptocamp SA
Oliver Christen
PSE A, EPFL
CH-1015 Lausanne

www.camptocamp.com



More information about the mapserver-users mailing list