# PickLayer
![tests](https://github.com/nlsfi/pickLayer/workflows/Tests/badge.svg)
[![codecov.io](https://codecov.io/github/nlsfi/pickLayer/coverage.svg?branch=main)](https://codecov.io/github/nlsfi/pickLayer?branch=main)
![release](https://github.com/nlsfi/pickLayer/workflows/Release/badge.svg)
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
Set layer properties and options straight from map canvas. Activate layer by clicking
features on map.
Originally created and maintained by [enricofer](https://github.com/enricofer)
in <https://github.com/enricofer/pickLayer>.
## Usage from other plugins
It is possible to control SetActiveLayerTool programmatically using public methods
defined in Plugin-class.
```python
from qgis.core import QgsPointXY
from qgis.utils import plugins
some_point = QgsPointXY(123, 456)
# Activates layer if features are found near given point
plugins["pickLayer"].set_active_layer_using_closest_feature(point_xy=some_point)
# Activates layer with custom search radius (in map units)
plugins["pickLayer"].set_active_layer_using_closest_feature(point_xy=some_point, search_radius=100)
# Activates layer using subset of layers (expects layer ids)
plugins["pickLayer"].set_active_layer_using_closest_feature(point_xy=some_point, search_layers=["layer-1", "layer-2"])
# Set search layers for set active layer map tool (expects layer ids)
plugins["pickLayer"].set_search_layers_for_set_active_layer_tool_action(search_layers=["layer-1", "layer-2"])
# Reset search layers for set active layer map tool (will use all vector layers in project)
plugins["pickLayer"].set_search_layers_for_set_active_layer_tool_action(search_layers=None)
# Get action for e.g. defining shortcut key programmatically
action = plugins["pickLayer"].get_set_active_layer_tool_action()
# action.do_something()
```
## Development
Refer to [development](docs/development.md) for developing this QGIS3 plugin.
## License
This plugin is licenced with
[GNU General Public License, version 3](https://www.gnu.org/licenses/gpl-3.0.html).
See [LICENSE](LICENSE) for more information.
# CHANGELOG
## [3.9.13] - 2025-01-02
- Chore: Update tooltip for pick layer action
## [3.9.12] - 2024-01-26
- Upgrade qgis_plugin_tools to version that supports subplugins
## [3.9.11] - 2023-11-03
- Release plugin to pypi as well for easier access for other plugins
## [3.9.10] - 2023-11-02
- Fix defining layers to search from for set active layer tool
## [3.9.9] - 2023-11-01
- Find most logical closest feature from nested features with set active layer tool
- Add qgis-plugin-dev-tools entry point to aid development with other plugins
## [3.9.8] - 2023-09-12
- Fix: Include .qm translation files to the zip generated by release workflow action
## [3.9.7] - 2023-09-06
- update author email
## [3.9.6] - 2023-06-16
- fix plugin versioning
## 3.9.5 - 2023-06-16
- fix layer order in set active layer tool
## [3.9.4] - 2023-02-08
- fix plugin packaging
## [3.9.3] - 2023-02-08
- update requirements to match qgis-plugin-dev-tools version
## [3.9.2] - 2023-02-08
- update qgis-plugin-dev-tools version in order to produce valid zip plugin
## [3.9.1] - 2023-02-07
- fix release workflow and create separate workflows for running tests and creating draft releases
- set development.md up-to-date
## 3.9.0 - 2023-01-27
- update icons (in order to increase distinguishability)
- remove qgis plugin tools git submodule and use it as python dependency
- update python dependencies
## 3.8.0 - 2022-12-14
- update icons
- add pre-commit hooks for markdown files' style checks and for checking that commit
messages follow convention
- allow user to click on raster file without python error being launched
## 3.7.0 - 2022-09-27
- add possibility to define layers to search from for set active layer tool
## 3.6.0 - 2022-09-17
- add default shortcut for pick active layer action
## 3.5.0 - 2022-07-19
- add finnish translations
## 3.4.0 - 2022-06-29
- pick active by clicking now considers distance between same type of layers
- automatically return to previous map tool after successfull use of set active layer tool
## 3.3.0 - 2022-04-04
- adds a new tool to set active layer by clicking features on map
- if multiple layers are found, active layer is chosen in this order: point layer, line
layer, polygon layer, other map layers
## 3.2.0 - 2021-06-29
- perform spatial operation on selected feature
- fix bugs: custom actions, copying features
- reformat using black, isort and flake8
- refactor to use qgis_plugin_tools
- add CI and CD pipelines
## 3.1.0 - 2018-07-05
- subtract geometry new feature
- merge with geometry new feature
- makeValid geometry new feature
- feature highlighting
## 3.0.0 - 2018-03-30
- code migration to QGIS3
## 2.3.0 - 2016-06-20
- attributes values in context submenu - with copy to clipboard of content
- configure snapping options issue fixed
- coords typo issue fixed
## 2.2.0 - 2015-06-12
- issue picking on line feature fixed
## 2.1.0 - 2015-05-15
- selected layer and feature infos
- copy area and length to clipboard
- change datasource issues fixed
## 2.0.0 - 2014-11-03
- layer commands added:
- zoom to layer
- change data source (experimental)
- feature commands added:
- zoom to feature
- copy feature and paste geometries and attributes
- other commands:
- layer actions attached to context menu
[3.9.1]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.1>
[3.9.2]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.2>
[3.9.3]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.3>
[3.9.4]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.4>
[3.9.6]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.6>
[3.9.7]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.7
[3.9.8]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.8
[3.9.9]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.9
[3.9.10]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.10
[3.9.11]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.11
[3.9.12]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.12
[3.9.13]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.13
Raw data
{
"_id": null,
"home_page": "https://github.com/nlsfi/pickLayer",
"name": "pickLayer",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "qgis",
"author": "National Land Survey of Finland",
"author_email": "os@nls.fi",
"download_url": "https://files.pythonhosted.org/packages/90/48/7506e4f4b4d62d5cfd0730eb537cbabd18aa884518cf34760715650e90e8/picklayer-3.9.13.tar.gz",
"platform": null,
"description": "# PickLayer\n\n![tests](https://github.com/nlsfi/pickLayer/workflows/Tests/badge.svg)\n[![codecov.io](https://codecov.io/github/nlsfi/pickLayer/coverage.svg?branch=main)](https://codecov.io/github/nlsfi/pickLayer?branch=main)\n![release](https://github.com/nlsfi/pickLayer/workflows/Release/badge.svg)\n[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n\nSet layer properties and options straight from map canvas. Activate layer by clicking\nfeatures on map.\n\nOriginally created and maintained by [enricofer](https://github.com/enricofer)\nin <https://github.com/enricofer/pickLayer>.\n\n## Usage from other plugins\n\nIt is possible to control SetActiveLayerTool programmatically using public methods\ndefined in Plugin-class.\n\n```python\nfrom qgis.core import QgsPointXY\nfrom qgis.utils import plugins\n\nsome_point = QgsPointXY(123, 456)\n\n# Activates layer if features are found near given point\nplugins[\"pickLayer\"].set_active_layer_using_closest_feature(point_xy=some_point)\n\n# Activates layer with custom search radius (in map units)\nplugins[\"pickLayer\"].set_active_layer_using_closest_feature(point_xy=some_point, search_radius=100)\n\n# Activates layer using subset of layers (expects layer ids)\nplugins[\"pickLayer\"].set_active_layer_using_closest_feature(point_xy=some_point, search_layers=[\"layer-1\", \"layer-2\"])\n\n# Set search layers for set active layer map tool (expects layer ids)\nplugins[\"pickLayer\"].set_search_layers_for_set_active_layer_tool_action(search_layers=[\"layer-1\", \"layer-2\"])\n\n# Reset search layers for set active layer map tool (will use all vector layers in project)\nplugins[\"pickLayer\"].set_search_layers_for_set_active_layer_tool_action(search_layers=None)\n\n# Get action for e.g. defining shortcut key programmatically\naction = plugins[\"pickLayer\"].get_set_active_layer_tool_action()\n# action.do_something()\n\n```\n\n## Development\n\nRefer to [development](docs/development.md) for developing this QGIS3 plugin.\n\n## License\n\nThis plugin is licenced with\n[GNU General Public License, version 3](https://www.gnu.org/licenses/gpl-3.0.html).\nSee [LICENSE](LICENSE) for more information.\n\n# CHANGELOG\n\n## [3.9.13] - 2025-01-02\n\n- Chore: Update tooltip for pick layer action\n\n## [3.9.12] - 2024-01-26\n\n- Upgrade qgis_plugin_tools to version that supports subplugins\n\n## [3.9.11] - 2023-11-03\n\n- Release plugin to pypi as well for easier access for other plugins\n\n## [3.9.10] - 2023-11-02\n\n- Fix defining layers to search from for set active layer tool\n\n## [3.9.9] - 2023-11-01\n\n- Find most logical closest feature from nested features with set active layer tool\n- Add qgis-plugin-dev-tools entry point to aid development with other plugins\n\n## [3.9.8] - 2023-09-12\n\n- Fix: Include .qm translation files to the zip generated by release workflow action\n\n## [3.9.7] - 2023-09-06\n\n- update author email\n\n## [3.9.6] - 2023-06-16\n\n- fix plugin versioning\n\n## 3.9.5 - 2023-06-16\n\n- fix layer order in set active layer tool\n\n## [3.9.4] - 2023-02-08\n\n- fix plugin packaging\n\n## [3.9.3] - 2023-02-08\n\n- update requirements to match qgis-plugin-dev-tools version\n\n## [3.9.2] - 2023-02-08\n\n- update qgis-plugin-dev-tools version in order to produce valid zip plugin\n\n## [3.9.1] - 2023-02-07\n\n- fix release workflow and create separate workflows for running tests and creating draft releases\n- set development.md up-to-date\n\n## 3.9.0 - 2023-01-27\n\n- update icons (in order to increase distinguishability)\n- remove qgis plugin tools git submodule and use it as python dependency\n- update python dependencies\n\n## 3.8.0 - 2022-12-14\n\n- update icons\n- add pre-commit hooks for markdown files' style checks and for checking that commit\n messages follow convention\n- allow user to click on raster file without python error being launched\n\n## 3.7.0 - 2022-09-27\n\n- add possibility to define layers to search from for set active layer tool\n\n## 3.6.0 - 2022-09-17\n\n- add default shortcut for pick active layer action\n\n## 3.5.0 - 2022-07-19\n\n- add finnish translations\n\n## 3.4.0 - 2022-06-29\n\n- pick active by clicking now considers distance between same type of layers\n- automatically return to previous map tool after successfull use of set active layer tool\n\n## 3.3.0 - 2022-04-04\n\n- adds a new tool to set active layer by clicking features on map\n- if multiple layers are found, active layer is chosen in this order: point layer, line\n layer, polygon layer, other map layers\n\n## 3.2.0 - 2021-06-29\n\n- perform spatial operation on selected feature\n- fix bugs: custom actions, copying features\n- reformat using black, isort and flake8\n- refactor to use qgis_plugin_tools\n- add CI and CD pipelines\n\n## 3.1.0 - 2018-07-05\n\n- subtract geometry new feature\n- merge with geometry new feature\n- makeValid geometry new feature\n- feature highlighting\n\n## 3.0.0 - 2018-03-30\n\n- code migration to QGIS3\n\n## 2.3.0 - 2016-06-20\n\n- attributes values in context submenu - with copy to clipboard of content\n- configure snapping options issue fixed\n- coords typo issue fixed\n\n## 2.2.0 - 2015-06-12\n\n- issue picking on line feature fixed\n\n## 2.1.0 - 2015-05-15\n\n- selected layer and feature infos\n- copy area and length to clipboard\n- change datasource issues fixed\n\n## 2.0.0 - 2014-11-03\n\n- layer commands added:\n - zoom to layer\n - change data source (experimental)\n- feature commands added:\n - zoom to feature\n - copy feature and paste geometries and attributes\n- other commands:\n - layer actions attached to context menu\n\n[3.9.1]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.1>\n[3.9.2]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.2>\n[3.9.3]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.3>\n[3.9.4]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.4>\n[3.9.6]: <https://github.com/nlsfi/pickLayer/releases/tag/v3.9.6>\n[3.9.7]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.7\n[3.9.8]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.8\n[3.9.9]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.9\n[3.9.10]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.10\n[3.9.11]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.11\n[3.9.12]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.12\n[3.9.13]: https://github.com/nlsfi/pickLayer/releases/tag/v3.9.13\n",
"bugtrack_url": null,
"license": "GNU GPL v3.0",
"summary": "QGIS plugin for setting layer properties and options straight from map canvas and for activating layer by clicking features on map.",
"version": "3.9.13",
"project_urls": {
"Changelog": "https://github.com/nlsfi/pickLayer/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/nlsfi/pickLayer"
},
"split_keywords": [
"qgis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "25f97768d3269991285f19e1bff1fd0087c5bb14e5cab9952b1a66cc3ed90595",
"md5": "75de8a5dff66950521b51e956f138298",
"sha256": "9cdab35d29f4e6e8ad23ae632710f0f8806841a3040e2635188f3294ce6c34c0"
},
"downloads": -1,
"filename": "pickLayer-3.9.13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "75de8a5dff66950521b51e956f138298",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 69415,
"upload_time": "2025-01-02T13:06:05",
"upload_time_iso_8601": "2025-01-02T13:06:05.774398Z",
"url": "https://files.pythonhosted.org/packages/25/f9/7768d3269991285f19e1bff1fd0087c5bb14e5cab9952b1a66cc3ed90595/pickLayer-3.9.13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "90487506e4f4b4d62d5cfd0730eb537cbabd18aa884518cf34760715650e90e8",
"md5": "16aa93fe9107c73b58c983428149f524",
"sha256": "45efc7ca276eb70746b278fd9a0e0428aa4c264581feb2b78973d26b8138b106"
},
"downloads": -1,
"filename": "picklayer-3.9.13.tar.gz",
"has_sig": false,
"md5_digest": "16aa93fe9107c73b58c983428149f524",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 59375,
"upload_time": "2025-01-02T13:06:06",
"upload_time_iso_8601": "2025-01-02T13:06:06.880989Z",
"url": "https://files.pythonhosted.org/packages/90/48/7506e4f4b4d62d5cfd0730eb537cbabd18aa884518cf34760715650e90e8/picklayer-3.9.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-02 13:06:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nlsfi",
"github_project": "pickLayer",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"lcname": "picklayer"
}