[GRASS-user] PostgreSQL raster and vector import

patrick s. patrick_gis at gmx.net
Thu Feb 4 01:44:41 PST 2016

Dear list

In addition to my mail yesterday (see below):

The use of PostGIS might be related to the conversation from octobre 
last year 
but it remains unclear to me how to import raster and is not referred to 
in the manual.

My current state seems close to the solution:
r.in.gdal in="PG:dbname=psql_local schema=myschema table=reference_map" 
out=region_ref -o --o #load into grass
r.external source="PG:dbname=psql_local schema=myschema 
table=reference_map" out=region_ref --o -o  #link to grass

But both lead to "ERROR: North must be larger than South"

However, I can view the data in QGIS (loading though db-manager) and it 
appears to be ok.

Is Error it a problem of gdal, my data or the grass-modules? And how can 
I solve it?

Thanks for any help

On 03.02.2016 15:48, patrick s. wrote:
> Dear list
> I need some help on importing PostGIS raster with r.in.gdal and schema 
> support under v.in.ogr.
> "r.in.gdal -f" shows support: "PostGISRaster (rw): PostGIS Raster driver"
> But I did not find any example on how to formulate the dsn/input.
> Unfortunately there is no hint in the manual of grass70 on how to work 
> with schemas (there was one in 64).
> I had a script in grass64 of following syntax, which is still working:
> ISCHEMA=baselayer
> v.in.ogr dsn="PG:dbname=psql_local active_schema=my_dataschema" 
> layer=gws_buildings --overwrite
> However, I would like to form this more general as a variable for all 
> incoming data, which is not working:
> INPATH="PG:dbname=psql_local active_schema=my_dataschema"
> v.in.ogr in=$INPATH out=bldg_pt layer=gws_buildings --overwrite
> =>ERROR: v.in.ogr: Sorry, <active_schema> is not a valid parameter
> Also the approach described in the manual of grass64 does not work any 
> longer
> db.connect driver=pg database=psql_local schema=my_dataschema
> v.in.ogr in=./ out=bldg_pt layer=gws_buildings --overwrite
> =>ERROR: Unable to open data source <./>
> Thanks for any help,
> Patrick 

More information about the grass-user mailing list