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

P Kishor punkish at eidesis.org
Mon Aug 7 16:03:40 PDT 2006


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/



More information about the postgis-users mailing list