viewtif 0.2.3__tar.gz → 0.2.4__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.
- {viewtif-0.2.3 → viewtif-0.2.4}/PKG-INFO +1 -1
- {viewtif-0.2.3 → viewtif-0.2.4}/pyproject.toml +1 -1
- {viewtif-0.2.3 → viewtif-0.2.4}/src/viewtif/tif_viewer.py +7 -7
- {viewtif-0.2.3 → viewtif-0.2.4}/.gitignore +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/README.md +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/README.md +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/AG100.v003.13.-017.0001.h5 +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/ECOSTRESS_LST.tif +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/HLS_B02.tif +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/HLS_B03.tif +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/HLS_B04.tif +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/Zip_Codes.cpg +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/Zip_Codes.dbf +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/Zip_Codes.prj +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/Zip_Codes.shp +0 -0
- {viewtif-0.2.3 → viewtif-0.2.4}/examples/sample_data/Zip_Codes.shx +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: viewtif
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Lightweight GeoTIFF, NetCDF, HDF/HDF5, and Esri File Geodatabase (.gdb) viewer with optional shapefile overlay. NetCDF and cartopy support available via pip install viewtif[netcdf].
|
|
5
5
|
Project-URL: Homepage, https://github.com/nkeikon/tifviewer
|
|
6
6
|
Project-URL: Source, https://github.com/nkeikon/tifviewer
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "viewtif"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.4"
|
|
8
8
|
description = "Lightweight GeoTIFF, NetCDF, HDF/HDF5, and Esri File Geodatabase (.gdb) viewer with optional shapefile overlay. NetCDF and cartopy support available via pip install viewtif[netcdf]."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -42,7 +42,7 @@ import matplotlib.cm as cm
|
|
|
42
42
|
import warnings
|
|
43
43
|
warnings.filterwarnings("ignore", category=RuntimeWarning, module="shapely")
|
|
44
44
|
|
|
45
|
-
__version__ = "0.2.
|
|
45
|
+
__version__ = "0.2.4"
|
|
46
46
|
|
|
47
47
|
# Optional overlay deps
|
|
48
48
|
try:
|
|
@@ -768,7 +768,7 @@ class TiffViewer(QMainWindow):
|
|
|
768
768
|
# If first pixel row corresponds to southernmost lat → flip to make north at top
|
|
769
769
|
# We'll assume data[0, :] corresponds to lats[0]
|
|
770
770
|
if lat_ascending:
|
|
771
|
-
print("[DEBUG] Flipping latitude orientation (lat ascending, data starts south)")
|
|
771
|
+
# print("[DEBUG] Flipping latitude orientation (lat ascending, data starts south)")
|
|
772
772
|
frame = np.flipud(frame)
|
|
773
773
|
# else:
|
|
774
774
|
# print("[DEBUG] No flip (lat descending, already north-up)")
|
|
@@ -779,7 +779,7 @@ class TiffViewer(QMainWindow):
|
|
|
779
779
|
first_col = lats[:, 0]
|
|
780
780
|
lat_ascending = first_col[0] < first_col[-1]
|
|
781
781
|
if lat_ascending:
|
|
782
|
-
print("[DEBUG] Flipping latitude orientation (2D grid ascending)")
|
|
782
|
+
# print("[DEBUG] Flipping latitude orientation (2D grid ascending)")
|
|
783
783
|
frame = np.flipud(frame)
|
|
784
784
|
# else:
|
|
785
785
|
# print("[DEBUG] No flip (2D grid already north-up)")
|
|
@@ -793,7 +793,7 @@ class TiffViewer(QMainWindow):
|
|
|
793
793
|
return frame
|
|
794
794
|
|
|
795
795
|
step = int(self._scale_arg)
|
|
796
|
-
print(f"
|
|
796
|
+
print(f"Applying scale factor {step} to current frame")
|
|
797
797
|
|
|
798
798
|
# Downsample the frame
|
|
799
799
|
frame = frame[::step, ::step]
|
|
@@ -1049,12 +1049,12 @@ class TiffViewer(QMainWindow):
|
|
|
1049
1049
|
|
|
1050
1050
|
# --- Synchronize latitude orientation with normalized data ---
|
|
1051
1051
|
if np.ndim(lats) == 1 and lats[0] < lats[-1]:
|
|
1052
|
-
print("[DEBUG] Lat ascending → flip lats_downsampled to match flipped data")
|
|
1052
|
+
# print("[DEBUG] Lat ascending → flip lats_downsampled to match flipped data")
|
|
1053
1053
|
lats_downsampled = lats_downsampled[::-1]
|
|
1054
1054
|
elif np.ndim(lats) == 2:
|
|
1055
1055
|
first_col = lats[:, 0]
|
|
1056
1056
|
if first_col[0] < first_col[-1]:
|
|
1057
|
-
print("[DEBUG] 2D lat grid ascending → flip lats_downsampled vertically")
|
|
1057
|
+
# print("[DEBUG] 2D lat grid ascending → flip lats_downsampled vertically")
|
|
1058
1058
|
lats_downsampled = np.flipud(lats_downsampled)
|
|
1059
1059
|
|
|
1060
1060
|
# Convert 0–360 longitude to −180–180 if needed
|
|
@@ -1321,7 +1321,7 @@ def run_viewer(
|
|
|
1321
1321
|
import click
|
|
1322
1322
|
|
|
1323
1323
|
@click.command()
|
|
1324
|
-
@click.version_option("0.2.
|
|
1324
|
+
@click.version_option("0.2.4", prog_name="viewtif")
|
|
1325
1325
|
@click.argument("tif_path", required=False)
|
|
1326
1326
|
@click.option("--band", default=1, show_default=True, type=int, help="Band number to display")
|
|
1327
1327
|
@click.option("--scale", default=1.0, show_default=True, type=int, help="Scale factor for display")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|