From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | Sven Holcombe <sven(dot)holcombe(at)gmail(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Unpack an org.postgresql.geometric.PGpoint |
Date: | 2013-07-25 03:18:15 |
Message-ID: | alpine.BSO.2.03.1307242316080.12784@ejurka.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Tue, 23 Jul 2013, Sven Holcombe wrote:
> I can get an org.postgresql.util.PGobject object into my application
> (MATLAB) via a database connection:
> D = fetch(conn,'SELECT ST_GeomFromText(''POINT(-10 5)'')')
> class(D{1}) % Returns 'org.postgresql.util.PGobject'
> D{1}.getValue % Returns the java.lang.String
> '010100000000000000000024C00000000000001440'
>
> But I want to unpack this object to get at its contents (ie, the coordinates
> -10 and 5). Can someone describe how to do this?
>
This is returning a postgis geometry option, not the builtin postgresql
point data type. To access geometry objects you need to use the postgis
java wrapper:
http://postgis.net/docs/manual-2.0/ch06.html#id351597
Kris Jurka
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2013-07-25 03:20:14 | Re: Website Redo Kick Off |
Previous Message | dmp | 2013-07-24 18:57:33 | Re: Website Redo Kick Off |