Reputation
4,722
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
11 22
Newest
 Enlightened
Impact
~121k people reached

7h
comment Way to find minimum value from a group of values - QGIS?
If you write out ID, MinDist records from the Group Stats tool to a table, then join that to your map data on ID, then each feature will then have its Distance and the MinDist for its ID. Then one selection for Distance==MinDist gets you one feature per ID (unless there's MinDist ties...)
9h
comment Way to find minimum value from a group of values - QGIS?
If I'd not spent five minutes discovering you had to drag stuff around and another five minutes figuring out what to drag where my answer would have beaten yours! Is this basically a spreadsheet "Pivot Table" equivalent?
10h
comment Way to find minimum value from a group of values - QGIS?
You'll find the "Group Stats" menu item in the "Vector" menu once its installed. Tutorial here: anitagraser.com/2013/02/02/group-stats-tutorial
11h
comment Way to find minimum value from a group of values - QGIS?
"Minimum distance" to or from where of each unique value? What defines a "group"? An attribute value? If the output isn't the same length as the number of features then I don't think the field calculator will help - its either a python script or some R code via the processing module. Please clarify your question.
2d
comment Remove inner rings from QgsGeometry polygon in QGIS Python
What do you want to do if the geometry is a MultiPolygon, ie more than one outer ring - as in the case of a feature that is two islands?
2d
comment count band numbers from multiband raster image
Could you add a tag for the software you are using here? "raster-calculator" doesn't identify it precisely.
2d
accepted Make a Qgis layer update from a changed data source
2d
comment Make a Qgis layer update from a changed data source
Looks like the best solution. The .changeAttributeValues brings up an "ERROR 1: Attempt to read shape with feature id (-1) out of available range." but that's okay.
Aug
29
comment Make a Qgis layer update from a changed data source
Yes @MatthiasKuhn - although sometimes that works, but not often. I just wrote a modified shapefile, did both those things in the Python console (on the right layer), no visual update. The simplest thing that has worked 100% so far is creating a new throwaway layer object based on the original layer source as mentioned above and then triggerRepaint() on the original layer. v 2.10.1-Pisa
Aug
29
revised Make a Qgis layer update from a changed data source
added 171 characters in body
Aug
29
comment Make a Qgis layer update from a changed data source
@NathanW most of what I'm doing is from the gui - load layer, style it - then its just getting the layer and those few lines in the Python console. I'm disinclined to stick this in the framework of a plugin until I know I can make the principle work! I was hoping there'd be a quick answer ("call layer.updateFromNewDataYouFool()") but I'll fill this out with more code (including R code to make the shapefiles) later.
Aug
28
revised Make a Qgis layer update from a changed data source
added 451 characters in body
Aug
28
answered How to show variable values in message bar in QGIS?
Aug
28
revised Make a Qgis layer update from a changed data source
added 122 characters in body
Aug
28
comment Make a Qgis layer update from a changed data source
I tried on #qgis on IRC but maybe I need to post to qgis-dev mailing list...
Aug
28
comment Make a Qgis layer update from a changed data source
As I said in my question, and as mentioned in the link I gave, triggerRepaint() doesn't work. refresh() on the map canvas doesn't work. Setting the cache image to None (which is now deprecated in the API docs) doesn't work. I just tried all these things on a newly modified shapefile layer, panned the map about, toggled vis on and off, it didn't work. "Duplicate" the layer and it updates instantly though. Have you tried these things yourself (on 2.10)?
Aug
27
asked Make a Qgis layer update from a changed data source
Aug
27
comment A reliable source of shapefiles for boundary data?
Clarification: you just want city boundaries? So for example a shapefile for London would be one feature, London (but probably divided into islands and rings split by the river...). Similarly for New York you'd have one feature but the islands and the mainland?
Aug
26
comment Drawing polygon on PDF in Python?
How does this relate to QGis, arcgis, or GIS at all?
Aug
26
comment How to find the irregular polygons in qgis using python
A regular polygon is a specific thing, mathematically speaking: en.wikipedia.org/wiki/Regular_polygon - you probably mean "invalid". Or something else. What do you mean by "irregular"?