viewtif 0.2.5__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.
- viewtif/tif_viewer.py +1138 -332
- viewtif-0.2.7.dist-info/METADATA +307 -0
- viewtif-0.2.7.dist-info/RECORD +7 -0
- {viewtif-0.2.5.dist-info → viewtif-0.2.7.dist-info}/WHEEL +1 -1
- viewtif-0.2.7.dist-info/licenses/LICENSE +21 -0
- viewtif-0.2.5.dist-info/METADATA +0 -168
- viewtif-0.2.5.dist-info/RECORD +0 -6
- {viewtif-0.2.5.dist-info → viewtif-0.2.7.dist-info}/entry_points.txt +0 -0
|
@@ -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
|
+
[](https://pepy.tech/project/viewtif)
|
|
29
|
+
[](https://pypi.org/project/viewtif/)
|
|
30
|
+
[](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,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Keiko Nomura
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
viewtif-0.2.5.dist-info/METADATA
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: viewtif
|
|
3
|
-
Version: 0.2.5
|
|
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
|
-
Requires-Python: >=3.9
|
|
11
|
-
Requires-Dist: click>=8.1
|
|
12
|
-
Requires-Dist: matplotlib>=3.7
|
|
13
|
-
Requires-Dist: numpy>=1.23
|
|
14
|
-
Requires-Dist: pyside6>=6.5
|
|
15
|
-
Requires-Dist: rasterio>=1.3
|
|
16
|
-
Provides-Extra: geo
|
|
17
|
-
Requires-Dist: geopandas>=0.13; extra == 'geo'
|
|
18
|
-
Requires-Dist: shapely>=2.0; extra == 'geo'
|
|
19
|
-
Provides-Extra: netcdf
|
|
20
|
-
Requires-Dist: cartopy>=0.22; extra == 'netcdf'
|
|
21
|
-
Requires-Dist: netcdf4>=1.6; extra == 'netcdf'
|
|
22
|
-
Requires-Dist: pandas>=2.0; extra == 'netcdf'
|
|
23
|
-
Requires-Dist: xarray>=2023.1; extra == 'netcdf'
|
|
24
|
-
Description-Content-Type: text/markdown
|
|
25
|
-
|
|
26
|
-
# viewtif
|
|
27
|
-
[](https://pepy.tech/project/viewtif)
|
|
28
|
-
[](https://pypi.org/project/viewtif/)
|
|
29
|
-
[](https://pypi.org/project/viewtif/)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
A lightweight GeoTIFF viewer for quick visualization directly from the command line.
|
|
34
|
-
|
|
35
|
-
You can visualize single-band GeoTIFFs, RGB composites, HDF, NetCDF files and shapefile overlays in a simple Qt-based window.
|
|
36
|
-
|
|
37
|
-
## Installation
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
pip install viewtif
|
|
41
|
-
```
|
|
42
|
-
> **Note:** On Linux, you may need python3-tk, libqt5gui5, or PySide6 dependencies.
|
|
43
|
-
>
|
|
44
|
-
>`viewtif` requires a graphical display environment.
|
|
45
|
-
> It may not run properly on headless systems (e.g., HPC compute nodes or remote servers without X11 forwarding).
|
|
46
|
-
|
|
47
|
-
### Optional features
|
|
48
|
-
#### Shapefile 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
|
-
#### HDF/HDF5 support
|
|
56
|
-
```bash
|
|
57
|
-
brew install gdal # macOS
|
|
58
|
-
sudo apt install gdal-bin python3-gdal # Linux
|
|
59
|
-
pip install GDAL
|
|
60
|
-
```
|
|
61
|
-
> **Note:** GDAL is required to open `.hdf`, .`h5`, and `.hdf5` files. If it’s missing, viewtif will display: `RuntimeError: HDF support requires GDAL.`
|
|
62
|
-
|
|
63
|
-
#### NetCDF support
|
|
64
|
-
```bash
|
|
65
|
-
pip install "viewtif[netcdf]"
|
|
66
|
-
```
|
|
67
|
-
> **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.
|
|
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 with shapefile overlay
|
|
80
|
-
viewtif ECOSTRESS_LST.tif \
|
|
81
|
-
--shapefile Zip_Codes.shp
|
|
82
|
-
```
|
|
83
|
-
### Update in v1.0.6: HDF/HDF5 support
|
|
84
|
-
`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 ']'.
|
|
85
|
-
```bash
|
|
86
|
-
# List subdatasets
|
|
87
|
-
viewtif AG100.v003.33.-107.0001.h5
|
|
88
|
-
|
|
89
|
-
# View a specific subdataset
|
|
90
|
-
viewtif AG100.v003.33.-107.0001.h5 --subset 1
|
|
91
|
-
|
|
92
|
-
# View a specific subdataset and band
|
|
93
|
-
viewtif AG100.v003.33.-107.0001.h5 --subset 1 --band 3
|
|
94
|
-
```
|
|
95
|
-
> **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:
|
|
96
|
-
`[WARN] raster lacks CRS/transform; cannot place overlays.`
|
|
97
|
-
|
|
98
|
-
### Update in v1.0.7: File Geodatabase (.gdb) support
|
|
99
|
-
`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.
|
|
100
|
-
|
|
101
|
-
Most Rasterio installations already include the OpenFileGDB driver, so .gdb datasets often open without installing GDAL manually.
|
|
102
|
-
|
|
103
|
-
If you encounter: RuntimeError: GDB support requires GDAL, install GDAL as shown above to enable the driver.
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
# List available raster datasets
|
|
107
|
-
viewtif /path/to/geodatabase.gdb
|
|
108
|
-
|
|
109
|
-
# Open a specific raster
|
|
110
|
-
viewtif "OpenFileGDB:/path/to/geodatabase.gdb:RasterName"
|
|
111
|
-
```
|
|
112
|
-
> **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 (:).
|
|
113
|
-
|
|
114
|
-
### Update in v1.0.7: Large raster safeguard
|
|
115
|
-
As of v1.0.7, `viewtif` automatically checks the raster size before loading.
|
|
116
|
-
If the dataset is very large (e.g., >20 million pixels), it will pause and warn that loading may freeze your system.
|
|
117
|
-
You can proceed manually or rerun with the `--scale` option for a smaller, faster preview.
|
|
118
|
-
|
|
119
|
-
### Update in v0.2.2: NetCDF support with optional cartopy visualization
|
|
120
|
-
`viewtif` now supports NetCDF (`.nc`) files via xarray, with optional cartopy-based geographic visualization. Use`[` / `]` to move forward or backward through time steps.
|
|
121
|
-
|
|
122
|
-
#### Examples
|
|
123
|
-
```bash
|
|
124
|
-
viewtif data.nc
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Controls
|
|
128
|
-
| Key | Action |
|
|
129
|
-
| -------------------- | --------------------------------------- |
|
|
130
|
-
| `+` / `-` or mouse / trackpad | Zoom in / out |
|
|
131
|
-
| Arrow keys or `WASD` | Pan |
|
|
132
|
-
| `C` / `V` | Increase / decrease contrast |
|
|
133
|
-
| `G` / `H` | Increase / decrease gamma |
|
|
134
|
-
| `M` | Toggle colormap (`viridis` ↔ `magma`) |
|
|
135
|
-
| `[` / `]` | Previous / next band (or time step) |
|
|
136
|
-
| `R` | Reset view |
|
|
137
|
-
|
|
138
|
-
## Features
|
|
139
|
-
- Command-line driven GeoTIFF viewer.
|
|
140
|
-
- Supports single-band, RGB composite, HDF/HDF5 subdatasets, and NetCDF.
|
|
141
|
-
- Optional shapefile overlay for geographic context.
|
|
142
|
-
- Adjustable contrast, gamma, and colormap.
|
|
143
|
-
- Fast preview using rasterio and PySide6.
|
|
144
|
-
|
|
145
|
-
## Example Data
|
|
146
|
-
- ECOSTRESS_LST.tif
|
|
147
|
-
- Zip_Codes.shp and associated files
|
|
148
|
-
- HLS_B04.tif, HLS_B03.tif, HLS_B02.tif (RGB sample)
|
|
149
|
-
- AG100.v003.33.-107.0001.h5 (HDF5 file)
|
|
150
|
-
|
|
151
|
-
## Credit & License
|
|
152
|
-
`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.
|
|
153
|
-
|
|
154
|
-
## Citation
|
|
155
|
-
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.
|
|
156
|
-
|
|
157
|
-
## License
|
|
158
|
-
This project is released under the MIT License.
|
|
159
|
-
|
|
160
|
-
## Contributors
|
|
161
|
-
- [@HarshShinde0](https://github.com/HarshShinde0) — added mouse-wheel and trackpad zoom support; added NetCDF support with [@nkeikon](https://github.com/nkeikon)
|
|
162
|
-
- [@p-vdp](https://github.com/p-vdp) — added File Geodatabase (.gdb) raster support
|
|
163
|
-
|
|
164
|
-
## Useful links
|
|
165
|
-
- 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
|
|
166
|
-
- 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
|
|
167
|
-
- 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
|
|
168
|
-
- 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
|
viewtif-0.2.5.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
viewtif/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
viewtif/tif_viewer.py,sha256=Vj5_t32_G3ME5WYkDATBfi3Rw5WbzIp6VMgi_RNj0O0,52334
|
|
3
|
-
viewtif-0.2.5.dist-info/METADATA,sha256=psLk-EhO4Cqdb01o-LgxjD41WfrICuCeYXK0SFWHdE8,8245
|
|
4
|
-
viewtif-0.2.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
-
viewtif-0.2.5.dist-info/entry_points.txt,sha256=NVEjlRyJ7R7hFPOVsZJio3Hl0VqlX7_oVfA7819XvHM,52
|
|
6
|
-
viewtif-0.2.5.dist-info/RECORD,,
|
|
File without changes
|