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