[GRASSLIST:4155] Re: reading coordinate values from shapefile

Radim Blazek blazek at itc.it
Tue Aug 10 10:14:23 EDT 2004


On Tuesday 10 August 2004 15:46, Daniel Isenegger wrote:
> Hi list,
> thanks to Radim's hint, i am able now to maintain attribute tables on
> postgres.
> I'm not sure if it is a stupd question, but the next problem i didn't
> found a solution in the tutorials or FAQs is:
> how to extract coordinate values from certain elements of a shapefile
> (for example the x/y-coordinates of a centriod of a certain polygon),
> but not interactively, but with specifying the element?
> for example smth in this way:
> select X_COOR, Y_COOR from shapefileXY where object_id = 1
>
> Or is it better using ascii_files?  but how to relate there coordinate
> values with elements of the file specified in the attribute tables?
>
> Thanks dani

For points and centroids you can use v.to.db option=coor,
columns must exist.

Radim




More information about the grass-user mailing list