[gdal-dev] vector representation in netcdf 4

Emilio Mayorga emiliomayorga at gmail.com
Thu Jan 17 09:38:29 PST 2019


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:
https://github.com/twhiteaker/netCDF-CF-simple-geometry
https://cf-trac.llnl.gov/trac/ticket/164
https://www.unidata.ucar.edu/mailing_lists/archives/netcdf-java/2018/pdfFEz5anheEE.pdf
(a poster)

I believe there are sample data files and a Python implementation
accessible on the github site.

This spec is implemented on the netcdf classic (netcdf 3) model. So, it
doesn't use features that are specific to netcdf 4.

Cheers,
-Emilio


On Wed, Jan 16, 2019 at 12:32 AM Even Rouault <even.rouault at spatialys.com>
wrote:

> David,
>
> >
> > Thanks for sharing the updated sample product with srs info included.
> >
> > I was able to mimic you polygon formatting in the attached TEST.nc file.
> > Unfortunately I was not able to get the srs info captured in my shape
> file
> > when applying ogr2ogr.
> > I am using the same crs I used successful used for
> > 2D rasters in nc4 (longitude latitude). When I turn the debug mode on it
> > states it looks for a geoTransform when generating the shapefile. I
> > therefore added a dummy geoTransform to my crs but that did not make a
> > difference. I am unsure why this would be needed for a polygon, but saw
> > your sample has one in there too.
> > Any idea what I might be doing incorrectly or should modify in my crs?
> > Below I include the commandline outputs.
>
> Several remarks:
> - for the vector side, use ogrinfo for inspection. gdalinfo doesn't work
> for
> me with the file you provided, which is expected since it is a vector one
> and
> not a raster one, with 2.3.0 or above, so I suspect you might use a too
> old
> version
> - it appears the code require the crs variable to have a 'spatial_ref'
> attribute with the WKT string and not 'crs_wkt'. Deducing the SRS from
> only CF
> attributes (grid_mapping_name, longitude_of_prime_meridian,
> semi_major_axis,
> inverse_flattening) isn't supported currently in the vector case, since
> the
> code also expects x and y variables to be present.
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190117/ae67412b/attachment-0001.html>


More information about the gdal-dev mailing list