viewtif 0.1.3__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: viewtif
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: Simple GeoTIFF viewer with optional shapefile overlay.
5
5
  Project-URL: Homepage, https://github.com/nkeikon/tifviewer
6
6
  Project-URL: Source, https://github.com/nkeikon/tifviewer
@@ -32,6 +32,13 @@ You can visualize single-band GeoTIFFs, RGB composites, and shapefile overlays i
32
32
  pip install viewtif
33
33
  ```
34
34
 
35
+ If you want to enable shapefile overlays, install with optional dependencies:
36
+ ```bash
37
+ pip install "viewtif[geo]"
38
+ ```
39
+ Note for macOS(zsh) users:
40
+ Make sure to include the quotes, or zsh will interpret it as a pattern.
41
+
35
42
  ## Quick Start
36
43
  ```bash
37
44
  # View a GeoTIFF
@@ -43,9 +50,9 @@ viewtif examples/sample_data/ECOSTRESS_LST.tif \
43
50
 
44
51
  # View an RGB composite
45
52
  viewtif --rgbfiles \
46
- examples/sample_data/HLS_B4.tif \
47
- examples/sample_data/HLS_B3.tif \
48
- examples/sample_data/HLS_B2.tif
53
+ examples/sample_data/HLS_B04.tif \
54
+ examples/sample_data/HLS_B03.tif \
55
+ examples/sample_data/HLS_B02.tif
49
56
 
50
57
  ```
51
58
 
@@ -70,13 +77,17 @@ viewtif --rgbfiles \
70
77
  ## Example Data
71
78
  - ECOSTRESS_LST.tif
72
79
  - Zip_Codes.shp and associated files
73
- - HLS_B4.tif, HLS_B3.tif, HLS_B2.tif (RGB sample)
80
+ - HLS_B04.tif, HLS_B03.tif, HLS_B02.tif (RGB sample)
74
81
 
75
82
  ## Credit & License
76
83
  `viewtif` was inspired by the NASA JPL Thermal Viewer — Semi-Automated Georeferencer (GeoViewer v1.12) developed by Jake Longenecker (University of Miami Rosenstiel School of Marine, Atmospheric & Earth Science) while at the NASA Jet Propulsion Laboratory, California Institute of Technology, with inspiration from JPL’s ECOSTRESS geolocation batch workflow by Andrew Alamillo. The original GeoViewer was released under the MIT License (2025) and may be freely adapted with citation.
77
84
 
78
85
  # Citation
79
- Longenecker, Jake; Lee, Christine; Hulley, Glynn; Cawse-Nicholson, Kerry; Purkis, Sam; Gleason, Art; Otis, Dan; Galdamez, Illeana; Meiseles, Jacquelyn. GeoViewer v1.12: NASA JPL Thermal Viewer—Semi-Automated Georeferencer User Guide & Reference Manual. Jet Propulsion Laboratory, California Institute of Technology, 2025. PDF.
86
+ Longenecker, Jake; Lee, Christine; Hulley, Glynn; Cawse-Nicholson, Kerry; Purkis, Sam; Gleason, Art; Otis, Dan; Galdamez,Ileana; Meiseles, Jacquelyn. GeoViewer v1.12: NASA JPL Thermal Viewer—Semi-Automated Georeferencer User Guide & Reference Manual. Jet Propulsion Laboratory, California Institute of Technology, 2025. PDF.
80
87
 
81
88
  # License
82
89
  This project is released under the MIT License.
90
+
91
+ ## Contributors
92
+ - [@HarshShinde0](https://github.com/HarshShinde0) — added mouse-wheel and trackpad zoom support
93
+
@@ -12,6 +12,13 @@ You can visualize single-band GeoTIFFs, RGB composites, and shapefile overlays i
12
12
  pip install viewtif
13
13
  ```
14
14
 
15
+ If you want to enable shapefile overlays, install with optional dependencies:
16
+ ```bash
17
+ pip install "viewtif[geo]"
18
+ ```
19
+ Note for macOS(zsh) users:
20
+ Make sure to include the quotes, or zsh will interpret it as a pattern.
21
+
15
22
  ## Quick Start
