[GRASS-user] Obtaining unique nodes from a topology
hamish_b at yahoo.com
Sat Jan 16 17:47:00 EST 2010
> > 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.
> 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.
None the less, even if it is not the most efficient or elegant solution
in the world I'm of the thought that something is better than nothing,
and it might spark the basis of a more formal solution. Add editorial
comments as needed...
btw, shapefiles can be a lossy format, but I'm not sure what a better
solution would be.
> 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
> select st_endpoint(geom) from bound
> /* assign node ids to bounds */
> update bound set startnode_id = (select id from node where
> node.geom = st_startnode(bound.geom))
More information about the grass-user