[MS4W-Users] mapfile raster layer won't open local network shared tiff images

Jeff McKenna jmckenna at gatewaygeomatics.com
Wed Mar 23 20:28:27 UTC 2022


This one is tricky to test.  I honestly initially thought this was due 
to the new MapServer security settings, but I'm not so sure now.

I can definitely specify the network name for the machine, such as:

   LAYER
     ...
     CONNECTIONTYPE OGR
     CONNECTION "\\\\name\folder\demo.db"
     DATA "places"
   ...
   END

   - works fine at the commandline:
           map2img -m network.map -o ttt.png -all_debug 3
   - I assume the same will apply to GDAL/rasters
   - the 4 backslashes are required

Truthfully, I don't use IP addresses for calling my shared folders, here 
on MS4W/Windows, so I would need more time to examine this.

I'm sure others here will be able to give feedback, who regularly use 
local IPs for their network shares.


-jeff




-- 
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/



On 2022-03-19 12:30 a.m., Wz L via MS4W-Users wrote:
> In the map file, turning the |DEBUG ON| for LAYER and |DEBUG 5| for MAP, 
> the ms_error.txt reports the following:
> 
> [Sat Feb 26 10:41:48 2022].874000 msDrawRasterLayerLow(image): entering.
> [Sat Feb 26 10:41:48 2022].874000 msDrawRasterLayerLow(image): Filename is: //192.168.210.150/some/shared_dir/a_float_type_image.tif  <http://192.168.210.150/some/shared_dir/a_float_type_image.tif>
> [Sat Feb 26 10:41:48 2022].885000 msDrawRasterLayerLow(image): Path is: //192.168.210.150/some/shared_dir/a_float_type_image.tif  <http://192.168.210.150/some/shared_dir/a_float_type_image.tif>
> [Sat Feb 26 10:41:48 2022].923000 Corrupt, empty or missing file '//192.168.210.150/some/shared_dir/a_float_type_image.tif  <http://192.168.210.150/some/shared_dir/a_float_type_image.tif>' for layer 'image' ... ignoring this missing data.
> [Sat Feb 26 10:41:48 2022].923000 msDrawMap(): Layer 0 (image), 0.054s
> 
> However, placing the tif image in the shape data dir, OpenLayers show 
> correctly in the browser.
> 
> Also, |gdalinfo.exe 
> //192.168.210.150/some/shared_dir/a_float_type_image.tif 
> <http://192.168.210.150/some/shared_dir/a_float_type_image.tif>| reports 
> no error, as well as 
> |gdal.Open('//192.168.210.150/some/shared_dir/a_float_type_image.tif 
> <http://192.168.210.150/some/shared_dir/a_float_type_image.tif>')| in 
> python.
> 
> My guess is, somehow, in mapraster.c line: 650, |GDALOpenEx| returned 
> NULL for paths like 
> |//192.168.210.150/some/shared_dir/a_float_type_image.tif 
> <http://192.168.210.150/some/shared_dir/a_float_type_image.tif>|.
> 
> 
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.ms4w.com
> https://lists.ms4w.com/mailman/listinfo/ms4w-users



More information about the MS4W-Users mailing list