[GRASSLIST:7234] Re: Boundary Corner Extraction
Hamish
hamish_nospam at yahoo.com
Mon Jun 20 02:02:56 EDT 2005
> I'm new to Grass and GIS in general and I've been working with a
> dataset giving boundary data for buildings in Seattle. I'm
> specifically attempting to determine the coordinates of one building
> in particular and I'm at a loss for the best way of extracting this
> information.
>
> So far I've tried the following:
>
> 1) I tried querying the particular boundary with the d.what.vect
> command. While the building has ~15 points defining its perimeter,
> the boundary seems to be defined by three nodes (I'm assuming nodes
> and points are the same thing?). The three nodes seem to define
> starting points for three sections of the total building perimeter.
> While the d.what.vect command tells me the location of those three
> nodes, it does not tell me the corners.
>
> 2) I tried converting the boundary into lines using the v.type
> command, but the resulting lines seemed to be define in the same way
> as the boundary above (three nodes; no corner information)
>
> 3) I've tried exporting the vector to CSV using v.out.ogr, but the
> resulting output lists only attribute values and not the actual
> boundary definition.
>
> Any advice? Thanks for your help.
The nodes are the start and end points of arcs, which are made up of
one or more line segments. Each of those line segments connects two
vertices. You want to know what the vertices are, not the nodes.
Use "v.to.points -v" to get a series of points from the vector line or
boundary. Then use v.out.ascii to print out the coordinates of those
points.
Possibly use v.extract first so you only extract the values for your
building & save some hassle. Use 'v.extract -d' if the building
footprint has internal lines you wish to get rid of.
Hamish
More information about the grass-user
mailing list