Skip to content

Instantly share code, notes, and snippets.

@samgranieri
Created April 1, 2009 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samgranieri/88914 to your computer and use it in GitHub Desktop.
Save samgranieri/88914 to your computer and use it in GitHub Desktop.
Given a preexisting lat/lng
lat | 41.9219
lng | -87.6562
and a table that I added a geometry column via the following sql
SELECT AddGeometryColumn('bars','the_geom','9102671','MULTILINESTRING',2);
(the srid is illinois, east, 9102671)
(i think lat-lngs will be stored as multistring)
how do i convert the lat/lng into a point and have it stored as the_geom?
do i do this?
update bars set the_geom = setsrid(makepoint(-87.6562, 41.9219), 4269)
or do i change the srid to illinois east?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment