viewtif 0.2.6__py3-none-any.whl → 0.2.7__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.
@@ -0,0 +1,307 @@
1
+ Metadata-Version: 2.4
2
+ Name: viewtif
3
+ Version: 0.2.7
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
+ Project-URL: Homepage, https://github.com/nkeikon/tifviewer
6
+ Project-URL: Source, https://github.com/nkeikon/tifviewer
7
+ Project-URL: Issues, https://github.com/nkeikon/tifviewer/issues
8
+ Author: Keiko Nomura
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Requires-Python: >=3.10
12
+ Requires-Dist: click>=8.1
13
+ Requires-Dist: matplotlib>=3.7
14
+ Requires-Dist: numpy>=1.23
15
+ Requires-Dist: pyside6>=6.5
16
+ Requires-Dist: rasterio>=1.3
17
+ Provides-Extra: geo
18
+ Requires-Dist: geopandas>=0.13; extra == 'geo'
19
+ Requires-Dist: shapely>=2.0; extra == 'geo'
20
+ Provides-Extra: netcdf
21
+ Requires-Dist: cartopy>=0.22; extra == 'netcdf'
22
+ Requires-Dist: netcdf4>=1.6; extra == 'netcdf'
23
+ Requires-Dist: pandas>=2.0; extra == 'netcdf'
24
+ Requires-Dist: xarray>=2023.1; extra == 'netcdf'
25
+ Description-Content-Type: text/markdown
26
+
27
+ # viewtif
28
+ [![Downloads](https://static.pepy.tech/badge/viewtif)](https://pepy.tech/project/viewtif)
29
+ [![PyPI version](https://img.shields.io/pypi/v/viewtif)](https://pypi.org/project/viewtif/)
30
+ [![Python version](https://img.shields.io/badge/python-%3E%3D3.10-blue.svg)](https://pypi.org/project/viewtif/)
31
+
32
+ A lightweight GeoTIFF viewer for quick visualization directly from the command line.
33
+
34
+ You can visualize single-band GeoTIFFs, RGB composites, HDF, NetCDF files, and raster datasets within Esri File Geodatabases with vector overlays in a simple Qt-based window.
35
+
36
+ ## Installation
37
+
38
+ ```bash
39
+ pip install viewtif
40
+ ```
41
+ > **Note:** Requires Python 3.10 or higher. On Linux, you may need python3-tk, libqt5gui5, or PySide6 dependencies.
42
+ >
43
+ >`viewtif` requires a graphical display environment.
44
+ > It may not run properly on headless systems (e.g., HPC compute nodes or remote servers without X11 forwarding).
45
+
46
+ ### Optional dependencies
47
+
48
+ #### Vector overlay support
49
+ ```bash
50
+ pip install "viewtif[geo]"
51
+ ```
52
+ > **Note:** For macOS(zsh) users:
53
+ > Make sure to include the quotes, or zsh will interpret it as a pattern.
54
+
55
+ #### NetCDF support
56
+ ```bash
57
+ pip install "viewtif[netcdf]"
58
+ ```
59
+ > **Note:** For enhanced geographic visualization with map projections, coastlines, and borders, install with cartopy: `pip install "viewtif[netcdf]"` (cartopy is included in the netcdf extra). If cartopy is not available, netCDF files will still display with standard rendering.
60
+
61
+ #### HDF/HDF5 & FileGDB support
62
+ GDAL is required to open `.hdf`, `.h5`, `.hdf5`, and `.gdb` files.
63
+ ```bash
64
+ brew install gdal # macOS
65
+ sudo apt install gdal-bin python3-gdal # Linux
66
+ pip install GDAL
67
+ ```
68
+
69
+ ## Quick Start
70
+ ```bash
71
+ # View a GeoTIFF
72
+ viewtif ECOSTRESS_LST.tif
73
+
74
+ # View with vector overlay
75
+ viewtif ECOSTRESS_LST.tif --shapefile Zip_Codes.shp
76
+
77
+ # View RGB composite
78
+ viewtif --rgbfiles red.tif green.tif blue.tif
79
+ ```
80
+ ## File Format Support
81
+ ### GeoTIFF
82
+ `viewtif` supports single-band and multi-band GeoTIFF files. You can visualize individual bands or create RGB composites.
83
+
84
+ ```bash
85
+ # View single band
86
+ viewtif myfile.tif
87
+
88
+ # View specific band from multi-band file
89
+ viewtif myfile.tif --band 3
90
+
91
+ # Create RGB composite from multi-band file
92
+ viewtif rgb.tif --rgb 4 3 2
93
+
94
+ # Create RGB composite from separate files
95
+ viewtif --rgbfiles B4.tif B3.tif B2.tif
96
+ ```
97
+
98
+ ### HDF/HDF5
99
+ `viewtif` can open `.hdf`, `.h5`, and `.hdf5` files that contain multiple subdatasets. When opened, it lists available subdatasets and lets you view one by index. You can also specify a band to display (default is the first band) or change bands interactively with '[' and ']'.
100
+
101
+ ```bash
102
+ # List subdatasets
103
+ viewtif AG100.v003.33.-107.0001.h5
104
+
105
+ # View a specific subdataset
106
+ viewtif AG100.v003.33.-107.0001.h5 --subset 1
107
+
108
+ # View a specific subdataset and band
109
+ viewtif AG100.v003.33.-107.0001.h5 --subset 1 --band 3
110
+ ```
111
+
112
+ > **Note:** Some datasets (perhaps the majority of .hdf files) lack CRS information encoded, so shapefile overlays may not work. In that case, viewtif will display:
113
+ `[WARN] raster lacks CRS/transform; cannot place overlays.`
114
+
115
+ ### NetCDF
116
+ `viewtif` supports NetCDF (`.nc`) files via xarray, with optional cartopy-based geographic visualization. Use `[` / `]` to move forward or backward through time steps, and press M to switch between the three built-in colormaps ("RdBu_r", "viridis", "magma").
117
+
118
+ #### Multi-variable NetCDF files
119
+ If a NetCDF file contains multiple variables, viewtif will list them:
120
+ ```bash
121
+ viewtif data.nc
122
+ # Found 3 variables in data.nc:
123
+ # [0] temperature
124
+ # [1] pressure
125
+ # [2] humidity
126
+
127
+ viewtif data.nc --subset 1 # Opens pressure
128
+ ```
129
+ > **Note:** `viewtif` supports 2D (lat, lon) or 3D (time, lat, lon) NetCDF data. Variables with additional dimensions (e.g., vertical levels) are not currently supported (as of v0.2.7).
130
+
131
+ #### NetCDF visualization controls
132
+ - `--vmin [value] --vmax [value]` let you fix the display range (for all file types). Without this, the range adjusts to each band/timestep's min/max values.
133
+ - `--timestep [int]` lets you jump directly to a chosen time slice.
134
+ - `--cartopy off` let you see raw NetCDF images.
135
+
136
+ ```bash
137
+ viewtif data.nc
138
+ viewtif data.nc --vmin 280 --vmax 320
139
+ viewtif data.nc --timestep 100
140
+ viewtif data.nc --cartopy off
141
+ ```
142
+
143
+ ### File Geodatabase (.gdb)
144
+ `viewtif` can open raster datasets stored inside Esri File Geodatabases (`.gdb`). When you open a .gdb directly, `viewtif` will list available raster datasets first, then you can choose one to view.
145
+
146
+ ```bash
147
+ # List available raster datasets
148
+ viewtif /path/to/geodatabase.gdb
149
+
150
+ # Open a specific raster
151
+ viewtif "OpenFileGDB:/path/to/geodatabase.gdb:RasterName"
152
+ ```
153
+
154
+ > **Note:** If multiple raster datasets are present, viewtif lists them all and shows how to open each. The .gdb path and raster name must be separated by a colon (:).
155
+
156
+ ### Remote Files (Cloud Storage and URLs)
157
+ `viewtif` can open GeoTIFF files directly from remote storage without downloading:
158
+ ```bash
159
+ # HTTPS/HTTP URLs
160
+ viewtif https://example.com/data/file.tif
161
+
162
+ # AWS S3 (public bucket)
163
+ export AWS_NO_SIGN_REQUEST=YES
164
+ viewtif s3://bucket-name/path/to/file.tif
165
+
166
+ # RGB composites from remote files with local overlay
167
+ viewtif --rgbfiles \
168
+ s3://bucket/red.tif \
169
+ s3://bucket/green.tif \
170
+ s3://bucket/blue.tif \
171
+ --shapefile us-states.json
172
+ ```
173
+ > **Note:** Remote file support uses GDAL's virtual file system drivers. For AWS S3 public buckets, set `AWS_NO_SIGN_REQUEST=YES`. For private buckets, configure credentials via `~/.aws/credentials` or environment variables. Other cloud providers (Google Cloud Storage, Azure Blob Storage) are also supported via GDAL's virtual file system paths (`/vsigs/`, `/vsiaz/`).
174
+
175
+ ## Features
176
+ ### Vector Overlays
177
+ Optional vector overlay (shapefile, GeoJSON, GeoPackage, etc.) for geographic context. Vector files are automatically reprojected to match the raster CRS.
178
+
179
+ ```bash
180
+ # Single overlay
181
+ viewtif ECOSTRESS_LST.tif --shapefile Zip_Codes.shp
182
+
183
+ # Multiple overlays with mixed formats
184
+ viewtif ECOSTRESS_LST.tif \
185
+ --shapefile boundaries.geojson \
186
+ --shapefile roads.shp
187
+
188
+ # Customize appearance
189
+ viewtif ECOSTRESS_LST.tif \
190
+ --shapefile Zip_Codes.shp --shp-color red --shp-width 2
191
+ ```
192
+ ### Automatic Nodata Masking
193
+ `viewtif` automatically detects and masks nodata values from file metadata, ensuring proper visualization by excluding invalid pixels. Use `--nodata` to override or specify nodata values for files with missing or incorrect metadata.
194
+ ```bash
195
+ # Specify nodata value
196
+ viewtif image.tif --nodata -9999
197
+ viewtif data.hdf --subset 0 --nodata 0
198
+ ```
199
+
200
+ > **Note:** The `--nodata` flag works with GeoTIFF, HDF, and .gdb files. NetCDF files use xarray's automatic fill value handling.
201
+
202
+ ### Basemap
203
+ Natural Earth basemap toggle (press 'B') for geographic reference. For incompatible projections (UTM, custom CRS), shows location info (continent, coordinates) instead of basemap.
204
+
205
+ ### Export to QGIS
206
+ `viewtif` can export GeoTIFF, HDF, and File Geodatabase rasters directly to QGIS for further analysis. Use the `--qgis` flag to automatically export and open the file in QGIS.
207
+
208
+ ```bash
209
+ # Open a GeoTIFF in QGIS
210
+ viewtif sample.tif --qgis
211
+
212
+ # Open an HDF subdataset in QGIS
213
+ viewtif data.hdf --subset 0 --qgis
214
+
215
+ # Open a File Geodatabase raster in QGIS
216
+ viewtif "OpenFileGDB:mydata.gdb:Elevation" --qgis
217
+
218
+ # Open a remote file in QGIS
219
+ viewtif https://example.com/data/file.tif --qgis
220
+ viewtif s3://bucket/path/to/file.tif --qgis
221
+ ```
222
+
223
+ > **Note:** The `--qgis` flag opens files in QGIS. Creates temporary GeoTIFF files for HDF, .gdb, and remote files (remain until reboot). Local GeoTIFF files open directly. Flags like `--shapefile`, `--scale`, `--vmin/--vmax`, `--band`, and `--nodata` are ignored when using `--qgis`.
224
+
225
+ > **Note:** NetCDF files are not supported with `--qgis`.
226
+
227
+ ### Performance
228
+ `viewtif` automatically checks raster size before loading. If a dataset is very large (>20 million pixels), it displays a warning and prompts for confirmation, since loading may freeze your system or consume excessive memory.
229
+
230
+ To view large files safely, use the `--scale` option to downsample the data:
231
+ ```bash
232
+ # Downsample by factor of 10 (loads 1/100th of the pixels)
233
+ viewtif large_file.tif --scale 10
234
+
235
+ # Downsample by factor of 5 (loads 1/25th of the pixels)
236
+ viewtif large_file.tif --scale 5
237
+ ```
238
+
239
+ The `--scale N` option reduces both width and height by factor N, loading 1/N² of the total pixels. Note that size warnings are skipped for remote files (URLs, S3, cloud storage).
240
+
241
+ ### Interactive Controls
242
+ Adjustable contrast, gamma, and colormap. Keyboard shortcuts are displayed in the status bar at the bottom of the window.
243
+
244
+ | Key | Action |
245
+ | -------------------- | --------------------------------------- |
246
+ | `+` / `-` or mouse / trackpad | Zoom in / out |
247
+ | Arrow keys or `WASD` | Pan |
248
+ | `C` / `V` | Increase / decrease contrast |
249
+ | `G` / `H` | Increase / decrease gamma |
250
+ | `M` | Toggle colormap. Single-band: viridis/magma. NetCDF: RdBu_r/viridis/magma. |
251
+ | `[` / `]` | Previous / next band (or time step) |
252
+ | `B` | Toggle basemap (Natural Earth country boundaries) |
253
+ | `R` | Reset view |
254
+
255
+ ### Command-Line Options
256
+ For a complete list, run `viewtif --help`. Key options:
257
+
258
+ | Option | Description |
259
+ |--------|-------------|
260
+ | `--band N` | Select band from multi-band file |
261
+ | `--rgb R G B` | Create RGB composite from bands |
262
+ | `--rgbfiles R G B` | Create RGB from three files |
263
+ | `--subset N` | Select HDF/NetCDF subdataset (0-based) |
264
+ | `--scale N` | Downsample by factor N (loads 1/N² pixels) |
265
+ | `--vmin X --vmax Y` | Set display value range |
266
+ | `--nodata VALUE` | Mask pixels with specific nodata value |
267
+ | `--shapefile FILE` | Add vector overlay (repeatable) |
268
+ | `--shp-color COLOR` | Overlay color (default: cyan) |
269
+ | `--shp-width N` | Overlay line width (default: 1.0) |
270
+ | `--timestep N` | Jump to NetCDF time index (1-based) |
271
+ | `--cartopy on\|off` | Toggle cartopy for NetCDF (default: on) |
272
+ | `--qgis` | Export and open in QGIS |
273
+
274
+ ### Limitations
275
+ - **NetCDF files:** Do not support vector overlays, basemap toggle, or QGIS export. NetCDF files use cartopy visualization which handles geographic display differently.
276
+ - **HDF files without georeferencing:** Vector overlays and basemap may not work if CRS/transform information is missing.
277
+ - **Remote files:** Large raster size warnings are skipped for remote files. Vector overlay files must be local (though the raster itself can be remote). NetCDF files cannot be opened directly from HTTP/S3 URLs due to xarray/netCDF4 library limitations. HDF and File Geodatabase support for remote files is not guaranteed.
278
+
279
+ ## Example Data
280
+ - ECOSTRESS_LST.tif
281
+ - Zip_Codes.shp and associated files
282
+ - HLS_B04.tif, HLS_B03.tif, HLS_B02.tif (RGB sample)
283
+ - AG100.v003.33.-107.0001.h5 (HDF5 file)
284
+ - [tasmax_mon_ACCESS-CM2_ssp370_r1i1p1f1_gn_2021.nc](https://data.nas.nasa.gov/nex-dcp30-cmip6/monthly/ACCESS-CM2/ssp370/r1i1p1f1/tasmax/tasmax_mon_ACCESS-CM2_ssp370_r1i1p1f1_gn_2021.nc)
285
+ - [tas_Amon_KIOST-ESM_ssp585_r1i1p1f1_gr1_201501-210012.nc](https://dap.ceda.ac.uk/badc/cmip6/data/CMIP6/ScenarioMIP/KIOST/KIOST-ESM/ssp585/r1i1p1f1/Amon/tas/gr1/v20191106/tas_Amon_KIOST-ESM_ssp585_r1i1p1f1_gr1_201501-210012.nc)
286
+
287
+ ## Credit & License
288
+ `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.
289
+
290
+ ## Citation
291
+ Longenecker, Jake; Lee, Christine; Hulley, Glynn; Cawse-Nicholson, Kerry; 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.
292
+
293
+ ## Contributors
294
+ - [@HarshShinde0](https://github.com/HarshShinde0) — added mouse-wheel and trackpad zoom support; added NetCDF support with [@nkeikon](https://github.com/nkeikon)
295
+ - [@p-vdp](https://github.com/p-vdp) — added File Geodatabase (.gdb) raster support
296
+
297
+ ## License
298
+ This project is released under the MIT License © 2025 Keiko Nomura.
299
+
300
+ If you find this tool useful, please consider supporting or acknowledging the author.
301
+
302
+ ## Useful links
303
+ - [Demo by User](https://www.linkedin.com/posts/desmond-lartey_geospatial-analysts-heads-up-check-out-activity-7386336488050925568-G5bN?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
304
+ - [Demo at the initial release](https://www.linkedin.com/posts/keiko-nomura-0231891_dont-you-sometimes-just-want-to-see-a-activity-7383409138296528896-sbRM?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
305
+ - [Demo on HDF files](https://www.linkedin.com/posts/keiko-nomura-0231891_now-you-can-see-hdf-files-from-the-command-activity-7383963721561399296-F5i0?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
306
+ - [Demo on NetCDF files](https://www.linkedin.com/posts/keiko-nomura-0231891_you-can-now-view-netcdf-files-nc-from-activity-7386189562072670208-3A0V?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
307
+ - [Demo on Esri Geodatabases](https://www.linkedin.com/posts/keiko-nomura-0231891_did-you-know-viewtif-now-supports-esri-geodatabases-activity-7390165568688959488-pvpk?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
@@ -0,0 +1,7 @@
1
+ viewtif/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ viewtif/tif_viewer.py,sha256=7gN90hWu73qgvOva_VgFA1przYPGl5yz7GjobIh1UWs,83463
3
+ viewtif-0.2.7.dist-info/METADATA,sha256=uZCdYwttAhX3Nkdajm2CXFd8UIcF1UGpJvqaHQVNaJo,14880
4
+ viewtif-0.2.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
5
+ viewtif-0.2.7.dist-info/entry_points.txt,sha256=NVEjlRyJ7R7hFPOVsZJio3Hl0VqlX7_oVfA7819XvHM,52
6
+ viewtif-0.2.7.dist-info/licenses/LICENSE,sha256=-aRH3Wo6exTLQLNp9yj6HptkUXXtNjdUSzumkyRsK4s,1069
7
+ viewtif-0.2.7.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,184 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: viewtif
3
- Version: 0.2.6
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
- Project-URL: Homepage, https://github.com/nkeikon/tifviewer
6
- Project-URL: Source, https://github.com/nkeikon/tifviewer
7
- Project-URL: Issues, https://github.com/nkeikon/tifviewer/issues
8
- Author: Keiko Nomura
9
- License: MIT
10
- License-File: LICENSE
11
- Requires-Python: >=3.10
12
- Requires-Dist: click>=8.1
13
- Requires-Dist: matplotlib>=3.7
14
- Requires-Dist: numpy>=1.23
15
- Requires-Dist: pyside6>=6.5
16
- Requires-Dist: rasterio>=1.3
17
- Provides-Extra: geo
18
- Requires-Dist: geopandas>=0.13; extra == 'geo'
19
- Requires-Dist: shapely>=2.0; extra == 'geo'
20
- Provides-Extra: netcdf
21
- Requires-Dist: cartopy>=0.22; extra == 'netcdf'
22
- Requires-Dist: netcdf4>=1.6; extra == 'netcdf'
23
- Requires-Dist: pandas>=2.0; extra == 'netcdf'
24
- Requires-Dist: xarray>=2023.1; extra == 'netcdf'
25
- Description-Content-Type: text/markdown
26
-
27
- # viewtif
28
- [![Downloads](https://static.pepy.tech/badge/viewtif)](https://pepy.tech/project/viewtif)
29
- [![PyPI version](https://img.shields.io/pypi/v/viewtif)](https://pypi.org/project/viewtif/)
30
- [![Python version](https://img.shields.io/badge/python-%3E%3D3.10-blue.svg)](https://pypi.org/project/viewtif/)
31
-
32
- A lightweight GeoTIFF viewer for quick visualization directly from the command line.
33
-
34
- You can visualize single-band GeoTIFFs, RGB composites, HDF, NetCDF files and shapefile overlays in a simple Qt-based window.
35
-
36
- ## Installation
37
-
38
- ```bash
39
- pip install viewtif
40
- ```
41
- > **Note:** Requires Python 3.10 or higher. On Linux, you may need python3-tk, libqt5gui5, or PySide6 dependencies.
42
- >
43
- >`viewtif` requires a graphical display environment.
44
- > It may not run properly on headless systems (e.g., HPC compute nodes or remote servers without X11 forwarding).
45
-
46
- ### Optional features
47
- #### Shapefile overlay support
48
- ```bash
49
- pip install "viewtif[geo]"
50
- ```
51
- > **Note:** For macOS(zsh) users:
52
- > Make sure to include the quotes, or zsh will interpret it as a pattern.
53
-
54
- #### NetCDF support
55
- ```bash
56
- pip install "viewtif[netcdf]"
57
- ```
58
- > **Note:** For enhanced geographic visualization with map projections, coastlines, and borders, install with cartopy: `pip install "viewtif[netcdf]"` (cartopy is included in the netcdf extra). If cartopy is not available, netCDF files will still display with standard rendering.
59
-
60
- #### HDF/HDF5 & FileGDB support
61
- GDAL is required to open `.hdf`, .`h5`, `.hdf5`, and `.gdb` files.
62
- ```bash
63
- brew install gdal # macOS
64
- sudo apt install gdal-bin python3-gdal # Linux
65
- pip install GDAL
66
- ```
67
-
68
- ## Quick Start
69
- ```bash
70
- # View a GeoTIFF
71
- viewtif ECOSTRESS_LST.tif
72
-
73
- # View an RGB composite
74
- viewtif --rgbfiles \
75
- HLS_B04.tif \
76
- HLS_B03.tif \
77
- HLS_B02.tif
78
-
79
- # View an RGB composite from a multi-band file
80
- viewtif rgb.tif --rgb 4 3 2
81
-
82
- # View with shapefile overlay
83
- viewtif ECOSTRESS_LST.tif \
84
- --shapefile Zip_Codes.shp
85
-
86
- # Change the color and width
87
- viewtif ECOSTRESS_LST.tif \
88
- --shapefile Zip_Codes.shp --shp-color red --shp-width 2
89
- ```
90
- ### Update in v1.0.6: HDF/HDF5 support
91
- `viewtif` can open `.hdf`, `.h5`, and `.hdf5` files that contain multiple subdatasets. When opened, it lists available subdatasets and lets you view one by index. You can also specify a band to display (default is the first band) or change bands interactively with '[' and ']'.
92
- ```bash
93
- # List subdatasets
94
- viewtif AG100.v003.33.-107.0001.h5
95
-
96
- # View a specific subdataset
97
- viewtif AG100.v003.33.-107.0001.h5 --subset 1
98
-
99
- # View a specific subdataset and band
100
- viewtif AG100.v003.33.-107.0001.h5 --subset 1 --band 3
101
- ```
102
- > **Note:** Some datasets (perhaps the majority of .hdf files) lack CRS information encoded, so shapefile overlays may not work. In that case, viewtif will display:
103
- `[WARN] raster lacks CRS/transform; cannot place overlays.`
104
-
105
- ### Update in v1.0.7: File Geodatabase (.gdb) support
106
- `viewtif` can now open raster datasets stored inside Esri File Geodatabases (`.gdb`). When you open a .gdb directly, `viewtif` will list available raster datasets first, then you can choose one to view.
107
-
108
- ```bash
109
- # List available raster datasets
110
- viewtif /path/to/geodatabase.gdb
111
-
112
- # Open a specific raster
113
- viewtif "OpenFileGDB:/path/to/geodatabase.gdb:RasterName"
114
- ```
115
- > **Note:** If multiple raster datasets are present, viewtif lists them all and shows how to open each. The .gdb path and raster name must be separated by a colon (:).
116
-
117
- ### Update in v1.0.7: Large raster safeguard
118
- As of v1.0.7, `viewtif` automatically checks the raster size before loading.
119
- If the dataset is very large (e.g., >20 million pixels), it will pause and warn that loading may freeze your system.
120
- You can proceed manually or rerun with the `--scale` option for a smaller, faster preview.
121
-
122
- ### Update in v0.2.2: NetCDF support with optional cartopy visualization
123
- `viewtif` now supports NetCDF (`.nc`) files via xarray, with optional cartopy-based geographic visualization. Use `[` / `]` to move forward or backward through time steps, and press M to switch between the three built-in colormaps ("RdBu_r", "viridis", "magma").
124
-
125
- ### Update in v0.2.6: New user controls for NetCDF visualization
126
- - `--vmin [value] --vmax [value]` let you set the display range (for all file types).
127
- - `--timestep [int]` lets you jump directly to a chosen time slice.
128
- - `cartopy off` let you see raw NetCDF images.
129
-
130
- #### Examples
131
- ```bash
132
- viewtif data.nc
133
- viewtif data.nc --vmin 280 --vmax 320
134
- viewtif data.nc --timestep 100
135
- viewtif data.nc --cartopy off
136
- ```
137
-
138
- ## Controls
139
- | Key | Action |
140
- | -------------------- | --------------------------------------- |
141
- | `+` / `-` or mouse / trackpad | Zoom in / out |
142
- | Arrow keys or `WASD` | Pan |
143
- | `C` / `V` | Increase / decrease contrast |
144
- | `G` / `H` | Increase / decrease gamma |
145
- | `M` | Toggle colormap. Single-band: viridis/magma. NetCDF: RdBu_r/viridis/magma. |
146
- | `[` / `]` | Previous / next band (or time step) |
147
- | `R` | Reset view |
148
-
149
- ## Features
150
- - Command-line driven GeoTIFF viewer.
151
- - Supports single-band, RGB composite, HDF/HDF5 subdatasets, and NetCDF.
152
- - Optional shapefile overlay for geographic context.
153
- - Adjustable contrast, gamma, and colormap.
154
- - Fast preview using rasterio and PySide6.
155
-
156
- ## Example Data
157
- - ECOSTRESS_LST.tif
158
- - Zip_Codes.shp and associated files
159
- - HLS_B04.tif, HLS_B03.tif, HLS_B02.tif (RGB sample)
160
- - AG100.v003.33.-107.0001.h5 (HDF5 file)
161
- - [tasmax_mon_ACCESS-CM2_ssp370_r1i1p1f1_gn_2021.nc](https://data.nas.nasa.gov/nex-dcp30-cmip6/monthly/ACCESS-CM2/ssp370/r1i1p1f1/tasmax/tasmax_mon_ACCESS-CM2_ssp370_r1i1p1f1_gn_2021.nc)
162
- - [tas_Amon_KIOST-ESM_ssp585_r1i1p1f1_gr1_201501-210012.nc](https://dap.ceda.ac.uk/badc/cmip6/data/CMIP6/ScenarioMIP/KIOST/KIOST-ESM/ssp585/r1i1p1f1/Amon/tas/gr1/v20191106/tas_Amon_KIOST-ESM_ssp585_r1i1p1f1_gr1_201501-210012.nc)
163
-
164
- ## Credit & License
165
- `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.
166
-
167
- ## Citation
168
- 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.
169
-
170
- ## Contributors
171
- - [@HarshShinde0](https://github.com/HarshShinde0) — added mouse-wheel and trackpad zoom support; added NetCDF support with [@nkeikon](https://github.com/nkeikon)
172
- - [@p-vdp](https://github.com/p-vdp) — added File Geodatabase (.gdb) raster support
173
-
174
- ## License
175
- This project is released under the MIT License © 2025 Keiko Nomura.
176
-
177
- If you find this tool useful, please consider supporting or acknowledging the author.
178
-
179
- ## Useful links
180
- - [Demo by User](https://www.linkedin.com/posts/desmond-lartey_geospatial-analysts-heads-up-check-out-activity-7386336488050925568-G5bN?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
181
- - [Demo at the initial release](https://www.linkedin.com/posts/keiko-nomura-0231891_dont-you-sometimes-just-want-to-see-a-activity-7383409138296528896-sbRM?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
182
- - [Demo on HDF files](https://www.linkedin.com/posts/keiko-nomura-0231891_now-you-can-see-hdf-files-from-the-command-activity-7383963721561399296-F5i0?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
183
- - [Demo on NetCDF files](https://www.linkedin.com/posts/keiko-nomura-0231891_you-can-now-view-netcdf-files-nc-from-activity-7386189562072670208-3A0V?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
184
- - [Demo on Esri Geodatabases](https://www.linkedin.com/posts/keiko-nomura-0231891_did-you-know-viewtif-now-supports-esri-geodatabases-activity-7390165568688959488-pvpk?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
@@ -1,7 +0,0 @@
1
- viewtif/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- viewtif/tif_viewer.py,sha256=-vO-62ApjcG7lVVTHB5ggc9qSeB7YmdR1gmfskp-Vzg,51628
3
- viewtif-0.2.6.dist-info/METADATA,sha256=CJZC9X2CtZjzQTEVg_MKTKMGNS7Vq8hcTUFEQck0Er4,9541
4
- viewtif-0.2.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
- viewtif-0.2.6.dist-info/entry_points.txt,sha256=NVEjlRyJ7R7hFPOVsZJio3Hl0VqlX7_oVfA7819XvHM,52
6
- viewtif-0.2.6.dist-info/licenses/LICENSE,sha256=-aRH3Wo6exTLQLNp9yj6HptkUXXtNjdUSzumkyRsK4s,1069
7
- viewtif-0.2.6.dist-info/RECORD,,