16
23
  ```bash
17
24
  # View a GeoTIFF
@@ -23,9 +30,9 @@ viewtif examples/sample_data/ECOSTRESS_LST.tif \
23
30
 
24
31
  # View an RGB composite
25
32
  viewtif --rgbfiles \
26
- examples/sample_data/HLS_B4.tif \
27
- examples/sample_data/HLS_B3.tif \
28
- examples/sample_data/HLS_B2.tif
33
+ examples/sample_data/HLS_B04.tif \
34
+ examples/sample_data/HLS_B03.tif \
35
+ examples/sample_data/HLS_B02.tif
29
36
 
30
37
  ```
31
38
 
@@ -50,13 +57,17 @@ viewtif --rgbfiles \
50
57
  ## Example Data
51
58
  - ECOSTRESS_LST.tif
52
59
  - Zip_Codes.shp and associated files
53
- - HLS_B4.tif, HLS_B3.tif, HLS_B2.tif (RGB sample)
60
+ - HLS_B04.tif, HLS_B03.tif, HLS_B02.tif (RGB sample)
54
61
 
55
62
  ## Credit & License
56
63
  `viewtif` was inspired by the NASA JPL Thermal Viewer — Semi-Automated Georeferencer (GeoViewer v1.12) developed by Jake Longenecker (University of Miami Rosenstiel School of Marine, Atmospheric & Earth Science) while at the NASA Jet Propulsion Laboratory, California Institute of Technology, with inspiration from JPL’s ECOSTRESS geolocation batch workflow by Andrew Alamillo. The original GeoViewer was released under the MIT License (2025) and may be freely adapted with citation.
57
64
 
58
65
  # Citation
59
- Longenecker, Jake; Lee, Christine; Hulley, Glynn; Cawse-Nicholson, Kerry; Purkis, Sam; Gleason, Art; Otis, Dan; Galdamez, Illeana; Meiseles, Jacquelyn. GeoViewer v1.12: NASA JPL Thermal Viewer—Semi-Automated Georeferencer User Guide & Reference Manual. Jet Propulsion Laboratory, California Institute of Technology, 2025. PDF.
66
+ Longenecker, Jake; Lee, Christine; Hulley, Glynn; Cawse-Nicholson, Kerry; Purkis, Sam; Gleason, Art; Otis, Dan; Galdamez,Ileana; Meiseles, Jacquelyn. GeoViewer v1.12: NASA JPL Thermal Viewer—Semi-Automated Georeferencer User Guide & Reference Manual. Jet Propulsion Laboratory, California Institute of Technology, 2025. PDF.
60
67
 
61
68
  # License
62
69
  This project is released under the MIT License.
70
+
71
+ ## Contributors
72
+ - [@HarshShinde0](https://github.com/HarshShinde0) — added mouse-wheel and trackpad zoom support
73
+
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "viewtif"
7
- version = "0.1.3"
7
+ version = "0.1.5"
8
8
  description = "Simple GeoTIFF viewer with optional shapefile overlay."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -62,6 +62,31 @@ class RasterView(QGraphicsView):
62
62
  self.setTransformationAnchor(QGraphicsView.ViewportAnchor.AnchorUnderMouse)
63
63
  self.setResizeAnchor(QGraphicsView.ViewportAnchor.AnchorViewCenter)
64
64
  self.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
65
+ self._wheel_zoom_step = 1.2
66
+
67
+ def wheelEvent(self, event):
68
+ """Zoom in/out centered at the cursor position.
69
+
70
+ Uses a multiplicative scale per 15° wheel step.
71
+ """
72
+ delta = event.angleDelta().y()
73
+ if delta == 0:
74
+ # Trackpads may report pixelDelta; fall back to it if angleDelta is 0
75
+ pixel_delta = event.pixelDelta().y()
76
+ delta = pixel_delta
77
+
78
+ if delta == 0:
79
+ event.ignore()
80
+ return
81
+
82
+ steps = delta / 120.0 # 120 units per 15° step
83
+ if steps > 0:
84
+ factor = self._wheel_zoom_step ** steps
85
+ else:
86
+ factor = (1.0 / self._wheel_zoom_step) ** (-steps)
87
+
88
+ self.scale(factor, factor)
89
+ event.accept()
65
90
 
66
91
 
67
92
  # ------------------------------- Main Window ------------------------------ #
File without changes
File without changes