[gdal-dev] vector representation in netcdf 4
Even Rouault
even.rouault at spatialys.com
Fri Jan 11 14:11:03 PST 2019
David,
No need to test with QGIS, ogrinfo also shows that the SRS isn't recognized.
This sample files was quickly hand generated with ncdump/ncgen without taking
much care to the georeferencing. It lacks referencing the transverse_mercator
variable in the vector fields.
Like:
char ogc_wkt(record, ogc_wkt_max_width) ;
ogc_wkt:long_name = "Geometry as ISO WKT" ;
ogc_wkt:grid_mapping = "transverse_mercator" ;
double AREA(record) ;
AREA:long_name = "Field AREA" ;
AREA:ogr_field_name = "AREA" ;
AREA:ogr_field_type = "Real" ;
AREA:ogr_field_width = 12 ;
AREA:ogr_field_precision = 3 ;
AREA:grid_mapping = "transverse_mercator" ;
double EAS_ID(record) ;
EAS_ID:long_name = "Field EAS_ID" ;
EAS_ID:ogr_field_name = "EAS_ID" ;
EAS_ID:ogr_field_type = "Integer64" ;
EAS_ID:ogr_field_width = 11 ;
EAS_ID:grid_mapping = "transverse_mercator" ;
char PRFEDEA(record, PRFEDEA_max_width) ;
PRFEDEA:long_name = "Field PRFEDEA" ;
PRFEDEA:ogr_field_name = "PRFEDEA" ;
PRFEDEA:ogr_field_type = "String" ;
PRFEDEA:ogr_field_width = 16 ;
PRFEDEA:grid_mapping = "transverse_mercator" ;
Actually I've just tried adding this and it works now. Modified file attached
Even
> Dear GDAL developers,
>
> I am looking into adding a wkt compatible polygon into a netcdf (version 4)
> file which also has raster information in it.
Attached is a sample file
> generated by Even “mixed.nc” with a wkt polygon enclosed formatted as a
> string of numpy array. The sample allows to extract a poly using ogr2ogr as
> “ogr2ogr mixed.shp mixed.nc poly”
> Although QGIS does not seem to catch projection information.
> Is there a standard way of storing vector information in netcdf conform CF
> or would the attached sample be specifically for GDAL only?
> Thank you,
> David
>
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mixed.nc
Type: application/x-netcdf
Size: 53847 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190111/d9189c29/attachment-0001.nc>
More information about the gdal-dev
mailing list