[Mapserver-users] Error message using PostGis
Gabriel Vieira Ferrari
gabriel at ciasc.gov.br
Tue Jul 22 07:36:18 PDT 2003
Hi listers.
Is the first time I'm use Postgres/Posgis with MapServer and receive this
error MSG:
==>> msDrawMap(): Image handling error. Failed to draw layer named
'cidadept0'.
But the original shp file are read without error.
Complementary information:
Postgres/Postgis is: VERSION: 0.7.5 (2003/04/08)
MapServer is:
MapServer version 4.0-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
MAP file:
CONNECTION "user=postgres password=xxx dbname=mapserver host=xxxx"
DATA "the_geom from cidade_p"
I import shp files with:
$ shp2pgsql -d ../mapserver/data/cidade_p cidade_p mapserver|psql -d
mapserver (point data)
$ shp2pgsql ../mapserver/data/politico2001 sc2001 mapserver |psql -d
mapserver (polygon data)
$ shp2pgsql -d ../mapserver/data/politico2001 sc2001 mapserver |psql -d
mapserver (polygon data)
mapserver=# \dt
List of relations
Schema | Name | Type | Owner
--------+------------------+-------+----------
public | cidade_p | table | postgres
public | geometry_columns | table | postgres
public | politicotable | table | postgres
public | sc2001 | table | postgres
public | sc97 | table | postgres
public | spatial_ref_sys | table | postgres
(6 rows)
mapserver-# \d cidade_p
Table "public.cidade_p"
Column | Type | Modifiers
----------+-------------------+-----------
gid | integer |
id | integer |
nm_munic | character varying |
munic_02 | character varying |
ptot2001 | bigint |
the_geom | geometry |
Check constraints: "$1" (srid(the_geom) = -1)
"$2" ((geometrytype(the_geom) =
'POINT'::text) OR (the_geom IS NULL))
More information about the MapServer-users
mailing list