[postgis-users] Changed bahaviour of PostGIS confuses MapServer

Peter Hopfgartner peter.hopfgartner at r3-gis.com
Fri Dec 12 05:25:15 PST 2008


Dear MLs,

sorry for cross-posting to both, PostGIS and MS, but seems to rtouch both.

I've tried to install PostGIS 1.3.4 on a CentOS 5 server with MapServer 
5.2.1 and PostgreSQL 8.2.11.

the command:

 shp2img -l prova -e 1587541 5116731 1591730 5120008 -m prova.map > 
../../public/technet/test-<pgis-version>.png

with 1.3.3 gave the result shown in figure test-postgis-1.3.3-4.png (a 
simple line layer)

Upgrading to 1.3.4 the picture became as in test-postgis-1.3.4-1.png, an 
empty picture.

The relevant mapfile fragment is Mapfile.frag.txt, the SQL table 
definition is e405.sql, all objects are MULTILINESTRINGs [SELECT 
DISTINCT geometrytype(the_geom) FROM public.e405 results in 
MULTILINESTRING], the geometry column is registered as MULTILINESTRING 
in geometry_columns.

Running the MapServer query:

SELECT 
asbinary(force_collection(force_2d(the_geom)),'NDR'),common_uid::text 
from public.e405 WHERE (tiplinapp is not null) and (the_geom && setSRID( 
'BOX3D(1587541 5116702.44897959,1591730 
5120036.55102041)'::BOX3D,find_srid('','public.e405','the_geom') ))

changed for better result readability into:

SELECT AsEWKT(force_collection(force_2d(the_geom))),common_uid::text 
from public.e405 WHERE (tiplinapp is not null) and (the_geom && setSRID( 
'BOX3D(1587541 5116702.44897959,1591730 
5120036.55102041)'::BOX3D,find_srid('','public.e405','the_geom') ))

by hand gives slightly different results, as shown in the attached files.

To make a long story short, 1.3.4 seems to better preserve the 
MULTILINESTRING, but this seems to confuse MapServer.

Regards,

Peter

-- 
 
Dott. Peter Hopfgartner
 
R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgartner at r3-gis.com
Tel. : +39 0473 494949
Fax  : +39 0473 069902
www  : http://www.r3-gis.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-postgis-1.3.3-4.png
Type: image/png
Size: 10108 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081212/aed76e3e/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-postgis-1.3.4-1.png
Type: image/png
Size: 157 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081212/aed76e3e/attachment-0001.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Mapfile.frag.txt
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081212/aed76e3e/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: e405.sql
Type: text/x-sql
Size: 1787 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081212/aed76e3e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: psql-1.3.3-4_epel.csv
Type: text/csv
Size: 132730 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081212/aed76e3e/attachment.csv>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: psql-1.3.3-4_epel.ewkt.csv
Type: text/csv
Size: 99397 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081212/aed76e3e/attachment-0001.csv>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: psql-1.3.4-1_fc10-4+1.3.4.csv
Type: text/csv
Size: 155482 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081212/aed76e3e/attachment-0002.csv>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: psql-1.3.4-1_fc10-4+1.3.4.ewkt.csv
Type: text/csv
Size: 103811 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081212/aed76e3e/attachment-0003.csv>


More information about the postgis-users mailing list