<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>FYI, until recently representation of vector geometries in netCDF-CF has not been standardized. But there's a mature proposal/spec in place for "simple geometries" that's close to being officially adopted by CF. See:</div><div><a href="https://github.com/twhiteaker/netCDF-CF-simple-geometry">https://github.com/twhiteaker/netCDF-CF-simple-geometry</a></div><div><a href="https://cf-trac.llnl.gov/trac/ticket/164">https://cf-trac.llnl.gov/trac/ticket/164</a></div><div><a href="https://www.unidata.ucar.edu/mailing_lists/archives/netcdf-java/2018/pdfFEz5anheEE.pdf">https://www.unidata.ucar.edu/mailing_lists/archives/netcdf-java/2018/pdfFEz5anheEE.pdf</a> (a poster)</div><div><br></div><div>I believe there are sample data files and a Python implementation accessible on the github site.</div><div><br></div><div>This spec is implemented on the netcdf classic (netcdf 3) model. So, it doesn't use features that are specific to netcdf 4.</div><div><br></div><div>Cheers,</div><div>-Emilio<br></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 16, 2019 at 12:32 AM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.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">David,<br>
<br>
> <br>
> Thanks for sharing the updated sample product with srs info included.<br>
> <br>
> I was able to mimic you polygon formatting in the attached TEST.nc file.<br>
> Unfortunately I was not able to get the srs info captured in my shape file<br>
> when applying ogr2ogr.<br>
> I am using the same crs I used successful used for<br>
> 2D rasters in nc4 (longitude latitude). When I turn the debug mode on it<br>
> states it looks for a geoTransform when generating the shapefile. I<br>
> therefore added a dummy geoTransform to my crs but that did not make a<br>
> difference. I am unsure why this would be needed for a polygon, but saw<br>
> your sample has one in there too. <br>
> Any idea what I might be doing incorrectly or should modify in my crs?<br>
> Below I include the commandline outputs.<br>
<br>
Several remarks:<br>
- for the vector side, use ogrinfo for inspection. gdalinfo doesn't work for <br>
me with the file you provided, which is expected since it is a vector one and <br>
not a raster one, with 2.3.0 or above, so I suspect you might use a too old <br>
version<br>
- it appears the code require the crs variable to have a 'spatial_ref' <br>
attribute with the WKT string and not 'crs_wkt'. Deducing the SRS from only CF <br>
attributes (grid_mapping_name, longitude_of_prime_meridian, semi_major_axis, <br>
inverse_flattening) isn't supported currently in the vector case, since the <br>
code also expects x and y variables to be present.<br>
<br>
Even<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div>