Timeline for QGIS set default style for layers based on name
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 16, 2016 at 10:34 | vote | accept | Ed Rollason | ||
Jun 22, 2016 at 12:06 | comment | added | Ed Rollason | That works well thanks - I'll leave it open for 24hr to see if anyone suggests anything else and then I'll mark it answered. Now i should look at implementing it as a plugin I guess! | |
Jun 22, 2016 at 11:39 | comment | added | Joseph | @EdRollason - Made a slight edit to the code which should now check to see if the style name is used in the layer name =) | |
Jun 22, 2016 at 11:37 | comment | added | Joseph | @NathanW - Pro tip from a pro! Will try and implement that into the script ;) | |
Jun 22, 2016 at 11:36 | history | edited | Joseph | CC BY-SA 3.0 |
Minor edit in response to OP's comment
|
Jun 22, 2016 at 10:56 | comment | added | Ed Rollason | Ooh that is tantalisingly close. Is it capable of doing wildcards? For example my rasters are called NAME-XXXX where the XXXX is an iterating number so could it be set up to search just for a name stub? | |
Jun 22, 2016 at 10:55 | comment | added | Nathan W |
Tip: You can do QgsMapLayerRegistry.instance().mapLayersByName() to just get the layers with the matching name without the loop.
|
|
Jun 22, 2016 at 10:03 | history | answered | Joseph | CC BY-SA 3.0 |