WGS84 gps point in postgis

Stéphane RIFF stephane.riff at CERENE.FR
Fri Aug 20 04:38:32 EDT 2004


Arnulf Christl wrote:

> Stéphane RIFF wrote:
>
>> Hello,
>>
>> I want to store WGS84 gps points in a postgis table:
>>       What is the format of WGS84 point in postgis ???
>>             For now i have something like this:
>>                   SRID=4326;POINT(DDMM.SSSS DDMM.SSSS)   ----> is that
>> ok ???
>>
>> Next i want to show those gps points on raster map in other projection:
>> epsg:27582 (lambert II etendu)
>>
>> Does somebody already do something like that...
>>
>> All advices are wellcome
>>
>> Thanks
>>
> Hi,
> just as Vladimir pointed out the format should be something like:
> SRID=4326;POINT(7.0725 50.73882)
>
> You need a geometry field in the table, so after creating the TABLE
> (named umn_user in this example) itself:
>
> CREATE TABLE umn_user (
>    gid integer,
>    firstname character varying,
>    lastname character varying,
>    ...
> );
>
> you have to add the field that contains the geometry (DATBASE germany,
> TABLE umn_user, FIELD the_geom, SRID, Type, dimension):
>
> SELECT AddGeometryColumn('germany', 'umn_user', 'the_geom', 4326,
> 'POINT', 2);
>
> then you can add values:
>
> INSERT INTO umn_user VALUES (42, Stephane, Riff, ... ,
> 'SRID=4326;POINT(7.07250238209242 50.7387903487365)';
>
> Now you can add WMS capabilities to the MAP file and query MapServer
> with WMS syntax. Then you can switch projections on the fly by just
> adding another EPSG code to the getMap string. The WMS client
> Mapbender includes that functionality, check it out here:
> http://www.mapbender.org/testbed.html
> The testbed currently contains 3 WMS and as you can see not all of
> them answer to all EPSGs.
>
> Cheers, Arnulf.
>
Thanks for answer,

Now i tried this but it doesn't work:

the mapfile :

MAP
    NAME HELLO
    STATUS ON
    EXTENT 47673.624 1616618.5 1197873.624 2677218.5  #extent of France
    SIZE 400 300
    IMAGECOLOR 200 255 255
    WEB
        IMAGEPATH "/var/apache/web/tmp/"
        IMAGEURL "/tmp/"
    END
    PROJECTION
      "init=epsg:27582"  # lambert II
    END


    LAYER
        NAME "credits"
        STATUS DEFAULT
        TRANSFORM FALSE
        TYPE ANNOTATION
        PROJECTION
          "init=epsg:4326"  #WGS84
        END
        FEATURE
            POINTS
                7.07250238209242 50.7387903487365
            END
            TEXT 'Hello world.  Mapserver rocks.'
        END
        CLASS
            LABEL
                TYPE BITMAP
                COLOR 255 0 0
            END
            SIZE 16
        END
    END
END

I can't see anything, do i miss something
Hope someone could help
THX



More information about the mapserver-users mailing list