viewtif 0.1.10__tar.gz → 0.2.2__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,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: viewtif
3
- Version: 0.1.10
4
- Summary: Lightweight GeoTIFF, HDF/HDF5, and Esri File Geodatabase (.gdb) viewer with shapefile overlay and large-raster safeguard.
3
+ Version: 0.2.2
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
7
7
  Project-URL: Issues, https://github.com/nkeikon/tifviewer/issues
@@ -16,23 +16,20 @@ Requires-Dist: rasterio>=1.3
16
16
  Provides-Extra: geo
17
17
  Requires-Dist: geopandas>=0.13; extra == 'geo'
18
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'
19
24
  Description-Content-Type: text/markdown
20
25
 
21
26
  # viewtif
22
27
  [![Downloads](https://static.pepy.tech/badge/viewtif)](https://pepy.tech/project/viewtif)
23
28
  [![PyPI version](https://img.shields.io/pypi/v/viewtif)](https://pypi.org/project/viewtif/)
24
- [![Python versions](https://img.shields.io/pypi/pyversions/viewtif)](https://pypi.org/project/viewtif/)
25
29
 
26
30
  A lightweight GeoTIFF viewer for quick visualization directly from the command line.
27
31
 
28
- You can visualize single-band GeoTIFFs, RGB composites, and shapefile overlays in a simple Qt-based window.
29
-
30
- ---
31
- Latest stable release: v0.1.9 (PyPI)
32
-
33
- Development branch: v0.2.0-dev (experimental, not released)
34
-
35
- ---
32
+ You can visualize single-band GeoTIFFs, RGB composites, HDF, NetCDF files and shapefile overlays in a simple Qt-based window.
36
33
 
37
34
  ## Installation
38
35
 
@@ -52,7 +49,7 @@ pip install "viewtif[geo]"
52
49
  > **Note:** For macOS(zsh) users:
53
50
  > Make sure to include the quotes, or zsh will interpret it as a pattern.
54
51
 
55
- #### HDF/HDF5 support
52
+ #### HDF/HDF5 support
56
53
  ```bash
57
54
  brew install gdal # macOS
58
55
  sudo apt install gdal-bin python3-gdal # Linux
@@ -60,6 +57,11 @@ pip install GDAL
60
57
  ```
61
58
  > **Note:** GDAL is required to open `.hdf`, .`h5`, and `.hdf5` files. If it’s missing, viewtif will display: `RuntimeError: HDF support requires GDAL.`
62
59
 
60
+ #### NetCDF support
61
+ ```bash
62
+ brew install "viewtif[netcdf]"
63
+ ```
64
+ > **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 RGB rendering.
63
65
  ## Quick Start
64
66
  ```bash
65
67
  # View a GeoTIFF
@@ -91,8 +93,11 @@ viewtif AG100.v003.33.-107.0001.h5 --subset 1 --band 3
91
93
  `[WARN] raster lacks CRS/transform; cannot place overlays.`
92
94
 
93
95
  ### Update in v1.0.7: File Geodatabase (.gdb) support
94
- `viewtif` can now open raster datasets stored inside Esri File Geodatabases (`.gdb`), using the GDAL `OpenFileGDB` driver.
95
- When you open a .gdb directly, `viewtif` will list available raster datasets first, then you can choose one to view.
96
+ `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.
97
+
98
+ Most Rasterio installations already include the OpenFileGDB driver, so .gdb datasets often open without installing GDAL manually.
99
+
100
+ If you encounter: RuntimeError: GDB support requires GDAL, install GDAL as shown above to enable the driver.
96
101
 
97
102
  ```bash
98
103
  # List available raster datasets
@@ -101,13 +106,26 @@ viewtif /path/to/geodatabase.gdb
101
106
  # Open a specific raster
102
107
  viewtif "OpenFileGDB:/path/to/geodatabase.gdb:RasterName"
103
108
  ```
104
- > **Note:** Requires GDAL 3.7 or later with the OpenFileGDB driver enabled. 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 (:).
109
+ > **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 (:).
105
110
 
106
111
  ### Update in v1.0.7: Large raster safeguard
107
112
  As of v1.0.7, `viewtif` automatically checks the raster size before loading.
108
113
  If the dataset is very large (e.g., >20 million pixels), it will pause and warn that loading may freeze your system.
109
114
  You can proceed manually or rerun with the `--scale` option for a smaller, faster preview.
110
115
 
116
+ ### Update in v0.2.2: NetCDF support with optional cartopy visualization
117
+ `viewtif` now supports NetCDF (`.nc`) files with xarray and optional cartopy geographic visualization.
118
+
119
+ #### Installation with NetCDF support
120
+ ```bash
121
+ pip install "viewtif[netcdf]"
122
+ ```
123
+
124
+ #### Examples
125
+ ```bash
126
+ viewtif data.nc
127
+ ```
128
+
111
129
  ## Controls
112
130
  | Key | Action |
113
131
  | -------------------- | --------------------------------------- |
@@ -116,12 +134,12 @@ You can proceed manually or rerun with the `--scale` option for a smaller, faste
116
134
  | `C` / `V` | Increase / decrease contrast |
117
135
  | `G` / `H` | Increase / decrease gamma |
118
136
  | `M` | Toggle colormap (`viridis` ↔ `magma`) |
119
- | `[` / `]` | Previous / next band (single-band only) |
137
+ | `[` / `]` | Previous / next band (or time step) |
120
138
  | `R` | Reset view |
121
139
 
122
140
  ## Features
123
141
  - Command-line driven GeoTIFF viewer.
124
- - Supports single-band, RGB composite, and HDF/HDF5 subdatasets.
142
+ - Supports single-band, RGB composite, HDF/HDF5 subdatasets, and NetCDF.
125
143
  - Optional shapefile overlay for geographic context.
126
144
  - Adjustable contrast, gamma, and colormap.
127
145
  - Fast preview using rasterio and PySide6.
@@ -142,5 +160,5 @@ Longenecker, Jake; Lee, Christine; Hulley, Glynn; Cawse-Nicholson, Kerry; Purkis
142
160
  This project is released under the MIT License.
143
161
 
144
162
  ## Contributors
145
- - [@HarshShinde0](https://github.com/HarshShinde0) — added mouse-wheel and trackpad zoom support
146
- - [@p-vdp](https://github.com/p-vdp) — added File Geodatabase (.gdb) raster support
163
+ - [@HarshShinde0](https://github.com/HarshShinde0) — added mouse-wheel and trackpad zoom support; added NetCDF support with [@nkeikon](https://github.com/nkeikon)
164
+ - [@p-vdp](https://github.com/p-vdp) — added File Geodatabase (.gdb) raster support
@@ -1,18 +1,10 @@
1
1
  # viewtif
2
2
  [![Downloads](https://static.pepy.tech/badge/viewtif)](https://pepy.tech/project/viewtif)
3
3
  [![PyPI version](https://img.shields.io/pypi/v/viewtif)](https://pypi.org/project/viewtif/)
4
- [![Python versions](https://img.shields.io/pypi/pyversions/viewtif)](https://pypi.org/project/viewtif/)
5
4
 
6
5
  A lightweight GeoTIFF viewer for quick visualization directly from the command line.
7
6
 
8
- You can visualize single-band GeoTIFFs, RGB composites, and shapefile overlays in a simple Qt-based window.
9
-
10
- ---
11
- Latest stable release: v0.1.9 (PyPI)
12
-
13
- Development branch: v0.2.0-dev (experimental, not released)
14
-
15
- ---
7
+ You can visualize single-band GeoTIFFs, RGB composites, HDF, NetCDF files and shapefile overlays in a simple Qt-based window.
16
8
 
17
9
  ## Installation
18
10
 
@@ -32,7 +24,7 @@ pip install "viewtif[geo]"
32
24
  > **Note:** For macOS(zsh) users:
33
25
  > Make sure to include the quotes, or zsh will interpret it as a pattern.
34
26
 
35
- #### HDF/HDF5 support
27
+ #### HDF/HDF5 support
36
28
  ```bash
37
29
  brew install gdal # macOS
38
30
  sudo apt install gdal-bin python3-gdal # Linux
@@ -40,6 +32,11 @@ pip install GDAL
40
32
  ```
41
33
  > **Note:** GDAL is required to open `.hdf`, .`h5`, and `.hdf5` files. If it’s missing, viewtif will display: `RuntimeError: HDF support requires GDAL.`
42
34
 
35
+ #### NetCDF support
36
+ ```bash
37
+ brew install "viewtif[netcdf]"
38
+ ```
39
+ > **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 RGB rendering.
43
40
  ## Quick Start
44
41
  ```bash
45
42
  # View a GeoTIFF
@@ -71,8 +68,11 @@ viewtif AG100.v003.33.-107.0001.h5 --subset 1 --band 3
71
68
  `[WARN] raster lacks CRS/transform; cannot place overlays.`
72
69
 
73
70
  ### Update in v1.0.7: File Geodatabase (.gdb) support
74
- `viewtif` can now open raster datasets stored inside Esri File Geodatabases (`.gdb`), using the GDAL `OpenFileGDB` driver.
75
- When you open a .gdb directly, `viewtif` will list available raster datasets first, then you can choose one to view.
71
+ `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.
72
+
73
+ Most Rasterio installations already include the OpenFileGDB driver, so .gdb datasets often open without installing GDAL manually.
74
+
75
+ If you encounter: RuntimeError: GDB support requires GDAL, install GDAL as shown above to enable the driver.
76
76
 
77
77
  ```bash
78
78
  # List available raster datasets
@@ -81,13 +81,26 @@ viewtif /path/to/geodatabase.gdb
81
81
  # Open a specific raster
82
82
  viewtif "OpenFileGDB:/path/to/geodatabase.gdb:RasterName"
83
83
  ```
84
- > **Note:** Requires GDAL 3.7 or later with the OpenFileGDB driver enabled. 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 (:).
84
+ > **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 (:).
85
85
 
86
86
  ### Update in v1.0.7: Large raster safeguard
87
87
  As of v1.0.7, `viewtif` automatically checks the raster size before loading.
88
88
  If the dataset is very large (e.g., >20 million pixels), it will pause and warn that loading may freeze your system.
89
89
  You can proceed manually or rerun with the `--scale` option for a smaller, faster preview.
90
90
 
91
+ ### Update in v0.2.2: NetCDF support with optional cartopy visualization
92
+ `viewtif` now supports NetCDF (`.nc`) files with xarray and optional cartopy geographic visualization.
93
+
94
+ #### Installation with NetCDF support
95
+ ```bash
96
+ pip install "viewtif[netcdf]"
97
+ ```
98
+
99
+ #### Examples
100
+ ```bash
101
+ viewtif data.nc
102
+ ```
103
+
91
104
  ## Controls
92
105
  | Key | Action |
93
106
  | -------------------- | --------------------------------------- |
@@ -96,12 +109,12 @@ You can proceed manually or rerun with the `--scale` option for a smaller, faste
96
109
  | `C` / `V` | Increase / decrease contrast |
97
110
  | `G` / `H` | Increase / decrease gamma |
98
111
  | `M` | Toggle colormap (`viridis` ↔ `magma`) |
99
- | `[` / `]` | Previous / next band (single-band only) |
112
+ | `[` / `]` | Previous / next band (or time step) |
100
113
  | `R` | Reset view |
101
114
 
102
115
  ## Features
103
116
  - Command-line driven GeoTIFF viewer.
104
- - Supports single-band, RGB composite, and HDF/HDF5 subdatasets.
117
+ - Supports single-band, RGB composite, HDF/HDF5 subdatasets, and NetCDF.
105
118
  - Optional shapefile overlay for geographic context.
106
119
  - Adjustable contrast, gamma, and colormap.
107
120
  - Fast preview using rasterio and PySide6.
@@ -122,5 +135,5 @@ Longenecker, Jake; Lee, Christine; Hulley, Glynn; Cawse-Nicholson, Kerry; Purkis
122
135
  This project is released under the MIT License.
123
136
 
124
137
  ## Contributors
125
- - [@HarshShinde0](https://github.com/HarshShinde0) — added mouse-wheel and trackpad zoom support
126
- - [@p-vdp](https://github.com/p-vdp) — added File Geodatabase (.gdb) raster support
138
+ - [@HarshShinde0](https://github.com/HarshShinde0) — added mouse-wheel and trackpad zoom support; added NetCDF support with [@nkeikon](https://github.com/nkeikon)
139
+ - [@p-vdp](https://github.com/p-vdp) — added File Geodatabase (.gdb) raster support
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "viewtif"
7
- version = "0.1.10"
8
- description = "Lightweight GeoTIFF, HDF/HDF5, and Esri File Geodatabase (.gdb) viewer with shapefile overlay and large-raster safeguard."
7
+ version = "0.2.2"
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"
11
11
  license = { text = "MIT" }
@@ -20,6 +20,12 @@ dependencies = [
20
20
 
21
21
  [project.optional-dependencies]
22
22
  geo = ["geopandas>=0.13", "shapely>=2.0"]
23
+ netcdf = [
24
+ "xarray>=2023.1",
25
+ "netCDF4>=1.6",
26
+ "cartopy>=0.22",
27
+ "pandas>=2.0"
28
+ ]
23
29
 
24
30
  [project.scripts]
25
31
  viewtif = "viewtif.tif_viewer:main"
@@ -30,5 +36,4 @@ viewtif = "viewtif.tif_viewer:main"
30
36
  "Issues" = "https://github.com/nkeikon/tifviewer/issues"
31
37
 
32
38
  [tool.hatch.build.targets.wheel]
33
- packages = ["src/viewtif"]
34
-
39
+ packages = ["src/viewtif"]