<html style="direction: ltr;">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;" bidimailui-charset-is-forced="true"
smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
<div id="smartTemplate4-template">
<div id="my_message" style="color:blue; ">I have come across
similar problems to what you describe below. Now I switched
strategy, and this workflow seems to work perfectly: I use the
"to_x , to_y" upload options of v.distance to save to the
original station points file the X and Y coordinates of the
snapped location. Then I extract those coords and pipe them
straight into v.in.ascii, thus creating the new snapped
locations point vector.<br>
<font color="#000000"><big><tt><br>
# Add columns to the stations vector for snapped_x and
snapped_y and get coordinates </tt><tt><br>
</tt><tt>v.db.addcolumn --q map=$POINTS columns="snap_x
double, snap_y double"</tt><tt><br>
</tt><tt>v.distance --q --o from=stations to=streams
output=connectors upload=to_x,to_y column=snap_x,snap_y</tt><tt><br>
</tt><tt><br>
# Create a new stations vector with the snap_x and snap_y
columns </tt><tt><br>
</tt><tt>g.remove -f vect name=frxst_pts</tt><tt><br>
</tt><tt>v.out.ascii --q -c stations
columns="id,station_name,station_num,longitude,latitude,snap_x,snap_y"
separator=comma | v.in.ascii --o input=- output=frxst_pts
x=8 y=9 cat=3 columns="east double,north double,id
integer,station_name text,station_num integer,longitude
double,latitude double,snap_x double,snap_y double"
separator=comma skip=1</tt></big></font><br>
<br>
Hope that helps <br>
</div>
</div>
<br>
<div id="smartTemplate4-quoteHeader">------ Original Message ------
Subject: [GRASS-user] snapping points to lines issue
Date: Mon, 14 Mar 2016 14:13:39 -0400
To: Grass User List
From: Bartolomei Chris</div>
<br>
<br>
<div class="moz-cite-prefix">On 03/14/2016 08:13 PM,
Bartolomei.Chris wrote:<br>
</div>
<blockquote
cite="mid:C2C92AB09BA76F4F8B495108C30C5E14B2BB62F36B@mb-ex07.ensco.win"
type="cite">
<pre wrap="">Has anyone had issues using the v.clean, v.distance, v.patch, v.clean trick to snap points to a nearby set of lines?
I am running GRASS version 6.4.4 on a Windows 7 PC.
I have USGS stream gauge locations I am trying to snap to a stream and then create a network ...
there are 15 gauges located from 1.9 to 260 meters from my stream vector and using the above process only 11 of the 15 "snap" to the stream...
I have attached the mapset containing all of the data and maps, a text copy of the commands I use in my shell script, and a readme with set-up instructions if you want to use my mapset...
I also included a few images of what is happening for a quick visual.
The grey circles are the gauge locations and the red triangles are the "snapped" points on the stream vector.
The problem does not seem to be related to distance (failed points are from 2 to 260m away, successful ones are in a similar range)
Any help would be greatly appreciated!
Thank you
:)
Chris
Chris Bartolomei P.E.
Engineer/Scientist
ENSCO, Inc.
<a class="moz-txt-link-abbreviated" href="mailto:bartolomei.chris@ensco.com">bartolomei.chris@ensco.com</a>
The information contained in this email message is intended only for the use of the individual(s) to whom it is addressed and may contain information that is privileged and sensitive. If you are not the intended recipient, or otherwise have received this communication in error, please notify the sender immediately by email at the above referenced address and note that any further dissemination, distribution or copying of this communication is strictly prohibited.
The U.S. Export Control Laws regulate the export and re-export of technology originating in the United States. This includes the electronic transmission of information and software to foreign countries and to certain foreign nationals. Recipient agrees to abide by these laws and their regulations -- including the U.S. Department of Commerce Export Administration Regulations and the U.S. Department of State International Traffic in Arms Regulations -- and not to transfer, by electronic transmission or otherwise, any content derived from this email to either a foreign national or a foreign destination in violation of such laws.
This mail was received via Mail-SeCure System.
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<div class="moz-signature">
<div dir="LTR">
Micha Silver<br>
Arava Drainage Authority<br>
+972-523-665918
</div>
</div>
</body>
</html>