<div dir="ltr">Fantastic, that worked perfectly. Thanks for taking a look at the data for me. It didn't even occur to me that the data might have a third dimension.<div><br></div><div>Is there an easy way to check whether a geometry/shapefile has a Z-coordinate element in case I run into a similar issue in the future? I can just test import as 2d as you recommend (or QGIS has an export function that removes z-coordinates), but perhaps there is an easier way to tell?</div><div><br></div><div>-Sam</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 6, 2016 at 3:32 PM, Markus Metz <span dir="ltr"><<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Oct 5, 2016 at 3:05 AM, Sam Snellings <<a href="mailto:ssnellings@gmail.com">ssnellings@gmail.com</a>> wrote:<br>
> Markus,<br>
><br>
> Thank you for the suggestions. I ran the following commands nine times on<br>
> the data, with thresholds .00000000000000000001, 0.0000000001, 0.0000001,<br>
> 0.00001, 0.01, 0.1, 1, 10, and 100. Let me know if I'm not going small<br>
> enough.<br>
><br>
> v.clean --overwrite input=roads output=roads_snap -c tool=snap thresh=[see<br>
> above]<br>
> <a href="http://v.net" rel="noreferrer" target="_blank">v.net</a> --overwrite input=roads_snap points=schools output=network<br>
> operation=connect thresh=1000<br>
> v.net.alloc --overwrite input=network output=network_allocation ccats=1-2<br>
><br>
> I did not get a complete allocation of road segments from any of them, and<br>
> as far as I can tell it got stuck at the same vertices on each run.<br>
><br>
> I will email you a link to the data off-list, thanks for taking a look.<br>
<br>
</span>thanks for providing a link to the data! The problem is that the roads<br>
are 3D with z coordinates not matching at the end of a road segment<br>
and the beginning of another road segment. The solution is to import<br>
roads as a 2D vector with v.in.ogr -2. 2D snapping with v.clean<br>
tool=snap thresh =1 might be helpful.<br>
<br>
Markus M<br>
<div><div class="h5"><br>
><br>
> -Sam<br>
><br>
> On Tue, Oct 4, 2016 at 3:53 PM, Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a><wbr>><br>
> wrote:<br>
>><br>
>> On Tue, Oct 4, 2016 at 5:09 PM, Sam Snellings <<a href="mailto:ssnellings@gmail.com">ssnellings@gmail.com</a>><br>
>> wrote:<br>
>> > I've been running some trials through v.net.alloc using town road<br>
>> > networks<br>
>> > as the arc layer and schools as the node layer. I have one set of<br>
>> > roads/schools that breezes through v.net.alloc without issue (Town 1),<br>
>> > while<br>
>> > another one only allocates the first few arcs connected to each school<br>
>> > and<br>
>> > leaves the rest of the network unallocated (Town 2). There is probably a<br>
>> > problem with the data from Town 2, but I can't figure out what it is.<br>
>> > Does<br>
>> > this issue sound familiar to anyone?<br>
>> ><br>
>> > I am using the GUI. I load each pair of shapefiles into GRASS and then<br>
>> > run<br>
>> > the following statements (I only import two school points to simplify).<br>
>> > The<br>
>> > two towns are pulled right from the state-wide GIS office, but the towns<br>
>> > are<br>
>> > in different states (ie - different agencies provide the data).<br>
>> ><br>
>> You do not need this for v.net.alloc:<br>
>> > <a href="http://v.net" rel="noreferrer" target="_blank">v.net</a> input=roads output=road_nodes operation=nodes<br>
>> it will create a point for every node, the first point will have<br>
>> cat=1, the second cat=2 which collides with the points you want to<br>
>> attach<br>
>><br>
>> > <a href="http://v.net" rel="noreferrer" target="_blank">v.net</a> input=road_nodes points=schools output=network operation=connect<br>
>> > thresh=1000<br>
>><br>
>> rather use<br>
>> <a href="http://v.net" rel="noreferrer" target="_blank">v.net</a> input=roads points=schools output=network operation=connect<br>
>> thresh=1000<br>
>><br>
>> > v.net.alloc input=network output=network_allocation ccats=1-2<br>
>><br>
>> the real problem is probably a data problem: roads are not properly<br>
>> connected, i.e. the end of one road does not match the beginning of<br>
>> another road. Try v.clean input=roads output=roads_snap -c tool=snap<br>
>> with a very small threshold. This kind of error is quite common with<br>
>> shapefiles (not a fault of the shapefile format but of the software<br>
>> used to create the shapefiles).<br>
>><br>
>> ><br>
>> > Thanks in advance for any advice, I can also email images/data if that<br>
>> > would<br>
>> > be helpful.<br>
>><br>
>> If v.clean -c tool=snap does not help, (links to) original data of the<br>
>> schools and road network for Town 2 would be helpful (data please only<br>
>> off-list).<br>
>><br>
>> Markus M<br>
><br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a><br>
</blockquote></div><br></div>