[postgis-users] raster2pgsql creates tables without values

Andreas Laggner andreas.laggner at ti.bund.de
Tue Mar 31 04:08:35 PDT 2015


Hi Pierre,

this postgis databases are "defect" with raster import:

1. "POSTGIS="2.1.5 r13152" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 
4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" 
LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER"
with pg 9.4 on ubuntu 12.04
raster2pgsql: RELEASE: 2.1.5 GDAL_VERSION=19 (r13152)

2. "POSTGIS="2.1.2 r12389" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 
4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" 
LIBXML="2.9.1" LIBJSON="UNKNOWN" TOPOLOGY RASTER"
with pg 9.3 on ubuntu 14.04
raster2pgsql: RELEASE: 2.1.2 GDAL_VERSION=110 (r12389)

3. "POSTGIS="2.1.2 r12389" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 
4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" 
LIBXML="2.9.1" LIBJSON="UNKNOWN" (core procs from "2.1.1 r12113" need 
upgrade) TOPOLOGY (topology procs from "2.1.1 r12113" need up (...)"
with pg 9.3 on ubuntu 14.04
raster2pgsql: RELEASE: 2.1.2 GDAL_VERSION=110 (r12389)




different checks with 3 different raster imports like:

select (ST_PixelAsPolygons(rast)).val as wtd_t, 
(ST_PixelAsPolygons(rast)).geom as geom from rast.gw_moor_michel_200_200
RETURNS ALWAYS
No Pixel values found for band1

ST_BandIsNoData RETURNS ALWAYS true

ST_HistogramRETURNS ALWAYS 0 and NaN

ST_ValueCount wtih * RETURNS ALWAYS NaN

AND the same raster data in another postgis and values are there!!



Here the postgis where raster2pgsql works (it is very bad, because this 
is the oldest installation, not on my computer and many raster functions 
are not supported!!):
"POSTGIS="2.1.0SVN" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 
2012" GDAL="GDAL 1.7.3, released 2010/11/10" LIBXML="2.7.8" 
LIBJSON="UNKNOWN" (core procs from "2.1.0SVN" need upgrade) RASTER 
(raster procs from "2.1.0SVN" need upgrade)"
with pg 9.1 on ubuntu 12.04
raster2pgsql: RELEASE: 2.1.0SVN GDAL_VERSION=17 (r0)


Would be very very nice if you can help me. I cannot import raster since 
autumn 2013 - we try to do as much as possible with ArcGIS or GRASS, but 
i like postgis most. Another ask to the list one year ago did not help.

cheers        Andi




Am 25.03.2015 um 19:28 schrieb Pierre Racine:
> How do you check that your rasters only nodata value?
>
> You know, very often, raster and geometries are not displayed in the pgAdmin table result when they are too large.
>
> What's the result of
>
> SELECT postgis_full_version()
>
> on both machines?
>
> Pierre
>
>> -----Original Message-----
>> From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
>> bounces at lists.osgeo.org] On Behalf Of Andreas Laggner
>> Sent: Monday, March 23, 2015 12:15 PM
>> To: PostGis_Mailinglist
>> Subject: [postgis-users] raster2pgsql creates tables without values
>>
>> Hi list,
>>
>> all my rastermaps i import are empty, no values (NaN only).
>>
>> Import on another machine with a different installation of PostGIS for
>> this data works good.
>> I also tried to split the import, first create the sql-file and than
>> import with psql - NO ERRORS accurs, but no values.
>>
>> It must have to do with my installation of PostGIS or GDAL or something
>> else. I don't know how to find/check this.
>>
>> I have no idea - perhaps someone else out there has....
>>
>> hasta luego        Andreas
>>
>>
>>
>> --
>> Dipl. Geoökologe Andreas Laggner
>>
>> Thünen-Institut für Agrarklimaschutz (AK)
>> Arbeitsgruppe Emissionsinventare
>> Johann Heinrich von Thünen-Institut (vTI),
>> Bundesforschungsinstitut für Ländliche Räume, Wald und Fischerei
>>
>> Thünen Institute of Climate-Smart Agriculture
>> Johann Heinrich von Thünen Institute (vTI),
>> Federal Research Institute for Rural Areas, Forestry and Fisheries
>>
>> Bundesallee 50
>> D-38116 Braunschweig
>>
>> Tel.: (+49) (0)531 596 2636
>> Fax : (+49) (0)531 596 2645
>> E-mail: andreas.laggner at ti.bund.de
>> Homepage: http://www.ti.bund.de
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


-- 
Dipl. Geoökologe Andreas Laggner

Thünen-Institut für Agrarklimaschutz (AK)
Arbeitsgruppe Emissionsinventare
Johann Heinrich von Thünen-Institut (vTI),
Bundesforschungsinstitut für Ländliche Räume, Wald und Fischerei

Thünen Institute of Climate-Smart Agriculture
Johann Heinrich von Thünen Institute (vTI),
Federal Research Institute for Rural Areas, Forestry and Fisheries

Bundesallee 50
D-38116 Braunschweig

Tel.: (+49) (0)531 596 2636
Fax : (+49) (0)531 596 2645
E-mail: andreas.laggner at ti.bund.de
Homepage: http://www.ti.bund.de


More information about the postgis-users mailing list