[Qgis-user] how to use v.clean.advanced?

Uwe Fischer gisfisch at t-online.de
Thu Feb 25 05:51:22 PST 2016


Hallo Bernd,

 

vielen Dank für die Antwort. Ich habe etwas übersehen (mal wieder), nämlich daß man auch hier „Adv. parameters“ ausklappen kann. Jetzt ist klar, woher die Werte kommen und was sie machen: sie verhindern offenbar, daß überhaupt gesnappt wird (da auf -1 gesetzt).

 

Auf meinem PC ist der Dezimaltrenner auf Punkt gestellt, weil es sonst nur Probleme gibt (z. B. auch mit MicroStation). Das Komma könnte also theoretisch als Trennzeichen fungieren, was wohl auch so gedacht ist. Aber das Komma wird ja überhaupt nicht angenommen.

 

Ich werde es genauso machen wie Du vorgeschlagen hast, also ein Einzelschritten.

 

Der Snap-Parameter für v.ogr.in wirkt dabei m. E. als allererstes: GRASS muss die Shapes erstmal importieren, bevor damit weitergearbeitet wird (clean oder welcher weitere Schritt auch immer). Und der Snapwert gilt für den Import. So hab ich es mir jedenfalls hergeleitet.

 

Nochmal vielen Dank und viele Grüße,

 

Uwe

 

Von: Qgis-user [mailto:qgis-user-bounces at lists.osgeo.org] Im Auftrag von Bernd Vogelgesang
Gesendet: Donnerstag, 25. Februar 2016 12:03
An: qgis-user at lists.osgeo.org
Betreff: Re: [Qgis-user] how to use v.clean.advanced?

 

Hi Uwe,

 

Am 25.02.2016, 09:44 Uhr, schrieb Uwe Fischer <gisfisch at t-online.de <mailto: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/18b73ec8/attachment.html>


More information about the Qgis-user mailing list