Problem with POINT layer in PostGIS

Simpson asimpson at I-55.COM
Fri Feb 4 09:24:41 EST 2005


Turn full logging on in PostgreSQL, attempt to render the map and see if it
provides any further information...

Drew.

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Dirk Jesko
Sent: Friday, February 04, 2005 2:24 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Problem with POINT layer in PostGIS


Hallo,

I moved some points from a shape file to a PostgreSQL table (see the
script below). Unfortunately the points are not displayed if queried
from the database, but they are, if taken from the shape file. Even if I
export the table back to a new shape the points are displayed correctly.
I also executed the query generated by Mapserver in a PostgreSQL shell
and do get the expected result. So I assume, that either my mapfile
contains an error that I do not see or there might be a bug in the
mapserver. By the way, all other layers (which are of type polygon and
line) with data from the same database display perfectly.

Some information about the System:

Mapserver: Version 4.4.1 (Windows XP)
Database: PG 8.0.0 / PostGIS 1.0.0RC2

Layerdefinition:

  LAYER
    NAME           "lu_pointtest"
    DATA  "mypoints"    # This works
#    CONNECTIONTYPE postgis   # This does not work
#    CONNECTION     "user=... password=... dbname=... host=... port=..."
#    DATA           "the_geom from mypoints using SRID=31468"
    STATUS         OFF
    TYPE           POINT

    PROJECTION
      "init=epsg:31468"
    END

    CLASS
      NAME     "Test"
      STYLE
        SYMBOL 'circle'
        COLOR 255 0 0
        OUTLINECOLOR 0 0 0
        SIZE 20
      END
    END
  END

------------------------------

Here is a script to create the database table:

CREATE TABLE mypoints (
    gid serial NOT NULL,
    CONSTRAINT mypoints_pkey PRIMARY KEY (gid)
);

SELECT AddGeometryColumn('mypoints', 'the_geom', 31468, 'POINT', 2);

INSERT INTO mypoints (gid, the_geom) VALUES (0,
'0101000020EC7A0000BAF998B45D0F51417B71FA1F6F075641');
INSERT INTO mypoints (gid, the_geom) VALUES (1,
'0101000020EC7A0000D115631BD00F51412E7939EBD5095641');
INSERT INTO mypoints (gid, the_geom) VALUES (2,
'0101000020EC7A0000A37CFBA747145141A292642587095641');
INSERT INTO mypoints (gid, the_geom) VALUES (3,
'0101000020EC7A0000C6687625A0145141CE224958C4095641');
INSERT INTO mypoints (gid, the_geom) VALUES (4,
'0101000020EC7A0000C997450F6F115141F5286F0FD9085641');
INSERT INTO mypoints (gid, the_geom) VALUES (5,
'0101000020EC7A0000A6C2BFFB471151415478A68D77065641');
INSERT INTO mypoints (gid, the_geom) VALUES (6,
'0101000020EC7A00008B01CDF04C0E51410982FB349A065641');
INSERT INTO mypoints (gid, the_geom) VALUES (7,
'0101000020EC7A00008437018109125141FCE41AA44C0E5641');
INSERT INTO mypoints (gid, the_geom) VALUES (8,
'0101000020EC7A0000CEC8E5B25C10514156534688A60A5641');
INSERT INTO mypoints (gid, the_geom) VALUES (9,
'0101000020EC7A000052319D6C4A12514152D7F935640E5641');
INSERT INTO mypoints (gid, the_geom) VALUES (10,
'0101000020EC7A00006B7E968F121351419EF4660FB8065641');
INSERT INTO mypoints (gid, the_geom) VALUES (11,
'0101000020EC7A0000F3BD96E9101351418427A4D0BA065641');
INSERT INTO mypoints (gid, the_geom) VALUES (12,
'0101000020EC7A0000295CB243071251412D9902FB850C5641');
INSERT INTO mypoints (gid, the_geom) VALUES (13,
'0101000020EC7A0000AF3A9D469B135141D9B7BE5F050C5641');
INSERT INTO mypoints (gid, the_geom) VALUES (14,
'0101000020EC7A0000DD9CC87615115141B0EE11E1AB075641');
INSERT INTO mypoints (gid, the_geom) VALUES (15,
'0101000020EC7A000077D304534F115141A959762048065641');
INSERT INTO mypoints (gid, the_geom) VALUES (16,
'0101000020EC7A0000A08037FC8D11514185B61D18530E5641');
INSERT INTO mypoints (gid, the_geom) VALUES (17,
'0101000020EC7A000072DB06F8C11251419056FA21680E5641');
INSERT INTO mypoints (gid, the_geom) VALUES (18,
'0101000020EC7A00007D9819421B14514193AEADE5A10E5641');
INSERT INTO mypoints (gid, the_geom) VALUES (19,
'0101000020EC7A0000F134A105F70D5141C7C8DF84430D5641');
INSERT INTO mypoints (gid, the_geom) VALUES (20,
'0101000020EC7A0000BFDE8176E70D51418C6C600DF9055641');
INSERT INTO mypoints (gid, the_geom) VALUES (21,
'0101000020EC7A0000000000002013514100000080AE065641');
INSERT INTO mypoints (gid, the_geom) VALUES (22,
'0101000020EC7A00004E70BF22AE115141A4A6446AEE0C5641');
INSERT INTO mypoints (gid, the_geom) VALUES (23,
'0101000020EC7A0000A6C8085A33105141D8521E16500D5641');
INSERT INTO mypoints (gid, the_geom) VALUES (24,
'0101000020EC7A00006CC7535D4D125141423F9F2B140D5641');
INSERT INTO mypoints (gid, the_geom) VALUES (25,
'0101000020EC7A0000432443E7101151410C6EB61A930F5641');
INSERT INTO mypoints (gid, the_geom) VALUES (26,
'0101000020EC7A0000B20C2F33EE115141FDC762841C0A5641');
INSERT INTO mypoints (gid, the_geom) VALUES (27,
'0101000020EC7A0000165414B43D125141168162BD0F0A5641');
INSERT INTO mypoints (gid, the_geom) VALUES (28,
'0101000020EC7A000054D406115F1251416A646972050A5641');
INSERT INTO mypoints (gid, the_geom) VALUES (29,
'0101000020EC7A0000BAEEE230BF0F514103B9D4CE03055641');
INSERT INTO mypoints (gid, the_geom) VALUES (30,
'0101000020EC7A0000F85998A30510514110F531A2EA075641');

Thanks for any help,
Dirk



More information about the mapserver-users mailing list