[Qgis-user] UMN Mapserver & PostgreSQL-PostGIS - Fails to draw layers
pcreso at pcreso.com
pcreso at pcreso.com
Wed May 18 00:14:43 PDT 2011
Hi,
Probably more appropriate in the postgis or mapserver lists...
Postgres doesn't like table or column names in upper case. In such cases they need to be wrapped in double quotes to prevent them being converted to lower case.
Try a slightly different DATA statement:
DATA 'the_geom FROM "Regions"'
or
DATA 'the_geom FROM (select * from "Regions") as myquery using unique gid using srid=4326'
As this is a QFGIS list :-)
I find that opening the layer in QGIS & looking at the metadata for the layer, it will give you query string. Change GetFeature to GetMap & paste it into your browser. You'll see the mapserver error message. Or look in the mapserver logs if you have error logging enabled.
HTH,
Brent Wood
--- On Wed, 5/18/11,
Langen Mallya <cutlan at gmail.com> wrote:
From: Langen Mallya <cutlan at gmail.com>
Subject: [Qgis-user] UMN Mapserver & PostgreSQL-PostGIS - Fails to draw layers
To: qgis-user at lists.osgeo.org
Date: Wednesday, May 18, 2011, 6:28 PM
Hi everybody,
I have a question about MapServer and PostGIS.
Im working on a project which involves OpenSource. I have managed to plot nearly all layers except three. after 1 month of trying there is no hope for these 3 layers to display, but the layers are loaded well in QGIS.
I have tried to delete the layers and load it again in the server, still the same problem.
see the mapserver layer code below and for regions(fails to display) & Intl. boundaries (Display well)
#=============================================================
LAYER
NAME 'Region'
TYPE POLYGON
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
EXTENT 24.162085 -12.027731 45.340160 -0.726251
CONNECTIONTYPE postgis
CONNECTION "dbname='ttaf' host=127.0.0.1 port=5432 user='XXXXXXX' password='XXXXXXX' sslmode=disable"
DATA "the_geom FROM Regions"
METADATA
'ows_title' 'Region'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'Region'
STYLE
WIDTH 1
OUTLINECOLOR 100 0 0
END
END
END
#=============================================================
LAYER
NAME 'Intl._Boundary'
TYPE POLYGON
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
EXTENT 24.162085 -12.027731 45.340160 -0.726251
CONNECTIONTYPE postgis
CONNECTION "dbname='ttaf' host=127.0.0.1 port=5432 user='XXXXXXX' password='XXXXXXXXX' sslmode=disable"
DATA 'the_geom FROM tzbord'
METADATA
'ows_title' 'Intl._Boundary'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'Intl. Boundary'
STYLE
WIDTH 2
OUTLINECOLOR 0 0 0
END
END
END
#=============================================================
Hope to have answers from you.
--
Langen R. M. Mallya,
Chief Consultant,
Cutlan Consultant,
Makuyuni, Monduli,
P.O.Box 16967,
Arusha,
Tanzania.
Phone #: +255-78-444-5465
Phone #: +255-76-866-0802
Phone#: +255-71-940-6096
Fax #: +255-78-744-5465
e-mail: info at cutlan.co.tz
e-mail: cutlan at gmail.com
http://www.cutlan.co.tz
-----Inline Attachment Follows-----
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110518/4aaa0da6/attachment.html>
More information about the Qgis-user
mailing list