9

I compiled and installed the current QGIS master as usual and I imported some raster data into my postgres 9.3 database with postgis 2.0.2 extension. Whenever I try to import the raster data into qgis using the database manager, I get this message:

GDAL provider: Cannot get GDAL raster band: 
Raster layer: Provider is not valid (provider: gdal, URI: PG: dbname=gis host=127.0.0.1 user=xxx password=xxx port=5432 mode=2 schema=public table=elevation

In the command line, I get

ERROR 1: Computed PostGIS Raster dimension is invalid. You've probably specified unappropriate resolution.

I have no idea where to search for the error.


I just moved to Postgis 2.1.2 and the same problem is seen there.

  • 3
    It is not a problem with the postgis version. I use postgis 2.1.3 on Debian and QGIS 2.1 and it worked perfectly but using the same database with QGIS 2.4 I get the same error message. – Ronny Aug 5 '14 at 12:09
  • 1
    I'm on QGIS 2.4 with Xubuntu 14.04, PostgreSQL 9.1 and PostGIS 2.X and I get the same issue. Need some solutions, or means tosome solutions. – Phil Donovan Sep 25 '14 at 3:27
5

I got the same error in QGIS 2.8.5 with Ubuntu and solve the problem adding constraints on my raster with the sql sentence below.

Note that the last three parameters should be passed exactly as it is written below. You don't have to change them. Just change the first three: raster table schema, raster table name, raster table field.

SELECT AddRasterConstraints('<schema>'::name, '<raster table>'::name, '<raster field, ex: rast>'::name,'srid','out_db','extent')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.