Problem with POINT layer in PostGIS
Astrid Emde
astrid.emde at CCGIS.DE
Fri Feb 4 01:59:23 PST 2005
Dirk Jesko wrote:
> 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
>
> ------------------------------
Hi Dirk,
that's how I would write the Data-Parameter:
DATA "the_geom from mypoints"
or if I want to make a query or pick up a query
DATA "the_geom from (Select * from mypoints) as foo using unique oid
using SRID=31468"
Your epsg is GK4 43567.
That means for example coords like: 3456787 5612345.
I wonder, why your INSERT-Statements look like that:
INSERT INTO mypoints (gid, the_geom) VALUES (0,
'0101000020EC7A0000BAF998B45D0F51417B71FA1F6F075641');
And one more question: Is the a row in your geometry_columns-Table for
your table mypoints?
Hope that will help
Astrid
More information about the MapServer-users
mailing list