<div dir="ltr">Hi Michael,<br>It seems to work.<br><br>Is there no way not to hard-code the GeoTransform, SrcRect, etc.  parameters?<br><br>Thank you<br><div><br></div><div><VRTDataset rasterXSize="174" rasterYSize="229"><br>  <SRS>EPSG:4326</SRS><br>  <GeoTransform>4.36, 0.0894, 0.0, 48.88, 0.0, -0.0597</GeoTransform><br>  <VRTRasterBand dataType="Float32" band="1"><br>    <Metadata><br>      <MDI key="long_name">NO2 Concentration</MDI><br>      <MDI key="units">ppb vol</MDI><br>    </Metadata><br>    <ComplexSource><br>      <SourceFilename relativeToVRT="1">NETCDF:"<a href="http://out.input.nc">out.input.nc</a>":NO2</SourceFilename><br>      <SourceBand>1</SourceBand><br>      <SourceProperties RasterXSize="174" RasterYSize="229" DataType="Float32" BlockXSize="174" BlockYSize="1" /><br>      <SrcRect xOff="0" yOff="0" xSize="174" ySize="229" /><br>      <DstRect xOff="0" yOff="0" xSize="174" ySize="229" /><br>    </ComplexSource><br>  </VRTRasterBand><br></VRTDataset></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, 3 Dec 2024 at 12:02, Michael Sumner <<a href="mailto:mdsumner@gmail.com">mdsumner@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">Try</p>
<p dir="ltr">gdalinfo NETCDF:"<a href="http://out.input.nc" target="_blank">out.input.nc</a>":NO2</p>
<p dir="ltr">If you see those lon and lat subdatasets listed under "geolocation" then you can use gdalwarp to create a georeferenced dataset, automatically with gdalwarp <a href="http://sds.in" target="_blank">sds.in</a> out.tif or by specifying a grid with some of -tr,-te,-t_srs,-ts.</p>
<p dir="ltr">If they don't appear they can can be arranged via VRT.</p>
<p dir="ltr">HTH </p>
<br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 3 Dec 2024, 21:52 andy via gdal-dev, <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,<br clear="all"></div><div>I have a NetCDF file that I cannot share here.</div><div><br></div><div>Using gdalinfo I have the below output.</div><div><br></div><div>Is there any way to tell gdal to read coordinates from the “lon” and “lat” variables/subdatasets, and thus have the coordinates of the vertices not in pixels?</div><div><br></div><div>Thank you very much</div><div><br></div><div><br></div><div>Driver: netCDF/Network Common Data Format<br>Files: none associated<br>Size is 512, 512<br>Subdatasets:<br>  SUBDATASET_1_NAME=NETCDF:"<a href="http://out.input.nc" rel="noreferrer" target="_blank">out.input.nc</a>":NO2<br>  SUBDATASET_1_DESC=[25x1x229x174] NO2 (32-bit floating-point)<br>  SUBDATASET_2_NAME=NETCDF:"<a href="http://out.input.nc" rel="noreferrer" target="_blank">out.input.nc</a>":O3<br>  SUBDATASET_2_DESC=[25x1x229x174] O3 (32-bit floating-point)<br>  SUBDATASET_3_NAME=NETCDF:"<a href="http://out.input.nc" rel="noreferrer" target="_blank">out.input.nc</a>":PM10<br>  SUBDATASET_3_DESC=[25x1x229x174] PM10 (32-bit floating-point)<br>  SUBDATASET_4_NAME=NETCDF:"<a href="http://out.input.nc" rel="noreferrer" target="_blank">out.input.nc</a>":PM25<br>  SUBDATASET_4_DESC=[25x1x229x174] PM25 (32-bit floating-point)<br>  SUBDATASET_5_NAME=NETCDF:"<a href="http://out.input.nc" rel="noreferrer" target="_blank">out.input.nc</a>":Times<br>  SUBDATASET_5_DESC=[25x19] Times (8-bit character)<br>  SUBDATASET_6_NAME=NETCDF:"<a href="http://out.input.nc" rel="noreferrer" target="_blank">out.input.nc</a>":lat<br>  SUBDATASET_6_DESC=[229x174] lat (64-bit floating-point)<br>  SUBDATASET_7_NAME=NETCDF:"<a href="http://out.input.nc" rel="noreferrer" target="_blank">out.input.nc</a>":lon<br>  SUBDATASET_7_DESC=[229x174] lon (64-bit floating-point)<br>  SUBDATASET_8_NAME=NETCDF:"<a href="http://out.input.nc" rel="noreferrer" target="_blank">out.input.nc</a>":pDUST<br>  SUBDATASET_8_DESC=[25x1x229x174] pDUST (32-bit floating-point)<br>Corner Coordinates:<br>Upper Left  (    0.0,    0.0)<br>Lower Left  (    0.0,  512.0)<br>Upper Right (  512.0,    0.0)<br>Lower Right (  512.0,  512.0)<br>Center      (  256.0,  256.0)</div><div><br></div><div><br></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span style="font-size:small">___________________</span><br></div><div dir="ltr"><span style="font-size:small"><br></span></div><div dir="ltr">Andrea Borruso<br>
website: <a href="https://medium.com/tantotanto" rel="noreferrer" target="_blank">https://medium.com/tantotanto</a><br>38° 7' 48" N, 13° 21' 9" E, EPSG:4326<br><span style="font-size:small">___________________</span><br>
<br>
"cercare e saper riconoscere chi e cosa,<br>
 in mezzo all’inferno, non è inferno, <br>
e farlo durare, e dargli spazio"<br>
<br>
Italo Calvino<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span style="font-size:small">___________________</span><br></div><div dir="ltr"><span style="font-size:small"><br></span></div><div dir="ltr">Andrea Borruso<br>
website: <a href="https://medium.com/tantotanto" target="_blank">https://medium.com/tantotanto</a><br>38° 7' 48" N, 13° 21' 9" E, EPSG:4326<br><span style="font-size:small">___________________</span><br>
<br>
"cercare e saper riconoscere chi e cosa,<br>
 in mezzo all’inferno, non è inferno, <br>
e farlo durare, e dargli spazio"<br>
<br>
Italo Calvino<br></div></div></div></div></div></div></div></div></div></div></div></div></div>