Код: Выделить всё
update test set the_geom=geometryfromtext('POINT('||trunc((trunc(longitude/100)+(longitude-1000)/60)::numeric,6)||' '||trunc((trunc(latitude/100)::int+(latitude-5400)/60)::numeric,6)||')',4326);
gps=# select latitude,longitude,astext(the_geom) from test limit 10;
latitude | longitude | astext
-----------+-----------+----------------------------
5405.6298 | 1047.1342 | POINT(10.78557 54.09383)
5405.6255 | 1047.0722 | POINT(10.784536 54.093758)
5405.5982 | 1047.0358 | POINT(10.78393 54.093303)
5405.5373 | 1046.9382 | POINT(10.782303 54.092288)
5405.4637 | 1046.8294 | POINT(10.78049 54.091061)
5405.3542 | 1046.7878 | POINT(10.779796 54.089236)
5405.2649 | 1046.6943 | POINT(10.778238 54.087748)
5405.1725 | 1046.5783 | POINT(10.776305 54.086208)
5405.0423 | 1046.5537 | POINT(10.775895 54.084038)
5404.9063 | 1046.5737 | POINT(10.776228 54.081771)
(10 lignes)