New answers tagged

0

A possible solution is using the Field Calculator to create a label that show the sum of the selected lines. In the lines layer create a label using the expression array_sum(aggregate( layer:= 'line', aggregate:='array_agg', expression:=$length, filter:=is_selected())) NB: To use array_sum in the oldest QGIS versions you need to install the plugin ...


1

I think @Paul Goyes's solution only works if you have created a 1-mile polygon buffer layer for your point, similarly to Select by Location. I don't think the nearest neighbour algorithms are aimed at what you're trying to do either - they generally keep looking to find the closest match(es) and are about comparing what the best match is for each of ...


4

You can use QAD Plugin which has a scale option, and you can enter a scale factor to scale your feature. If you are familiar with AutoCAD, this plugin works almost same, and it is very powerful. For the QAD plugin to work properly, the features should be projected either in meter or foot. It does not work with geographic coordinates. Also, you should work ...


1

Extract black part from raster, convert to points and run kernel density on them: KernelDensity_sa("POINTS", "NONE", "C:/SCRATCH/COUNT", "1", "10") Note - you might play with search radius to get result that in your opinion shows future lines best. Select high density areas: RasterCalculator_sa('Con("COUNT" >= 500000,1)', "C:/SCRATCH/ONe") Convert it ...


1

Hopefully I understood you right- perhaps you should try to use raster calculator to pick only the relevant pixels, and once you have that, do Raster To Polygon. This way you'd end up with continuous areas.


1

@she_weeds was exactly right! My new monitor setup caused the geoprocessing window to be off on a different screen. Pressing Windows + the left button caused it to reappear.


1

Thanks @ustroetz for your excellent answer, it really helped me a lot. I will share an adjustment and extra step I implemented to remove the unsightly loops that appear as a consequence of the process. Note that this only works if your network is tree-like, which fortunately for my use case, mine always are. I introduce geopandas and networkx for this ...


0

So the answer to my question seems to be: There is not Extract-z tool in QGIS 3.4


5

QgsVectorLayer and QgsVectorDataProvider classes don't have any "save as"-like method. Thus, you have to use writeAsVectorFormatV2 method of QgsVectorFileWriter class in version 3.10.3+ (or writeAsVectorFormat in earlier 3.x version ). Using writeAsVectorFormatV2: i_out = processing.run("native:buffer", {.....})["OUTPUT"] path = "/Path/To/File.shp" ...


1

The rasterstats python module is based in rasterio, however, it has crop = True option activated by default (when I use raster_out = True for getting all unmasked array values) and I couldn't find an easy way for accessing to raster indices for converting them as points in map units. So, I used directly rasterio tools in following script (combined with your ...


4

Short answer: Q3 in the field names is just a output column prefix you specified. So, Q3first is z-value of the first point of the line/polygon. Q3q3 is the third quartile of the all z values of points of the line/polygon. CASE 1: Point Layer There is one Z value for each point. Therefore, all min, max, q1, q3, etc. are the same. CASE 2: Line or Polygon ...


1

From the processing Toolbox choose "Points to Path" tool. You can set the order field containing the ID order for each line and group the lines by a certain field You might need to create the points first to make it easier and set the order and the group. The group being the line ID I hope this helps.


1

You can mirror (transform) your geometry without modifying the original layer. You can just use the symbology and reflect your layer. In Symbology, open the Layer Rendering area > select Draw Effects and click in the yellow star. This will open a new tab. Here select Transform as Effect Type and activate the option that suits your needs (reflect ...


Top 50 recent answers are included