viewinline 0.1.5__tar.gz → 0.2.0__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.
@@ -0,0 +1,203 @@
1
+ Copyright 2025 Keiko Nomura
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright [yyyy] [name of copyright owner]
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: viewinline
3
+ Version: 0.2.0
4
+ Summary: Quick look geospatial viewer for iTerm2 compatible terminals
5
+ Project-URL: Homepage, https://github.com/nkeikon/viewinline
6
+ Project-URL: Repository, https://github.com/nkeikon/viewinline
7
+ Project-URL: Issues, https://github.com/nkeikon/viewinline/issues
8
+ Author: Keiko Nomura
9
+ License: Apache-2.0
10
+ License-File: LICENSE
11
+ Requires-Python: >=3.9
12
+ Requires-Dist: geopandas
13
+ Requires-Dist: matplotlib
14
+ Requires-Dist: numpy
15
+ Requires-Dist: pillow
16
+ Requires-Dist: pyogrio
17
+ Requires-Dist: rasterio
18
+ Provides-Extra: sql
19
+ Requires-Dist: duckdb; extra == 'sql'
20
+ Description-Content-Type: text/markdown
21
+
22
+ # viewinline
23
+ [![Downloads](https://static.pepy.tech/badge/viewinline)](https://pepy.tech/project/viewinline)
24
+ [![PyPI version](https://img.shields.io/pypi/v/viewinline)](https://pypi.org/project/viewinline/)
25
+ [![Python version](https://img.shields.io/badge/python-%3E%3D3.9-blue.svg)](https://pypi.org/project/viewinline/)
26
+
27
+ **Quick-look geospatial viewer for compatible terminals.**
28
+ Displays rasters, vectors, and CSV data directly in the terminal with no GUI and no temporary files.
29
+
30
+ Think of it as `ls` for geospatial files — designed for quick visual inspection at the command line, not a replacement for QGIS, ArcGIS, or analytical workflows.
31
+
32
+ This tool combines the core display logic of `viewtif` and `viewgeom`, but is **non-interactive**: you can't zoom, pan, or switch colormaps on the fly. Instead, you control everything through command-line options (e.g. --display, --color-by, --colormap).
33
+
34
+ It uses the iTerm2 inline image protocol (OSC 1337) to render previews. In incompatible terminals, the escape codes are silently ignored with no errors or crashes.
35
+
36
+ ## Installation
37
+ Requires Python 3.9 or later.
38
+
39
+ ```bash
40
+ pip install viewinline
41
+ ```
42
+
43
+ ## Usage
44
+ ```bash
45
+ viewinline path/to/file.tif
46
+ viewinline path/to/vector.geojson
47
+ viewinline R.tif G.tif B.tif # RGB composite
48
+ viewinline path/to/multiband.tif --rgb-bands 3,2,1
49
+ viewinline path/to/folder --gallery 4x3 # show image gallery (e.g. 4x3 grid)
50
+ viewinline data.csv # preview rows and columns
51
+ viewinline data.csv --describe # summary statistics for all numeric columns
52
+ viewinline data.csv --describe Income # summary statistics for one column
53
+ viewinline data.csv --hist # histograms for all numeric columns
54
+ viewinline data.csv --hist area_km2 # histogram for one column
55
+ viewinline data.csv --scatter X Y # scatter plot
56
+ viewinline data.csv --where "year > 2010" # filter rows
57
+ viewinline data.csv --sort population # sort rows
58
+ viewinline data.csv --sql "SELECT * FROM data WHERE area > 100 ORDER BY year" # full SQL
59
+ ```
60
+
61
+ ## Compatible terminals
62
+
63
+ The iTerm2 inline image protocol is supported by:
64
+
65
+ - **iTerm2** (macOS)
66
+ - **WezTerm** (cross-platform)
67
+ - **Konsole** (Linux/KDE)
68
+ - **Rio**, **Contour** (Linux)
69
+
70
+ Not supported: Mac Terminal, GNOME Terminal, Kitty, Ghostty, Alacritty.
71
+
72
+ > **Note:** Does not work inside tmux or screen.
73
+
74
+ ## Features
75
+ - Previews rasters, vectors and CSV files directly in the terminal
76
+ - Non-interactive: everything is controlled through command-line options
77
+
78
+ ## Supported formats
79
+ **Rasters**
80
+ - GeoTIFF (.tif, .tiff)
81
+ - PNG, JPEG (.png, .jpg, .jpeg)
82
+ - Single-band or multi-band composites
83
+
84
+ **Composite inputs**
85
+ - You can pass three rasters (e.g. `R.tif G.tif B.tif`) to create an RGB composite
86
+
87
+ **Vectors**
88
+ - GeoJSON (`.geojson`)
89
+ - Shapefile (`.shp`, `.dbf`, `.shx`)
90
+ - GeoPackage (`.gpkg`)
91
+
92
+ **CSV**
93
+ - Preview file summary (rows, columns, and names)
94
+ - Summary statistics with `--describe`
95
+ - Show all numeric columns, or specify one (e.g. `--describe height`)
96
+ - Inline histograms with `--hist`
97
+ - Show all numeric columns, or specify one (e.g. `--hist area_km2`)
98
+ - Scatter plots with `--scatter X Y`
99
+ - Filter rows with `--where`, sort with `--sort`, limit output with `--limit`
100
+ - Full SQL queries with `--sql` (DuckDB required) — use `data` as the table name (e.g. `--sql "SELECT State, AVG(Income) FROM data GROUP BY State"`)
101
+
102
+ **Gallery view**
103
+ - Display all images in a folder with `--gallery 4x4`
104
+
105
+ ## Dependencies
106
+
107
+ Core dependencies (installed automatically):
108
+ - `rasterio` — raster reading
109
+ - `geopandas`, `pyogrio` — vector reading
110
+ - `matplotlib` — vector rendering
111
+ - `Pillow` — image encoding
112
+ - `numpy`, `pandas` — data handling
113
+
114
+ Optional:
115
+ - `duckdb` — required for `--where`, `--sort`, `--sql`, and `--limit` with filtering. Install separately with `pip install duckdb`.
116
+
117
+ ## Available options
118
+ ```
119
+ General:
120
+ --display DISPLAY Resize only the displayed image (0.5=smaller, 2=bigger). Default: auto-fit to terminal.
121
+
122
+ Raster:
123
+ --band BAND Band number to display for single-band rasters. (default: 1)
124
+ --colormap Apply colormap to single-band rasters. Flag without value → 'terrain'.
125
+ --rgb-bands RGB_BANDS Comma-separated band numbers for RGB display (e.g., '3,2,1'). Overrides default 1-3.
126
+ --vmin VMIN Minimum pixel value for raster display scaling.
127
+ --vmax VMAX Maximum pixel value for raster display scaling.
128
+ --nodata NODATA Override nodata value for rasters if dataset metadata is incorrect.
129
+ --gallery [GRID] Display all PNG/JPG/TIF images in a folder as thumbnails (e.g., 5x5 grid).
130
+
131
+ Vector:
132
+ --color-by COLUMN Column to color vector features by.
133
+ --colormap Apply colormap to vector coloring. Flag without value → 'terrain'.
134
+ --width WIDTH Line width for vector boundaries. (default: 0.7)
135
+ --edgecolor COLOR Edge color for vector outlines (hex or named color). (default: #F6FF00)
136
+ --layer LAYER Layer name for GeoPackage or multi-layer files.
137
+
138
+ CSV:
139
+ --describe [COLUMN] Show summary statistics for all numeric columns or specify one column name.
140
+ --hist [COLUMN] Show histograms for all numeric columns or specify one column name.
141
+ --bins BINS Number of bins for histograms (used with --hist). (default: 20)
142
+ --scatter X Y Plot scatter of two numeric CSV columns (e.g. --scatter area_km2 year).
143
+ --unique COLUMN Show unique values for a categorical column.
144
+ --where EXPR Filter rows using SQL WHERE clause (DuckDB required) (e.g. --where "year > 2010")
145
+ --sort COLUMN Sort rows by values in the specified column, ascending by default. Use --desc to reverse.
146
+ --desc Sort in descending order (used with --sort).
147
+ --limit N Limit number of rows shown (e.g. --limit 100).
148
+ --select COLUMNS Select specific columns (space separated) (e.g. --select Country City).
149
+ --sql QUERY Execute full DuckDB SQL query. Use 'data' as the table name (e.g. --sql "SELECT * FROM data WHERE Poverty > 40").
150
+ ```
151
+
152
+ </small>
153
+
154
+ ## Need help?
155
+ You can ask questions about usage via the documentation-based assistant:
156
+
157
+ 👉 [Ask the viewtif + viewgeom + viewinline Helper](https://chatgpt.com/g/g-698b61c42f788191b884aed1b99dfcd8-viewtif-viewgeom-viewinline-helper)
158
+
159
+ 👉 For NASA staff: find 'viewtif + viewgeom + viewinline Helper' via the ChatGSFC Agent Marketplace
160
+
161
+ ## License
162
+ This project is released under the Apache License 2.0 © 2025 Keiko Nomura.
163
+
164
+ If you find this tool useful, please consider supporting or acknowledging it in your work.
165
+
166
+ ## Useful links
167
+ - [YouTube demo playlist](https://www.youtube.com/playlist?list=PLP9MNCMgJIHj6FvahJ6Tembp1rCyhLtR4)
168
+ - [Demo at the initial release](https://www.linkedin.com/posts/keiko-nomura-0231891_just-released-viewinline-for-those-using-activity-7390643680770023424-8Guu?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
169
+ - [Demo for the v0.1.3](https://www.linkedin.com/posts/keiko-nomura-0231891_just-released-viewinline-v013-for-iterm2-activity-7391633864798081025-dPbk?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
170
+ - [Demo with GDAL](https://www.linkedin.com/posts/keiko-nomura-0231891_if-you-use-gdal-heres-a-quick-example-workflow-activity-7390892270847373312-XWZ4?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
171
+ - [User feedback (thank you!)](https://www.linkedin.com/posts/jamshidsodikov_shout-out-to-keiko-nomura-for-viewinline-activity-7390979602539528192-S8JQ?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
@@ -0,0 +1,150 @@
1
+ # viewinline
2
+ [![Downloads](https://static.pepy.tech/badge/viewinline)](https://pepy.tech/project/viewinline)
3
+ [![PyPI version](https://img.shields.io/pypi/v/viewinline)](https://pypi.org/project/viewinline/)
4
+ [![Python version](https://img.shields.io/badge/python-%3E%3D3.9-blue.svg)](https://pypi.org/project/viewinline/)
5
+
6
+ **Quick-look geospatial viewer for compatible terminals.**
7
+ Displays rasters, vectors, and CSV data directly in the terminal with no GUI and no temporary files.
8
+
9
+ Think of it as `ls` for geospatial files — designed for quick visual inspection at the command line, not a replacement for QGIS, ArcGIS, or analytical workflows.
10
+
11
+ This tool combines the core display logic of `viewtif` and `viewgeom`, but is **non-interactive**: you can't zoom, pan, or switch colormaps on the fly. Instead, you control everything through command-line options (e.g. --display, --color-by, --colormap).
12
+
13
+ It uses the iTerm2 inline image protocol (OSC 1337) to render previews. In incompatible terminals, the escape codes are silently ignored with no errors or crashes.
14
+
15
+ ## Installation
16
+ Requires Python 3.9 or later.
17
+
18
+ ```bash
19
+ pip install viewinline
20
+ ```
21
+
22
+ ## Usage
23
+ ```bash
24
+ viewinline path/to/file.tif
25
+ viewinline path/to/vector.geojson
26
+ viewinline R.tif G.tif B.tif # RGB composite
27
+ viewinline path/to/multiband.tif --rgb-bands 3,2,1
28
+ viewinline path/to/folder --gallery 4x3 # show image gallery (e.g. 4x3 grid)
29
+ viewinline data.csv # preview rows and columns
30
+ viewinline data.csv --describe # summary statistics for all numeric columns
31
+ viewinline data.csv --describe Income # summary statistics for one column
32
+ viewinline data.csv --hist # histograms for all numeric columns
33
+ viewinline data.csv --hist area_km2 # histogram for one column
34
+ viewinline data.csv --scatter X Y # scatter plot
35
+ viewinline data.csv --where "year > 2010" # filter rows
36
+ viewinline data.csv --sort population # sort rows
37
+ viewinline data.csv --sql "SELECT * FROM data WHERE area > 100 ORDER BY year" # full SQL
38
+ ```
39
+
40
+ ## Compatible terminals
41
+
42
+ The iTerm2 inline image protocol is supported by:
43
+
44
+ - **iTerm2** (macOS)
45
+ - **WezTerm** (cross-platform)
46
+ - **Konsole** (Linux/KDE)
47
+ - **Rio**, **Contour** (Linux)
48
+
49
+ Not supported: Mac Terminal, GNOME Terminal, Kitty, Ghostty, Alacritty.
50
+
51
+ > **Note:** Does not work inside tmux or screen.
52
+
53
+ ## Features
54
+ - Previews rasters, vectors and CSV files directly in the terminal
55
+ - Non-interactive: everything is controlled through command-line options
56
+
57
+ ## Supported formats
58
+ **Rasters**
59
+ - GeoTIFF (.tif, .tiff)
60
+ - PNG, JPEG (.png, .jpg, .jpeg)
61
+ - Single-band or multi-band composites
62
+
63
+ **Composite inputs**
64
+ - You can pass three rasters (e.g. `R.tif G.tif B.tif`) to create an RGB composite
65
+
66
+ **Vectors**
67
+ - GeoJSON (`.geojson`)
68
+ - Shapefile (`.shp`, `.dbf`, `.shx`)
69
+ - GeoPackage (`.gpkg`)
70
+
71
+ **CSV**
72
+ - Preview file summary (rows, columns, and names)
73
+ - Summary statistics with `--describe`
74
+ - Show all numeric columns, or specify one (e.g. `--describe height`)
75
+ - Inline histograms with `--hist`
76
+ - Show all numeric columns, or specify one (e.g. `--hist area_km2`)
77
+ - Scatter plots with `--scatter X Y`
78
+ - Filter rows with `--where`, sort with `--sort`, limit output with `--limit`
79
+ - Full SQL queries with `--sql` (DuckDB required) — use `data` as the table name (e.g. `--sql "SELECT State, AVG(Income) FROM data GROUP BY State"`)
80
+
81
+ **Gallery view**
82
+ - Display all images in a folder with `--gallery 4x4`
83
+
84
+ ## Dependencies
85
+
86
+ Core dependencies (installed automatically):
87
+ - `rasterio` — raster reading
88
+ - `geopandas`, `pyogrio` — vector reading
89
+ - `matplotlib` — vector rendering
90
+ - `Pillow` — image encoding
91
+ - `numpy`, `pandas` — data handling
92
+
93
+ Optional:
94
+ - `duckdb` — required for `--where`, `--sort`, `--sql`, and `--limit` with filtering. Install separately with `pip install duckdb`.
95
+
96
+ ## Available options
97
+ ```
98
+ General:
99
+ --display DISPLAY Resize only the displayed image (0.5=smaller, 2=bigger). Default: auto-fit to terminal.
100
+
101
+ Raster:
102
+ --band BAND Band number to display for single-band rasters. (default: 1)
103
+ --colormap Apply colormap to single-band rasters. Flag without value → 'terrain'.
104
+ --rgb-bands RGB_BANDS Comma-separated band numbers for RGB display (e.g., '3,2,1'). Overrides default 1-3.
105
+ --vmin VMIN Minimum pixel value for raster display scaling.
106
+ --vmax VMAX Maximum pixel value for raster display scaling.
107
+ --nodata NODATA Override nodata value for rasters if dataset metadata is incorrect.
108
+ --gallery [GRID] Display all PNG/JPG/TIF images in a folder as thumbnails (e.g., 5x5 grid).
109
+
110
+ Vector:
111
+ --color-by COLUMN Column to color vector features by.
112
+ --colormap Apply colormap to vector coloring. Flag without value → 'terrain'.
113
+ --width WIDTH Line width for vector boundaries. (default: 0.7)
114
+ --edgecolor COLOR Edge color for vector outlines (hex or named color). (default: #F6FF00)
115
+ --layer LAYER Layer name for GeoPackage or multi-layer files.
116
+
117
+ CSV:
118
+ --describe [COLUMN] Show summary statistics for all numeric columns or specify one column name.
119
+ --hist [COLUMN] Show histograms for all numeric columns or specify one column name.
120
+ --bins BINS Number of bins for histograms (used with --hist). (default: 20)
121
+ --scatter X Y Plot scatter of two numeric CSV columns (e.g. --scatter area_km2 year).
122
+ --unique COLUMN Show unique values for a categorical column.
123
+ --where EXPR Filter rows using SQL WHERE clause (DuckDB required) (e.g. --where "year > 2010")
124
+ --sort COLUMN Sort rows by values in the specified column, ascending by default. Use --desc to reverse.
125
+ --desc Sort in descending order (used with --sort).
126
+ --limit N Limit number of rows shown (e.g. --limit 100).
127
+ --select COLUMNS Select specific columns (space separated) (e.g. --select Country City).
128
+ --sql QUERY Execute full DuckDB SQL query. Use 'data' as the table name (e.g. --sql "SELECT * FROM data WHERE Poverty > 40").
129
+ ```
130
+
131
+ </small>
132
+
133
+ ## Need help?
134
+ You can ask questions about usage via the documentation-based assistant:
135
+
136
+ 👉 [Ask the viewtif + viewgeom + viewinline Helper](https://chatgpt.com/g/g-698b61c42f788191b884aed1b99dfcd8-viewtif-viewgeom-viewinline-helper)
137
+
138
+ 👉 For NASA staff: find 'viewtif + viewgeom + viewinline Helper' via the ChatGSFC Agent Marketplace
139
+
140
+ ## License
141
+ This project is released under the Apache License 2.0 © 2025 Keiko Nomura.
142
+
143
+ If you find this tool useful, please consider supporting or acknowledging it in your work.
144
+
145
+ ## Useful links
146
+ - [YouTube demo playlist](https://www.youtube.com/playlist?list=PLP9MNCMgJIHj6FvahJ6Tembp1rCyhLtR4)
147
+ - [Demo at the initial release](https://www.linkedin.com/posts/keiko-nomura-0231891_just-released-viewinline-for-those-using-activity-7390643680770023424-8Guu?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
148
+ - [Demo for the v0.1.3](https://www.linkedin.com/posts/keiko-nomura-0231891_just-released-viewinline-v013-for-iterm2-activity-7391633864798081025-dPbk?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
149
+ - [Demo with GDAL](https://www.linkedin.com/posts/keiko-nomura-0231891_if-you-use-gdal-heres-a-quick-example-workflow-activity-7390892270847373312-XWZ4?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
150
+ - [User feedback (thank you!)](https://www.linkedin.com/posts/jamshidsodikov_shout-out-to-keiko-nomura-for-viewinline-activity-7390979602539528192-S8JQ?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA0INsBVIO1f6nS_NkKqFh4Na1ZpoYo2fc)
@@ -4,10 +4,10 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "viewinline"
7
- version = "0.1.5"
8
- description = "Quick look geospatial viewer for iTerm2 and ANSI compatible terminals"
7
+ version = "0.2.0"
8
+ description = "Quick look geospatial viewer for iTerm2 compatible terminals"
9
9
  readme = "README.md"
10
- license = { text = "MIT" }
10
+ license = { text = "Apache-2.0" }
11
11
  authors = [
12
12
  { name = "Keiko Nomura" }
13
13
  ]
@@ -21,6 +21,9 @@ dependencies = [
21
21
  "pyogrio"
22
22
  ]
23
23
 
24
+ [project.optional-dependencies]
25
+ sql = ["duckdb"]
26
+
24
27
  [project.scripts]
25
28
  viewinline = "viewinline.viewinline:main"
26
29