Database Reference
In-Depth Information
ColorInterp=Undefined
NoData Value=-9.96920996838686905e+36
Metadata:
actual_range={1.8626451e-06,743.505}
add_offset=0
cell_methods=time: mean (monthly from
values)
dataset=CPC Monthly Soil Moisture
level_desc=Surface
long_name=Model-Calculated Long Term
Monthly Mean Soil Moisture
missing_value=-9.96921e+36
NETCDF_DIM_time=0
NETCDF_VARNAME=soilw
parent_stat=Other
scale_factor=1
standard_name=lwe_thickness_of_soil_moisture_content
statistic=Long Term Mean
units=mm
valid_range={0,1000}
var_desc=Soil Moisture
...(other 11 bands)...
3. WhatyouaregoingtodoiscreateaPythonscriptusingGDALandNumpy.
You will read a given netCDF dataset, iterate its subdatasets, and then
iterateeachsubdataset'sbands.Foreachsubdataset,youwillcreateapoint
PostGIS layer, and you will add a field for each band in order to store the
bandvaluesinthelayertable.Then,youwilliteratetheband'scells;foreach
cell, you will add a point in the layer with the corresponding band's values.
Therefore,createa netcdf2postgis.py fileandaddthefollowingPython
code to it:
import sys
from osgeo import gdal, ogr, osr
from osgeo.gdalconst import GA_ReadOnly,
GA_Update
Search WWH ::




Custom Search