[postgis-tickets] [PostGIS] #3438: Unable to add NetCDF support to PostGIS 2.2
PostGIS
trac at osgeo.org
Thu Jan 28 02:47:28 PST 2016
#3438: Unable to add NetCDF support to PostGIS 2.2
------------------------+---------------------------------
Reporter: N3tMaster | Owner: pramsey
Type: defect | Status: new
Priority: blocker | Milestone: PostGIS GDAL
Component: postgis | Version: 2.2.x
Resolution: | Keywords: postgis gdal netcdf
------------------------+---------------------------------
Comment (by rouault):
netCDF files are sometimes reported as datasets with zero reaster band,
but with subdatasets listed. This is the subdatasets you must open. Use
gdalinfo on the main netCDF file to see the name of the subdataset to use.
Example :
{{{
$ gdalinfo NL.2001.nsidc0321v01.nc
Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
Driver: netCDF/Network Common Data Format
Files: NL.2001.nsidc0321v01.nc
Size is 512, 512
Coordinate System is `'
Metadata:
NC_GLOBAL#comment=Not set at this time
NC_GLOBAL#creation_date=Wed Feb 20 13:14:48 MST 2008
NC_GLOBAL#grid_id=Nl
NC_GLOBAL#history=Wed Feb 20 13:15:33 2008: ncrcat -O
NL.2001001.nsidc0321v01.nc NL.2001009.nsidc0321v01.nc
NL.2001017.nsidc0321v01.nc NL.2001025.nsidc0321v01.nc
NL.2001033.nsidc0321v01.nc NL.2001041.nsidc0321v01.nc
NL.2001049.nsidc0321v01.nc NL.2001057.nsidc0321v01.nc
NL.2001065.nsidc0321v01.nc NL.2001073.nsidc0321v01.nc
NL.2001081.nsidc0321v01.nc NL.2001089.nsidc0321v01.nc
NL.2001097.nsidc0321v01.nc NL.2001105.nsidc0321v01.nc
NL.2001113.nsidc0321v01.nc NL.2001121.nsidc0321v01.nc
NL.2001129.nsidc0321v01.nc NL.2001137.nsidc0321v01.nc
NL.2001145.nsidc0321v01.nc NL.2001153.nsidc0321v01.nc
NL.2001161.nsidc0321v01.nc NL.2001185.nsidc0321v01.nc
NL.2001193.nsidc0321v01.nc NL.2001201.nsidc0321v01.nc
NL.2001217.nsidc0321v01.nc NL.2001225.nsidc0321v01.nc
NL.2001233.nsidc0321v01.nc NL.2001241.nsidc0321v01.nc
NL.2001249.nsidc0321v01.nc NL.2001257.nsidc0321v01.nc
NL.2001265.nsidc0321v01.nc NL.2001273.nsidc0321v01.nc
NL.2001281.nsidc0321v01.nc NL.2001289.nsidc0321v01.nc
NL.2001297.nsidc0321v01.nc NL.2001305.nsidc0321v01.nc
NL.2001313.nsidc0321v01.nc NL.2001321.nsidc0321v01.nc
NL.2001329.nsidc0321v01.nc NL.2001337.nsidc0321v01.nc
NL.2001345.nsidc0321v01.nc NL.2001353.nsidc0321v01.nc
NL.2001361.nsidc0321v01.nc NL.2001.nsidc0321v01.nc
NC_GLOBAL#institution=National Snow & Ice Data Center, Boulder, CO
NC_GLOBAL#nco_openmp_thread_number=1
NC_GLOBAL#references=Data set documentation:
http://nsidc.org/data/nsidc-0321.html
NC_GLOBAL#source=Satellite observations from DMSP SSM/I and Terra MODIS
NC_GLOBAL#title=Global EASE-Grid 8-day Blended SSM/I and MODIS Snow
Cover
Subdatasets:
SUBDATASET_1_NAME=NETCDF:"NL.2001.nsidc0321v01.nc":bpInfo
SUBDATASET_1_DESC=[43x81] bpInfo (8-bit character)
SUBDATASET_2_NAME=NETCDF:"NL.2001.nsidc0321v01.nc":scaInfo
SUBDATASET_2_DESC=[43x81] scaInfo (8-bit character)
SUBDATASET_3_NAME=NETCDF:"NL.2001.nsidc0321v01.nc":latitude
SUBDATASET_3_DESC=[721x721] latitude (64-bit floating-point)
SUBDATASET_4_NAME=NETCDF:"NL.2001.nsidc0321v01.nc":longitude
SUBDATASET_4_DESC=[721x721] longitude (64-bit floating-point)
SUBDATASET_5_NAME=NETCDF:"NL.2001.nsidc0321v01.nc":SWE
SUBDATASET_5_DESC=[43x721x721] lwe_thickness_of_surface_snow_amount
(16-bit integer)
SUBDATASET_6_NAME=NETCDF:"NL.2001.nsidc0321v01.nc":SCA
SUBDATASET_6_DESC=[43x721x721] surface_snow_area_fraction (16-bit
integer)
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 512.0)
Upper Right ( 512.0, 0.0)
Lower Right ( 512.0, 512.0)
Center ( 256.0, 256.0)
}}}
{{{
$ gdalinfo NETCDF:"NL.2001.nsidc0321v01.nc":bpInfo
Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
Driver: netCDF/Network Common Data Format
Files: NL.2001.nsidc0321v01.nc
Size is 81, 43
Coordinate System is `'
Metadata:
bpInfo#long_name=SWE_file_used
bpInfo#_FillValue=
cols#long_name=x-coordinate in EASE-Grid
cols#standard_name=projection_x_coordinate
cols#units=count
cols#valid_range={0,720}
NC_GLOBAL#comment=Not set at this time
NC_GLOBAL#creation_date=Wed Feb 20 13:14:48 MST 2008
NC_GLOBAL#grid_id=Nl
NC_GLOBAL#history=Wed Feb 20 13:15:33 2008: ncrcat -O
NL.2001001.nsidc0321v01.nc NL.2001009.nsidc0321v01.nc
NL.2001017.nsidc0321v01.nc NL.2001025.nsidc0321v01.nc
NL.2001033.nsidc0321v01.nc NL.2001041.nsidc0321v01.nc
NL.2001049.nsidc0321v01.nc NL.2001057.nsidc0321v01.nc
NL.2001065.nsidc0321v01.nc NL.2001073.nsidc0321v01.nc
NL.2001081.nsidc0321v01.nc NL.2001089.nsidc0321v01.nc
NL.2001097.nsidc0321v01.nc NL.2001105.nsidc0321v01.nc
NL.2001113.nsidc0321v01.nc NL.2001121.nsidc0321v01.nc
NL.2001129.nsidc0321v01.nc NL.2001137.nsidc0321v01.nc
NL.2001145.nsidc0321v01.nc NL.2001153.nsidc0321v01.nc
NL.2001161.nsidc0321v01.nc NL.2001185.nsidc0321v01.nc
NL.2001193.nsidc0321v01.nc NL.2001201.nsidc0321v01.nc
NL.2001217.nsidc0321v01.nc NL.2001225.nsidc0321v01.nc
NL.2001233.nsidc0321v01.nc NL.2001241.nsidc0321v01.nc
NL.2001249.nsidc0321v01.nc NL.2001257.nsidc0321v01.nc
NL.2001265.nsidc0321v01.nc NL.2001273.nsidc0321v01.nc
NL.2001281.nsidc0321v01.nc NL.2001289.nsidc0321v01.nc
NL.2001297.nsidc0321v01.nc NL.2001305.nsidc0321v01.nc
NL.2001313.nsidc0321v01.nc NL.2001321.nsidc0321v01.nc
NL.2001329.nsidc0321v01.nc NL.2001337.nsidc0321v01.nc
NL.2001345.nsidc0321v01.nc NL.2001353.nsidc0321v01.nc
NL.2001361.nsidc0321v01.nc NL.2001.nsidc0321v01.nc
NC_GLOBAL#institution=National Snow & Ice Data Center, Boulder, CO
NC_GLOBAL#nco_openmp_thread_number=1
NC_GLOBAL#references=Data set documentation:
http://nsidc.org/data/nsidc-0321.html
NC_GLOBAL#source=Satellite observations from DMSP SSM/I and Terra MODIS
NC_GLOBAL#title=Global EASE-Grid 8-day Blended SSM/I and MODIS Snow
Cover
rows#long_name=y-coordinate in EASE-Grid
rows#standard_name=projection_y_coordinate
rows#units=count
rows#valid_range={0,720}
time#long_name=julian day
time#units=days since -4713-01-01 12:00:00
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 43.0)
Upper Right ( 81.0, 0.0)
Lower Right ( 81.0, 43.0)
Center ( 40.5, 21.5)
Band 1 Block=81x1 Type=Byte, ColorInterp=Undefined
NoData Value=0
Metadata:
long_name=SWE_file_used
NETCDF_VARNAME=bpInfo
_FillValue=
}}}
So in that case the name for PostGIS out-db must be
'NETCDF:"/path/to/NL.2001.nsidc0321v01.nc":variable_name'
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3438#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list