viewtif 0.1.4__py3-none-any.whl → 0.1.5__py3-none-any.whl

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.
viewtif/tif_viewer.py CHANGED
@@ -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 ------------------------------ #
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: viewtif
3
- Version: 0.1.4
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
@@ -50,9 +50,9 @@ viewtif examples/sample_data/ECOSTRESS_LST.tif \
50
50
 
51
51
  # View an RGB composite
52
52
  viewtif --rgbfiles \
53
- examples/sample_data/HLS_B4.tif \
54
- examples/sample_data/HLS_B3.tif \
55
- 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
56
56
 
57
57
  ```
58
58
 
@@ -77,13 +77,17 @@ viewtif --rgbfiles \
77
77
  ## Example Data
78
78
  - ECOSTRESS_LST.tif
79
79
  - Zip_Codes.shp and associated files
80
- - HLS_B4.tif, HLS_B3.tif, HLS_B2.tif (RGB sample)
80
+ - HLS_B04.tif, HLS_B03.tif, HLS_B02.tif (RGB sample)
81
81
 
82
82
  ## Credit & License
83
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.
84
84
 
85
85
  # Citation
86
- 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.
87
87
 
88
88
  # License
89
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
+
@@ -0,0 +1,5 @@
1
+ viewtif/tif_viewer.py,sha256=Ix6g3-yD4B_O6rs-3_CiOxmlnqv24YIPyDKUlR4Tql8,20650
2
+ viewtif-0.1.5.dist-info/METADATA,sha256=8jNlkKoF1qVcacV9WTj6V_F7JpZFNaaR5YF6YUQ487s,3512
3
+ viewtif-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
+ viewtif-0.1.5.dist-info/entry_points.txt,sha256=NVEjlRyJ7R7hFPOVsZJio3Hl0VqlX7_oVfA7819XvHM,52
5
+ viewtif-0.1.5.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- viewtif/tif_viewer.py,sha256=MGOSrYYe5rJpJRALTNQIHii8JNb5I8vMlo3Edlb09vA,19891
2
- viewtif-0.1.4.dist-info/METADATA,sha256=Odi7eo1Zx0QlWJhS4hi8bByAPSkciwh80X18ATJaMLY,3391
3
- viewtif-0.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
- viewtif-0.1.4.dist-info/entry_points.txt,sha256=NVEjlRyJ7R7hFPOVsZJio3Hl0VqlX7_oVfA7819XvHM,52
5
- viewtif-0.1.4.dist-info/RECORD,,