[Mapserver-users] MapServer / PostGIS fetches wrong DATA

Uli Mueller uli.mueller at gmx.ch
Thu Apr 3 16:53:07 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C2FA3C.2C9FD810
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi

In my mapfile I use 3 PostGIS layers. First is of TYPE line, the following 2
are of TYPE point. Each is based on a shapefile of the same type and has
been imported through shp2pgsql.

Let me call the layers A,B,C. The strange thing that happens is that layer C
(TYPE point) fetches his data from the DATA definiton of layer B, if layer B
is visible. However, if I turn visibility off for layer B, layer C fetches
data from layer A. Since layer A is of type line I see all vertices of these
lines. If I show only layer C, I get an error (see below).

The symbols used are not mixed up (always the ones I have defined for the
respective layer).

I set visibility of the layers through javascript (composing an URL of the
form: ...layer=A&layer=B&layer=C...). So only JavaScript, MapServer and
PostGIS are involved, no MapScript.

Is there a mistake in my mapfile (see below)?

Uli

My configuration:
Suse Linux 7.1
PostgreSQL 7.3.1
postgis-0.7.4
MapServer version 3.6.3


LAYER
CONNECTIONTYPE postgis
NAME "A"
TYPE LINE
STATUS on
MINSCALE 5000
MAXSCALE 100000
SYMBOLSCALE 10000
CONNECTION "user=stra password=stra dbname=stratest host=localhost"
DATA "the_geom from g_stral"
CLASS
  COLOR 0 0 0
  OUTLINECOLOR 0 0 0
  SYMBOL "circle"
  SIZE 1
END  # CLASS
END

LAYER
CONNECTIONTYPE postgis
NAME "B"
TYPE point
STATUS on
MINSCALE 5000
MAXSCALE 50000
SYMBOLSCALE 10000
CONNECTION "user=stra password=stra dbname=stratest host=localhost"
DATA "the_geom from g_strap"
CLASS
    SYMBOL "circle"
    SIZE 8
    COLOR 255 204 0
    OUTLINECOLOR 255 153 0
END
END

LAYER
CONNECTIONTYPE postgis
NAME "C"
TYPE point
STATUS on
MINSCALE 5000
MAXSCALE 50000
SYMBOLSCALE 10000
CONNECTION "user=stra password=stra dbname=stratest host=localhost"
DATA "the_geom FROM g_stran"
CLASS
    SYMBOL "circle"
    SIZE 5
    COLOR 255 255 255
    OUTLINECOLOR 0 0 0
    OVERLAYSYMBOL "cross"
    OVERLAYCOLOR 0 0 0
    OVERLAYSIZE 5
  END
END


the eror, when I show only layer C:

msPOSTGISLayerWhichShapes(): Query error. prep_DB:Error executing POSTGIS
DECLARE statement (0.6 failed - retried 0.5 and it failed too). DECLARE
mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d()),'NDR'),OID::text from Ü WHERE  &&
setSRID('BOX3D(612788.014282 263623.722516,614244.985718
264710.277484)'::BOX3D, find_srid('','Ü','') )

------=_NextPart_000_0009_01C2FA3C.2C9FD810
Content-Type: text/x-vcard;
	name="=?iso-8859-1?Q?Uli_M=FCller.vcf?="
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="=?iso-8859-1?Q?Uli_M=FCller.vcf?="

BEGIN:VCARD
VERSION:2.1
N:M=FCller;Uli
FN:Uli M=FCller
NOTE;ENCODING=3DQUOTED-PRINTABLE:=3D0D=3D0A
TEL;WORK;VOICE:+49 (0761) 4018117
TEL;HOME;VOICE:+49 (0761) 8814606
TEL;CELL;VOICE:+49 (0160) 2655570
TEL;WORK;FAX:+49 (0761) 8814607
TEL;HOME;FAX:+49 (0761) 8814607
TEL;HOME:+49 (0761) 8814607
ADR;WORK:;;Wonnhaldestr. 4;Freiburg;;79100;Germany
LABEL;WORK;ENCODING=3DQUOTED-PRINTABLE:Wonnhaldestr. 4=3D0D=3D0AFreiburg =
79100=3D0D=3D0AGermany
ADR;HOME:;;Stephanienstr. 4;Freiburg;;79100;Germany
LABEL;HOME;ENCODING=3DQUOTED-PRINTABLE:Stephanienstr. =
4=3D0D=3D0AFreiburg 79100=3D0D=3D0AGermany
URL;WORK:http://www.geops.de
EMAIL;PREF;INTERNET:uli at geops.de
REV:20030213T230753Z
END:VCARD

------=_NextPart_000_0009_01C2FA3C.2C9FD810--




More information about the mapserver-users mailing list