[Mapserver-users] PostGIS/Mapserv problem with type MULTIPOLYGON.

Thierry Lombardot tlombard at mpi-bremen.de
Tue Sep 9 10:45:38 EDT 2003


Thank you Vinko,

Here is a part of my map file:

####################
[...]

LAYER
   NAME Lakes_quality
   CONNECTIONTYPE postgis
   CONNECTION "user=mapserver password='XXX' dbname=mm host=localhost"
   DATA "the_geom from lake_quality_po"
#  FILTER "_labelid < 1500"
#  DEBUG
   TYPE POLYGON
   STATUS ON

   CLASS
     NAME 'Lakes_quality'
#    TEMPLATE "lakespy2.html"
#    EXPRESSION ([_polygonid] <= 500)
     COLOR 0 0 255
#    SYMBOL "disk"
#    SIZE 2
   END

#  HEADER "lakespy2_header.html"
#  FOOTER "lakespy2_footer.html"

#  TOLERANCE 3

#  DUMP TRUE # allow GML export

#  METADATA
#    WMS_TITLE "Water Bodies 2"
#    WMS_ABSTRACT "XX"
#    WMS_SRS "XX"
#  END

END # Layer Lakes_quality

[...]
####################



and my postgres structure (from a shp2sql import):

####################
table lake_quality_po
***columns:
gid
id
ims_id
lake
geo_reg
gems_name
area
volume
max_depth
residence
tds
na_plus
k_plus
ca_plus_plus
mg_plus_plus
so4_minus_minus
cl_minus
hco3_minus
sio2
po4_p
no3_n
the_geom

***first line:
0
129
12
Aral Sea
Europe
Aral
64100
1020
68
20
10500
-9999
-9999
-9999
-9999
-9999
-9999
-9999
-9999
-9999
-9999
SRID=-1;MULTIPOLYGON(((60.903450012207 46.1099090...
###################

Do you see someting wrong?

Thx

Thierry.




Vinko Vrsalovic wrote:
> On Tue, Sep 09, 2003 at 02:17:01PM +0200, Thierry Lombardot wrote:
> 
>>Dear Mailling list,
>>I get a problem with PostGIS/Mapserv:
>>
>>If a geometry column of a table contains a type "MULTIPOLYGON", I can't
>>draw it with mapserv. I tried the types: LINE or POLYGON within my map
>>file, but the same error comes up in my apache error_log:
>>
>>[Tue Sep  9 13:56:22 2003] [error] [client 127.0.0.1] Premature end of
>>script headers: /srv/www/cgi-bin/mapserver/mapserver-4.0/mapserv
>>
>>Do I have to convert multipolygons is separated polygons? Is there a
>>PostGIS function to do that?
> 
> 
> Are you sure that's the reason? It would help if you send us the mapfile
> with the query you're using and how's the data structured on the DB. 
> 
> Maybe you're missing selecting some data needed by the layer definition
> (that has been my experience with that error, it always is something
> wrong/missing in the query).
> 
> I've drawn multipolygon layers thousands of times with 4.0 and PostGIS
> CVS :-)
> 
> Good luck,






More information about the mapserver-users mailing list