1

I stored my point date in geometry format with SRID 4326 supposed EWKB (data looks like this "0101000020E610000071F1A611E9392640AECD10D8E68C4A40") = way geometry(Point,4326) I want to have the coordinates in geography format. So what to do? So far I created another column for it:

ALTER TABLE brb_point ADD COLUMN geography geography(POINT,4326);

With this I get the coordinates shown:

ST_AsEWKT(way) from brb_point;

But I do not get along with the second step: populating the new column 'geography' with data from 'way' showing the coordinates with lon, lat. Trials like this led nowhere:

UPDATE brb_point SET geography = ST_GeomFromEWKB((way), 4326); 

I found a similar question here and here, but I'm not sure how to use it in my case.

Corn
  • 13
  • 5
  • ST_GeomFromEWKB returns geometry, not geography. See the documentation for the function (http://postgis.net/docs/manual-1.4/ST_GeomFromEWKB.html), and this question for the difference between the two (http://gis.stackexchange.com/questions/26082/what-is-the-difference-between-geometric-and-geographic-columns). – alphabetasoup Aug 28 '15 at 20:24

1 Answers1

2
UPDATE brb_point SET geography = way::geography;
Paul Ramsey
  • 19,865
  • 1
  • 47
  • 57