[GRASS-user] Obtaining unique nodes from a topology
William Temperley
willtemperley at gmail.com
Sat Jan 16 12:33:29 EST 2010
2010/1/15 Hamish <hamish_b at yahoo.com>
> Will wrote:
> > Thanks - but what I really want is a list of unique nodes
> > (i.e. where three boundaries meet, there would be one node,
> > with an id) and assign this id to the relevant boundaries.
> > Perhaps that isn't possible. It might be easier to do
> > this in PostGIS. I need to be able to run recursive
> > queries in PostGIS to pick up connected boundaries.
>
> Hi,
>
> have a look at 'v.build option=dump,sdump,cdump'.
>
> there you can export the topology to stdout, etc.
>
>
> it would be nice if you could write up your findings/method
> into a small wiki page when you are done, there is a real lack
> of PostGIS+GRASS documentation.
>
>
> Hamish
>
> Hi Hamish
Where should I write such a wiki page do you think? To be honest I'm not
sure I'm using best practices - I needed a quick fix for a one-off job -
I've been using shapefiles as an interchange medium.
I just rolled my own start/endpoint thing - it was pretty simple in Postgis
to run
/* get table of unique start/endpoints */
insert into node (geom)
select st_startpoint(geom) from bound
union
select st_endpoint(geom) from bound
then
/* assign node ids to bounds */
update bound set startnode_id = (select id from node where node.geom =
st_startnode(bound.geom))
Cheers
Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100116/4e3665f2/attachment.html
More information about the grass-user
mailing list