From: | shadrack <shadkeene(at)hotmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: beginner postgis question lat/lon |
Date: | 2008-03-03 13:13:41 |
Message-ID: | c751df6f-bba6-4f69-84c2-c8522cfdbbaf@i7g2000prf.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks for the help! Stupid error,
Shad
On Feb 28, 7:04 am, m(dot)(dot)(dot)(at)fuhr(dot)org (Michael Fuhr) wrote:
> On Wed, Feb 27, 2008 at 04:59:07PM -0800, shadrack wrote:
> > This may seem like a very simple question...it is...but I can't find
> > documentation on it to help. I've seen some posts about lat/long but
> > none that give simple solutions on how to insert lat/long in tables.
>
> See the PostGIS documentation, in particular Chapter 4 "Using PostGIS":
>
> http://postgis.refractions.net/docs/ch04.html
>
> (The site isn't responding right now; hopefully it'll be available
> soon.)
>
> > postgis=# insert into routes_geom values(1, 'J084',
> > GeomFromText('LINESTRING(38.20 -121.00, 38.20, -118.00)', 4326));
>
> > I receive this error:
> > ERROR: parse error - invalid geometry
> > CONTEXT: SQL function "geomfromtext" statement 1
>
> There are two problems with the geometry string: the syntax error is
> due an extra comma in the second pair of coordinates, and coordinates
> should be (X Y) therefore (lon lat) instead of (lat lon). Try this:
>
> insert into routes_geom values(1, 'J084', GeomFromText('LINESTRING(-121.00 38.20, -118.00 38.20)', 4326));
>
> You might wish to subscribe to the postgis-users mailing list if you
> have additional questions.
>
> --
> Michael Fuhr
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Clark | 2008-03-03 13:43:20 | Re: ecpg problem |
Previous Message | Richard Huxton | 2008-03-03 12:22:46 | Re: 8.2.6 > 8.3 blows up |