Mapserver 4.4.1 with postgis 1rc3
Steven Bowden
steveb at BUNDABERG.QLD.GOV.AU
Mon Mar 14 21:11:34 PST 2005
Hi List,
I am in the process of upgrading from mapserver 3.6.6 and postgis 0.7.1
running on the one machine to mapserver 4.4.1 and postgis 1rc3, both running
on separate machines.
I have pretty much got the upgrade of mapserver working ok but I am having
troubles getting the upgrade of postgis working. I can get my mapserver3
and mapserver4 app working using postgis 0.7.1 but I can't get any data
layers drawing from postgis1rc3.
Mapserver config
MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
Layer config in map file
LAYER
NAME house_nos
CONNECTIONTYPE postgis
CONNECTION "user=xxx dbname=xxx host=xxx"
TYPE annotation
DEBUG on
STATUS on
DATA "the_geom from housenos"
LABELITEM "tag"
LABELMAXSCALE 1500
LABELCACHE on
CLASS
LABEL
TYPE truetype
POSITION CC
FONT f16
FORCE true
ANTIALIAS true
SIZE 10
COLOR 254 0 0
OUTLINECOLOR 254 254 254
END
END
END
I suspect that it is something to do with the way that the geometry is
stored in postgres. In postgis 0.7.1 it is stored as what I assume is the
well known text format but in postgis1rc3 it looks like it is stored in well
known binary format.
So my questions are:
Will mapserver 4.4.1 work with postgis1rc3?
If so what other options do I need to enable in the configuration of
mapserver?
Is it possible to mix and match mapserver postgis layers between the
different postgis versions? ie Layer 1 connects to postgis 0.7.1 and Layer 2
connects to postgis1rc3 both to be drawn on the one map.
Here is a sample of how the data is stored in postgis 0.7.1
select * from housenos ;
gid | tag | the_geom
-------+------+-------------------------------------------
0 | 62 | SRID=-1;POINT(433634.63353 7252530.30099)
1 | 60 | SRID=-1;POINT(433632.24681 7252510.01592)
2 | 58 | SRID=-1;POINT(433629.46231 7252490.52634)
Here is how it is stored in postgis1rc3
select * from housenos ;
gid | tag | the_geom
-----+------+--------------------------------------------
0 | 62 | 01010000009C16BC888A771A41906B43938CAA5B41
1 | 60 | 0101000000B9C2BBFC80771A4152D5048187AA5B41
2 | 58 | 0101000000EACA67D975771A41F88DAFA182AA5B41
And here is how it is when it is returned as text
select gid, tag, astext(the_geom) from housenos ;
gid | tag | astext
-----+------+-----------------------------------
0 | 62 | POINT(433634.63353 7252530.30099)
1 | 60 | POINT(433632.24681 7252510.01592)
2 | 58 | POINT(433629.46231 7252490.52634)
So I am pretty sure that my postgis setup is ok.
Any suggestions would be greatly appreciated.
Regards
Steve
More information about the MapServer-users
mailing list