Re: [mapserver-users] Map rendering correctly with shp2img but blank when using WMS

2018-02-12 Thread Seth G
Hi,

Syntax looks fine to me. 
Could there be an issue accessing the Mapfile using the web
service account?Can you run a profiler on the database to see if it is being 
hit at all?
The results of this would reduce the list of possible issues.
Regards,

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Mon, Feb 12, 2018, at 5:05 PM, Pablo Sanfilippo wrote:
> This is the command I'm using that renders fine:
> shp2img \ -m /maps/config.map \ -o /sources/testb.png \ -e -
> 118.41347694396971 33.919930516263086 -118.40274810791016
> 33.92787160756615 \ -s 500 500 \ -l mylayer \ -all_debug 5 \> And this WMS 
> request renders a transparent image:
> 
> http://localhost:8080/?map=/maps/config.map=WMS=1.1.1%20=GetMap=mylayer==EPSG:4326=-118.41347694396971,33.919930516263086,-118.40274810791016,33.92787160756615=500=500=image/png>
>  
> This is my mapfile:
> 
> # A valid mapfile used for testing
> MAP
>   NAME valid
>   STATUS ON
>   PROJECTION
> "init=epsg:4326"
>   END
> 
>   # IMAGECOLOR 0 0 0
>   TRANSPARENT ON
> 
>   WEB
> METADATA
>   "wms_title"   "Slingshot WMS Server"
>   "wms_onlineresource"  "http://localhost:8080/?map=config.map&;
>   "wms_enable_request"  "GetCapabilities GetMap GetFeatureInfo"
>   "wms_srs" "EPSG:4326 EPSG:3857"
>   END
>   END
> 
>   LAYER
> NAME "myindex"
> STATUS ON
> TYPE POLYGON
> CONNECTIONTYPE POSTGIS
> CONNECTION "mypostgisconnection"
> DATA "geometry from (select i.geometry, i.id, '/sources/' ||
> i.path as location from images_image) as myindex using unique id"> 
> CLASS
>   STYLE
> OUTLINECOLOR 0 0 0
> COLOR 0 255 0
> WIDTH 1.0
> ANTIALIAS true
>   END
> END
>   END
> 
>   LAYER
> NAME "mylayer"
> STATUS ON
> TILEINDEX "myindex"
> TILEITEM "location"
> PROCESSING "SCALE=AUTO"
> TYPE RASTER
> PROJECTION
>   AUTO
> END
> METADATA
>   "wms_title"   "My Imagery"
> END
>   END
> 
> END
> 
> I'm using MapServer 7.0.1
> 
> Thanks!
> _
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Map rendering correctly with shp2img but blank when using WMS

2018-02-12 Thread Pablo Sanfilippo
This is the command I'm using that renders fine:

shp2img \
-m /maps/config.map \
-o /sources/testb.png \
-e -118.41347694396971 33.919930516263086 -118.40274810791016
33.92787160756615 \
-s 500 500 \
-l mylayer \
-all_debug 5 \

And this WMS request renders a transparent image:

http://localhost:8080/?map=/maps/config.map=WMS=1.1.1%20=GetMap=mylayer==EPSG:4326=-118.41347694396971,33.919930516263086,-118.40274810791016,33.92787160756615=500=500=image/png

This is my mapfile:

# A valid mapfile used for testing
MAP
  NAME valid
  STATUS ON
  PROJECTION
"init=epsg:4326"
  END

  # IMAGECOLOR 0 0 0
  TRANSPARENT ON

  WEB
METADATA
  "wms_title"   "Slingshot WMS Server"
  "wms_onlineresource"  "http://localhost:8080/?map=config.map&;
  "wms_enable_request"  "GetCapabilities GetMap GetFeatureInfo"
  "wms_srs" "EPSG:4326 EPSG:3857"
  END
  END

  LAYER
NAME "myindex"
STATUS ON
TYPE POLYGON
CONNECTIONTYPE POSTGIS
CONNECTION "mypostgisconnection"
DATA "geometry from (select i.geometry, i.id, '/sources/' || i.path as
location from images_image) as myindex using unique id"
CLASS
  STYLE
OUTLINECOLOR 0 0 0
COLOR 0 255 0
WIDTH 1.0
ANTIALIAS true
  END
END
  END

  LAYER
NAME "mylayer"
STATUS ON
TILEINDEX "myindex"
TILEITEM "location"
PROCESSING "SCALE=AUTO"
TYPE RASTER
PROJECTION
  AUTO
END
METADATA
  "wms_title"   "My Imagery"
END
  END

END

I'm using MapServer 7.0.1

Thanks!
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users