<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Michael,</p>
<p>doesn't do exactly what you want, but should be easy to modify to
satisfy your requirements:
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/master/apps/gdal2ogr.c">https://github.com/OSGeo/gdal/blob/master/apps/gdal2ogr.c</a></p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 12/12/2024 à 06:40, Michael Sumner
via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAAcGz9-Pfciv0eaEnviON8460FSjhJGiCtrsmUS=_MC7J4VOyw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi, I'd like to be able to create a tabular version
efficiently directly from a raster. I can do this in scripting
but is there a utility- or api- way to do this? </div>
<div><br>
</div>
<div>I literally just want a Parquet file with a column for each
band from a raster, with raw pixel values, no index, no
coordinates, no rat or anything like that. I have very common
workflows for this where the georeferencing (bbox, shape, crs)
is just used manually. </div>
<div><br>
</div>
<div>If this doesn't exist a barebones outline would be amazing
(!), and (I) could add features like column names, cell index
or row/col index, coordinates, sparse representation for
missing values etc etc. </div>
<div><br>
</div>
<div>An imagined -info output would look like this for a 2x3
raster with 2 bands and values 1:6 in band 1, and values 7:12
in band 2 described below. </div>
<div><br>
</div>
<div>thanks so much, Mike</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
gdalinfo file.tif<br>
Driver: GTiff/GeoTIFF<br>
Files: file.tif<br>
Size is 3, 2<br>
Origin = (0.000000000000000,2.000000000000000)<br>
Pixel Size = (1.000000000000000,-1.000000000000000)<br>
Image Structure Metadata:<br>
COMPRESSION=LZW<br>
INTERLEAVE=PIXEL<br>
Corner Coordinates:<br>
Upper Left ( 0.0000000, 2.0000000)<br>
Lower Left ( 0.0000000, 0.0000000)<br>
Upper Right ( 3.0000000, 2.0000000)<br>
Lower Right ( 3.0000000, 0.0000000)<br>
Center ( 1.5000000, 1.0000000)<br>
Band 1 Block=3x2 Type=UInt32, ColorInterp=Gray<br>
Description = a<br>
Min=1.000 Max=6.000<br>
Minimum=1.000, Maximum=6.000, Mean=-9999.000,
StdDev=-9999.000<br>
NoData Value=4294967295<br>
Metadata:<br>
STATISTICS_MINIMUM=1<br>
STATISTICS_MAXIMUM=6<br>
STATISTICS_MEAN=-9999<br>
STATISTICS_STDDEV=-9999<br>
Band 2 Block=3x2 Type=UInt32, ColorInterp=Undefined<br>
Description = b<br>
Min=7.000 Max=12.000<br>
Minimum=7.000, Maximum=12.000, Mean=-9999.000,
StdDev=-9999.000<br>
NoData Value=4294967295<br>
Metadata:<br>
STATISTICS_MINIMUM=7<br>
STATISTICS_MAXIMUM=12<br>
STATISTICS_MEAN=-9999<br>
STATISTICS_STDDEV=-9999<br>
<br>
<br>
<br>
INFO: Open of `file.parquet'<br>
using driver `Parquet' successful.<br>
<br>
Layer name: file<br>
Geometry: None<br>
Feature Count: 6<br>
Layer SRS WKT:<br>
(unknown)<br>
a: Integer (0.0)<br>
b: Integer (0.0)<br>
OGRFeature(file):0<br>
a (Integer) = 1<br>
b (Integer) = 7<br>
<br>
OGRFeature(file):1<br>
a (Integer) = 3<br>
b (Integer) = 9<br>
<br>
OGRFeature(file):2<br>
a (Integer) = 5<br>
b (Integer) = 11<br>
<br>
OGRFeature(file):3<br>
a (Integer) = 2<br>
b (Integer) = 8<br>
<br>
OGRFeature(file):4<br>
a (Integer) = 4<br>
b (Integer) = 10<br>
<br>
OGRFeature(file):5<br>
a (Integer) = 6<br>
b (Integer) = 12<br>
<br>
</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">Michael Sumner<br>
Research Software Engineer<br>
Australian Antarctic Division<br>
Hobart, Australia<br>
e-mail: <a href="mailto:mdsumner@gmail.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">mdsumner@gmail.com</a></div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.</pre>
</body>
</html>