Metadata-Version: 2.1
Name: pickLayer
Version: 3.9.13
Summary: QGIS plugin for setting layer properties and options straight from map canvas and for activating layer by clicking features on map.
Home-page: https://github.com/nlsfi/pickLayer
Author: National Land Survey of Finland
Author-email: os@nls.fi
License: GNU GPL v3.0
Project-URL: Changelog, https://github.com/nlsfi/pickLayer/blob/main/CHANGELOG.md
Keywords: qgis
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: qgis_plugin_tools>=0.4.0

# 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
