[GRASS-user] GRASS Connected Components
Daniel Victoria
daniel.victoria at gmail.com
Wed Mar 15 04:52:49 PDT 2017
Hi Talha,
It's been a while since I've done that analysis. So my memories are not all
100% certain.
Reading the email tread and some annotations I have, the main problem was
that there were undershoots and overshoots in my network (as mentioned by
Mark). Since my road network wat not that big, I did some manual
corrections in the network.
My process was something along these lines (I could have missed a step in
my notations):
1) Import the vector road network with appropriate snapping distance (my
was 0.001 - lat lon location)
2) Do topology cleanup (break, rmdup and snap)
3) Create a network (v.net) putting the road network in layer 1 and my end
points in layer 2
4) Run v.net.iso to find the equal distances to each end point and paint
the result using cat values as the color attribute. Lines that can't reach
an end point will have no attribute
5) Inspect the lines that can't reach an output and correct the connections
(use grass digitizer and look for undershoots and overshoots. Break lines
and trim/extend as needed)
6) Repeat steps 3 - 5 until happy
7) ...
8) profit
Of course, if your road network is very large, this approach might not be
the best option since I recall spending a couple of days manually fixing
(and cursing) the road network :)
<ShamelessPlug>
But in the end the work was worth it. I was able to calculate the average
distance of several soy producing areas to Biodiesel crushing plants in MS,
Brasil and that was used in a paper about Land Use change and Life Cycle
assessment.
http://dx.doi.org/10.1007%2Fs10098-016-1161-8
</ShamelessPlug>
I'm replying also to the grass list, in case someone has a better
alternative
Cheers
Daniel
On Tue, Mar 14, 2017 at 2:46 PM, Talha OZ <sadece at gmail.com> wrote:
> Hello,
>
> Sorry for spamming you, I saw your thread here
> <https://lists.osgeo.org/pipermail/grass-user/2015-January/071645.html> re
> fixing road topology.
> I managed to v.clean.advanced (break, rmdupl, rmdangle, snap) but when I
> run v.components I see some apparently connected lines get different values
> of component.
> This might be due to the `cat` issue you talked about but I couldn't get
> that part of your conversation. Could you please elaborate a little on that
> or direct me to a documentation, please.
> I searched for v.cat... on toolbox but couldn't find it. Is `v.category
> option=add` to be called during cleaning or finding the components?
>
> Really appreciate your help. Thank you!
> When this is the settings:
> [image: Inline image 2]
>
> For example, these two lines get two different `comp` values:
> [image: Inline image 1]
>
> Note: interestingly, when I try to save the results directly to the
> shapefiles I got this weird result (I think it somehow finds the original
> geometries and runs `components` on it)
> [image: Inline image 3]
>
> -Talha Oz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170315/f0b2b299/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-03-14 at 1.19.04 PM.png
Type: image/png
Size: 13908 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170315/f0b2b299/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-03-14 at 1.35.46 PM.png
Type: image/png
Size: 10761 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170315/f0b2b299/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-03-14 at 1.34.11 PM.png
Type: image/png
Size: 80485 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170315/f0b2b299/attachment-0005.png>
More information about the grass-user
mailing list