[postgis-users] Conversion WGS84 to Lambert II
Nicolas Ribot
nicky666 at gmail.com
Tue Jul 5 09:32:16 PDT 2005
> Hello,
> I have GPS coordinates and I would like to INSERT this
> coordinates to Postgis Database, but I don't know how
> can I transform the coordinates wgs84 to Lambert II
> 27582.
>
> These are the coordinates in WGS84
> LATITUDE LONGITUDE
> N4902.4761 E00201.7400
>
> I would like to have coordinates in order to create an
> sql Insert
> INSERT INTO "popplace" ("id","the_geom") VALUES
> ('1',GeometryFromText('POINT (xxxx yyyy)',27582));
>
> Best regards,
> LEVERT Donovan.
>
Hi donovan,
you can use the transform() function to reproject your data on-the-fly
when inserting them.
Something like:
INSERT INTO "popplace" ("id","the_geom") VALUES (
'1',
transform(GeometryFromText('POINT (2.017400 49.024761)', 4326), 27582)
);
Check the corresponding SRID for WGS84 (on my postgis version, its 4326).
(I assumed that your given lat long coordinates should be read in
decimal degrees)
Nicolas