[postgis-users] Fw: Mapserver displays an empty map using layer from postgis

Ben Madin ben at ausvet.com.au
Sun Mar 8 19:51:08 PDT 2015


Your bounding box in the uri (5,97,21,106):

a) is invalid / unrealistic for WGS84 coordinates, and  / or

b) doesn't / wouldn't include your layer extent -17.9334 30.5019 -17.7303
30.8789

hth

On 6 March 2015 at 16:04, Ronald Muchini <ronaldmuchini at yahoo.com> wrote:

>
>
> --- On Fri, 3/6/15, Ronald Muchini <ronaldmuchini at yahoo.com> wrote:
>
> > From: Ronald Muchini <ronaldmuchini at yahoo.com>
> > Subject: Mapserver displays an empty map using layer from postgis
> > To: "ms4w_users" <ms4w-users at lists.maptools.org>
> > Cc: "ms4w_users" <ms4w-users at lists.maptools.org>
> > Date: Friday, March 6, 2015, 12:02 AM
> > I have a raster layer in postgis,
> > which I'm trying to display it in the browser using the
> > following code. My Postgis is Installed in the directory,
> > "C:\Program Files(x86)\PostgreSQL\9.3\bin" and mapsever
> > directory is "C:\ms4w".
> >
> >
> > MAP
> > NAME "Lakes"
> > IMAGECOLOR 255 255 255
> > SIZE 600 800
> > IMAGETYPE PNG24
> > PROJECTION
> >     "init=epsg:4326"
> > END
> > EXTENT -17.9334 30.5019 -17.7303 30.8789
> > WEB
> >     METADATA
> >         "ows_enable_request"
> > "*"
> >         "map"
> > "C:/ms4w/apps/Lakes/configpg.map"
> >         "ows_schemas_location"
> > "http://schemas.opengeospatial.net"
> >         "ows_title"
> > "LakesWMS"
> >         "ows_onlineresource"
> > "
> http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Lakes/configpg.map&"
> >         "ows_srs" "EPSG:4326 "
> > #latlon
> >
> > "wms_feature_info_mime_type" "text/plain"
> >
> > "wms_feature_info_mime_type" "text/html"
> >         "wms_server_version"
> > "1.3.0"
> >         "wms_formatlist"
> > "image/png,image/gif,image/jpeg"
> >         "wms_format"
> > "image/png"
> >     END #metadata
> > END #web
> > LAYER
> >     NAME "ras"
> >     TYPE RASTER
> >     STATUS ON
> >     CONNECTIONTYPE postgis
> >     CONNECTION "user=postgres password=magodo
> > dbname=wqm host=localhost port=5432 options='-c
> > client_encoding=UTF8'"
> >     DATA "geometry FROM testras9 USING UNIQUE
> > id USING srid=4326"
> >     METADATA
> >         "ows_title" "ras"
> >         "ows_extent" "
> > -17.9334 30.5019 -17.7303 30.8789"
> >     END #metadata
> >     PROJECTION
> >         "init=epsg:4326"
> >     END
> >     CLASS
> >         NAME "ras"
> >         OUTLINECOLOR 255 255
> > 255
> >         COLOR 137 205 102
> >     END #class ras
> > END #layer ras
> > END #map
> >
> >
> >
> > Im calling the webpage using the url below:
> > "
> http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Lakes/config.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=ras&STYLES=&CRS=EPSG:4326&BBOX=5,97,21,106&WIDTH=600&HEIGHT=800&FORMAT=image/png
> "
> >
> >
> > No errors pop up but the browser displays an empty map
> > space.
> > How can I resolve this issue
> >
> > Thanks in advance
> >
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 

Ben Madin
BVMS PhD, MANZCVS

t : +61 8 6102 5535
m : +61 448 887 220
e : ben at ausvet.com.au

AusVet Animal Health Services
Western Australia

www.ausvet.com.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150309/f796d6b4/attachment.html>


More information about the postgis-users mailing list