[postgis-users] shp2pgsql: Where are x,y-coordinates stored?

Alan alankeown at southernphone.com.au
Wed Aug 9 15:02:07 PDT 2006


No - this is not nonsense. You are right in your assumption: the coordinate
values in shapefiles are NOT "human readable". They are in a complex
structure in binary form. If you want them in ASCII you will need to add
columns to the shapefile's dbf table. Whether you can do that by SQL depends
on the application you are using to manipulate the shapefile.

Cheers
AlanK

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of P Kishor
Sent: Tuesday, 8 August 2006 9:04 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] shp2pgsql: Where are x,y-coordinates stored?


Most likely others know better'n me, but here goes...

On 8/7/06, H.Lekin <h.lekin at gmx.net> wrote:
> Seems rather impossible to reply properly to the all-in-one digest; hope
> it looks OK:
>
>
> > well, does your shapefile contain coordinates? If it doesn't, then you
> > will have to create them. See the postgis documentation for the syntax
> > for retrieving geometry.
>
> The shapefile contains coordinates, as does PostgreSQL/PostGIS after
> importing the shapefile. I can access the latter via QGIS and it is
> displayed correctly.


No, no, no. What I mean by my question is, does the shapefile contain
explicit columns storing x and y coordinates? Your responses have
already provided the answer -- it probably does not. That has nothing
to do with whether or not you can import it into PostGIS, or see it
with QGIS. See, for every point, there is implicit geometry stored in
the_geom column... this is what the database understands. Then, there
are columns that you can add to the featureclass explicitly to store x
and y (lon/lat usually) in a way that is easy for us humans to
understand.

Which is why you probably have to create such columns and populate
them using SQL syntax using the information in the_geom column.

Hope this makes sense.

On the other hand, if I talking nonsense, please someone feel free to
correct me.

..


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.ies.wisc.edu/
Open Source Geospatial Foundation https://edu.osgeo.org/
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users






More information about the postgis-users mailing list