[Qgis-user] how to use v.clean.advanced?
Bernd Vogelgesang
bernd.vogelgesang at gmx.de
Thu Feb 25 03:03:21 PST 2016
Hi Uwe,
Am 25.02.2016, 09:44 Uhr, schrieb Uwe Fischer <gisfisch at t-online.de>:
>
> Hello list,
>
>
> I have a line shapefile (call it input.shp, derived from polygons) that
> i'd like to turn it into clean lines (output.shp) using >the processing
> toolbox (PT). Clean lines means: no duplicates, broken at intersections.
> Dangles and pseudo nodes are >uninteresting here.
>
>
> In my understanding, it's necessary to perform the following steps: 1.
> snap vertices together within small threshold, 2. >break lines, 2.
> remove duplicates.
>
>
> After entering my values and options in the v.clean.advanced input mask
> of the PT, some problems and questions come >up (I tried QGIS 2.10 and
> 2.12 on Windows):
>
>
> · the PT input mask does not accept more than one value in the
> input field for threshold. In fatal contrast to that, in >the help text
> it reads that there have to be multiple threshold values entered if
> multiple cleaning tools are used. In >my case, the box doesn't accept a
> comma separator nor an additional numeric value.
>
>
> · the system puts together a command string (found in PT
> history) containing values I never did enter and I don't >want to use:
>
>
> processing.runalg("grass:v.clean.advanced","D:/>input.shp","snap,break,rmdupl",0.01,"655282.346386,662305.603469,5871019.54139,5877018.65557",-1,0.0001,"D:/>output.shp",None)
>
>
>
> · please note the above values before „D:/output.shp“: they
> smell like default values for snapping and small area >threshold, but I
> never did choose those values! Where the hell do they come from?
>
>
The values you are wondering about derive from the default values for
snapping and remove small areas (does not apply for lines anyway) under
the hidden "Advanced parameters" field in the mask. -1 for snapping means
no snapping, 0,000100 for removing small areas will most likely remove no
area at all cause its too small (in case of polygons)
>
> · the result is poor: lines are not broken and dups are not
> removed.
>
>
>
> Does anybody know what went wrong?
>
>
I think the tool does not work as expected, cause you are not able to
insert anything else than one number in threshold. Furthermore on a german
OS, even switched to english language, the decimal separator in all tools
is the comma and not a point. The comma gets changed to point for the
algo, while the comma should be the separator for the threshold values. I
think this can not work. How should the algo distinguish between a decimal
input and a separator?
Would be nice to know if this happens only on computers where the comma is
the decimal separator, or if the threshold field does not accept multiple
values in any scenario.
>
>
So best to do would be to skip the v.clean.advanced and to do it step by
step with v.clean, while you can spare the snap part cause you can already
set this in the "Advanced options" (While I never found out when this will
be executed: before the main action or afterwards or even in between???
Documentation for grass is ... thin and only nerd-proof)
>
> Best regards, Uwe
>
>
Cheers
Bernd
--
Bernd Vogelgesang
Siedlerstraße 2
91083 Baiersdorf/Igelsdorf
Tel: 09133-825374
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160225/3aa7d57c/attachment.html>
More information about the Qgis-user
mailing list