> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:postgis-users-
> [EMAIL PROTECTED] On Behalf Of Emilio Ponce
> Sent: Monday, October 22, 2007 11:10 AM
> To: [email protected]
> Subject: [postgis-users] Problem with geodata storage
> 
> Hi everyone, here Emilio from Barcelona,
> 
> I've found a problem with my postgresql+postgis under ubuntu. When I
> tried to store a geometry worked well, but when I tried to get this
> data with a select I found this strange numbers:
> 
> testgis=# select * from calles_geom;
> 
>  id |  name   |                                        geom
> ----+---------+-----------------------------------------------------------
> -------------------------
>   1 | Jeff Rd |
> 01020000000200000000000000005807410000000070AD0D41000000002054074100000000
> 50B10D41
> (1 fila)
> 
> 
> I've done this to store the data:
> 
> CREATE TABLE CALLES_GEOM(
>       ID int4,
>       NAME varchar(25)
> );
> 
> SELECT AddGeometryColumn('calles_db','calles_geom','geom','-1',
> 'LINESTRING',2);
> 
> BEGIN;
> INSERT INTO CALLES_GEOM(ID,GEOM,NAME) VALUES (1,
> GeometryFromText('LINESTRING(191232 243118,191108 243242)',-1),'Jeff
> Rd');
> END;
> 
> 
> Then,anyone know why the geom column is not 'LINESTRING(191232
> 243118,191108 243242)'?
> 
> Thanks!
> 
> 
> --
> Emilio
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users

Try:

Select id, name, astext(geom) from calles_geom;

The shape is stored as a binary.  You have to convert it to WKT in order to
read it.

-LK
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the sender. This message 
contains confidential information and is intended only for the individual 
named. If you are not the named addressee you should not disseminate, 
distribute or copy this e-mail.
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to