Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2C4N-0000VG-9i for pgsql-jdbc@arkaria.postgresql.org; Thu, 25 Jul 2013 03:18:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V2C4M-0004FY-N3 for pgsql-jdbc@arkaria.postgresql.org; Thu, 25 Jul 2013 03:18:22 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2C4L-0004FR-MG for pgsql-jdbc@postgresql.org; Thu, 25 Jul 2013 03:18:21 +0000 Received: from mail63.csoft.net ([205.205.214.4]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2C4H-0000To-90 for pgsql-jdbc@postgresql.org; Thu, 25 Jul 2013 03:18:20 +0000 Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 5040C28407; Wed, 24 Jul 2013 22:18:16 -0500 (EST) Received: by leary.csoft.net (Postfix, from userid 1112) id 28D84A10C; Wed, 24 Jul 2013 23:18:16 -0400 (EDT) Date: Wed, 24 Jul 2013 23:18:15 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Sven Holcombe cc: pgsql-jdbc@postgresql.org Subject: Re: Unpack an org.postgresql.geometric.PGpoint In-Reply-To: Message-ID: References: User-Agent: Alpine 2.03 (BSO 1266 2009-07-14) MIME-Version: 1.0 X-Pg-Spam-Score: 0.8 (/) Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On Tue, 23 Jul 2013, Sven Holcombe wrote: > I can get an=A0org.postgresql.util.PGobject object into my application > (MATLAB) via a database connection: > D =3D fetch(conn,'SELECT ST_GeomFromText(''POINT(-10 5)'')') > class(D{1}) =A0 =A0% Returns 'org.postgresql.util.PGobject' > D{1}.getValue =A0% Returns the java.lang.String > '010100000000000000000024C00000000000001440' >=20 > But I want to unpack this object to get at its contents (ie, the coordina= tes > -10 and 5). Can someone describe how to do this? >=20 This is returning a postgis geometry option, not the builtin postgresql=20 point data type. To access geometry objects you need to use the postgis=20 java wrapper: http://postgis.net/docs/manual-2.0/ch06.html#id351597 Kris Jurka --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc