[postgis-users] Problems loading norwegian climate data to PostGIS

Thiemo Kellner thiemo at gelassene-pferde.biz
Tue Jun 23 00:46:03 PDT 2020


Hi

I am new to spacial data processing. For a project of mine I try to  
load swedish climate data in to my PostGIS installation running/using  
an openSUSE Tumbleweed installation.

I downloaded the data from  
https://thredds.met.no/thredds/catalog/senorge/seNorge2/archive/PREC1m/catalog.html?dataset=senorge/seNorge2/archive/PREC1m/seNorge_v2_0_PREC1m_grid_1957_2015.nc and tried to load it  
by

function load() {
     _FILE=${1}
     _TABLE=$(basename -s .nc ${_FILE})
     nice -n 19 raster2pgsql -d \
                  -C \
                  -r \
                  -P \
                  -R \
                  -F \
                  -I \
                  -M \
                  -Y \
                  ${_FILE} \
                  nc.${_TABLE} | \
                    nice -n 19 psql -d norge -U norge -p 6543
}
load seNorge_v2_0_PREC1m_grid_1957_2015.nc

I could not see any error, however, the file is a good 700 MB size but  
the data load took only a few seconds. If I query the data, it seems  
to me that only a fragment of data was loaded:

select ST_MetaData(rast) as meta, -- Kind of a serialisation of the  
specifics below
        ST_PixelHeight(rast) As pixheight,
        ST_PixelWidth(rast) As pixhwidth,
        ST_IsEmpty(rast) as is_empty,
        ST_MemSize(rast) as space_used_in_B,
        ST_BandMetaData(rast, 1) as band_1_meta_data,
        ST_BandMetaData(rast, 708) as band_708_meta_data,
        ST_MemSize(rast)/1024 as space_used_in_KB,
        ST_GeoReference(rast, 'ESRI') As esri_ref,
        ST_GeoReference(rast, 'GDAL') As gdal_ref
   from nc.senorge_v2_0_prec1m_grid_1957_2015;

Please note I transposed the result of the query to better fit into the mail.
meta                 (-75000,8000000,1195,1550,1000,-1000,0,0,0,708)
pixheight            1000
pixhwidth            1000
is_empty             false
space_used_in_b      34048
band_1_meta_data      
(32BF,-999.989990234375,t,seNorge_v2_0_PREC1m_grid_1957_2015.nc,1,,)
band_708_meta_data    
(32BF,-999.989990234375,t,seNorge_v2_0_PREC1m_grid_1957_2015.nc,196,,)
space_used_in_kb     33
esri_ref             1000.0000000000 0.0000000000 0.0000000000  
-1000.0000000000 -74500.0000000000 7999500.0000000000
gdal_ref             1000.0000000000 0.0000000000 0.0000000000  
-1000.0000000000 -75000.0000000000 8000000.0000000000

Can anyone enlighten me?

Kind regards

Thiemo

-- 
S/MIME Public Key: https://oc.gelassene-pferde.biz/index.php/s/eJuAUFONag6ofnH
Signal (Safer than WhatsApp): +49 1578 7723737
Handys: +41 78 947 36 21 | +49 1578 772 37 37
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4001 bytes
Desc: S/MIME Signature
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20200623/082f9b73/attachment.bin>


More information about the postgis-users mailing list