Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [raster2pgsql]

The raster2pgsql is a raster loader executable that loads GDAL supported raster formats into sql suitable for loading into a PostGIS raster table.

1
vote
1answer
57 views

Very slow loading of PostGIS raster layer in qGIS

I'm trying to use big raster dataset with PostGIS 2.5 on PostgreSQL 11 on Linux for the purpose of serving a base map organization-wide. My dataset is 2TB of TIFFs. I created 8GB test table (including ...
3
votes
1answer
44 views

Optimum raster tile size

I am wondering if there is an optimum raster tile size when using -t in raster2pgsql. I am setting -t auto and it creates thousands of tiles and takes hours to load. I am working with very large ...
0
votes
0answers
18 views

raster2pgsql as stand-alone application under Linux

I'd like to be able to install raster2pgsql detached from a full PostGIS installation under Ubuntu 18.04. If necessary from source. I couldn't find any guide on that topic. Background: I'm in the ...
2
votes
1answer
38 views

GDAL processing of GRIB2 raster prints hundreds of unsuppressable warnings

I am processing some GRIB2 raster files from NCEP (weather model stuff). An example file would be: http://nomads.ncep.noaa.gov/pub/data/nccf/com/hiresw/prod/href.20180906/ensprod/href.t00z.conus.mean....
-1
votes
1answer
91 views

raster2pgsql error: “ERROR: malformed record literal: DETAIL: Missing left parenthesis.”

This is a command I use to upload dem.tiff into PostGIS database: $ raster2pgsql -a "/path/to/dem.tiff" -F test_schema.raster2 | psql -h localhost -d pisl -U postgres However, I get the following ...
1
vote
0answers
87 views

Piping data between PostGIS 'raster2pgsql' and PostgreSQL using Python subprocess?

My goal is to create a system that will take a GeoTIFF format raster image and programmatically import it into a Postgres table using PostGIS raster2pgsql. In order to get this done with minimal ...
0
votes
0answers
91 views

raster2pgsql error required password

i'm trying to import raster to postgis using this command ; raster2pgsql -I -C -s 4326 -t 100x100 -M "C:\DATA TRIAL APOLLO\mosaik129_130.ecw" -F public.mosaik129_130 | psql -d apollo_db but then ...
1
vote
0answers
205 views

While importing *.tif in postgis db using raster2pgsql command i am facing issue “ERROR: invalid memory alloc request size 1073741824”

I just need to import a .tif file into my postgis db. the tif file i have is of 430 MB. while using this command following error is thrown: raster2pgsql -I -C -c *.ndvi.tif public.gistest1 | psql -U ...
1
vote
0answers
148 views

GUI for raster uploads to PostGIS/PostgreSQL

We can currently upload raster data with raster2pgsql to our PostgreSQL db. I am wondering if anyone is working on a GUI or plugin, maybe even through QGIS, that would make the raster upload ...
0
votes
0answers
126 views

raster2pgsql error while loading

I have done that many times and it usually works but I'm facing a problem now that I do not understand. I'm trying to load a raster (.tif) with a EPSG4326 and it is a one band file in my database from ...
3
votes
1answer
100 views

PostGIS raster query “out of range raster coordinates”

I have a large raster (national scale) that I have loaded into PostGIS using raster2pgsql and a 100x100 tile size: raster2pgsql -I -C -s 27700 my.tif -t 100x100. I am now trying to query a large ...
1
vote
1answer
281 views

raster2pgsql loads raster into a single column

I would like to load a raster (.asc) into my PostgreSQL Database. In order to demonstrate the problem I chose the raster downloaded from this homepage: https://shop.swisstopo.admin.ch/de/products/...
2
votes
1answer
247 views

Adding raster to PostgreSQL database using raster2pgsql?

I added a raster to my PG database using the raster2pgsql and when I try to load it from QGIS it says that I need to specify it's geometry. Is that a common problem, and if so, how can I solve it? ...
2
votes
0answers
147 views

postgis raster to postgres database

hi Im trying to access my raster file in QGIS by connecting postgresql database. I can see my raster in qgis but I get this error : Geçersiz Katman: GDAL provider Cannot open GDAL dataset PG: ...
0
votes
0answers
251 views

Import ASC file into PostGIS using raster2pgsql in Windows 10

I need to import a raster file (http://fizz.phys.dal.ca/~atmos/datasets/GWR_PM25_NA_199801_200012-RH35-NoNegs.asc.zip) into a PostGIS 2.3.2 (PostgreSQL 9.6). These are the steps: 1) Unzip the raster ...
7
votes
2answers
847 views

Using raster2pgsql in Python console of QGIS?

I have to upload GeoTiFF files into a PostGIS/PostgreSQL database and I am new to raster2pgsql. How do I run a raster2pgsql command in the Python console? import psycopg2 import subprocess db_name ...
3
votes
2answers
248 views

Raster alignment constraint violated raster2pgsql

I have a problem when loading multiple raster files into a Postgis database. When I run this command in the cl raster2pgsql -I -C -e -Y -F -s 4326 -t 100x100 *.tif public.newTable | psql -d db the ...
1
vote
2answers
228 views

PostGIS Out of DB raster Configuration fails to register a raster

I have been trying to get my postgis enabled postgres database to register raster data in out of db and it is not working. All I get is a distorted image shown below: If i use raster2pgsql to keep ...
2
votes
2answers
248 views

PostGIS: Having trouble getting a value from a raster

I'm working on a subsetted grib file that I retrieved using this URL: http://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25.pl?file=gfs.t12z.pgrb2.0p25.f001&lev_925_mb=on&var_RH=on&subregion=...
3
votes
1answer
105 views

Cannot store raster in custom database schema

I want to store an elevation raster in a postgis database. However a problem occurs. I use the following command: raster2pgsql -I -C -e -Y -F -s 4326 -t auto dem.tif schemaname.filename | psql -U ...
1
vote
0answers
197 views

Postgis load raster to DB running on AWS RDS with raster2pgsql

I want to perform very common task: I have Postgresql + Postgis running on Amazon Web Service cloud, using RDS service. I have there some vector layers and can execute SQL (Postgis) commands via ...
3
votes
1answer
438 views

How to speed up raster2pgsql?

I'm trying to upload a 37 GB raster dataset to PostGIS. The raster is out-of-db (-R option), so the actual pixel values are not stored in PostGIS. I'm using this command: raster2pgsql -s 25833 -C -I ...
3
votes
0answers
200 views

Clipping raster with Postgis raster

I'm using Postgis 2.1.5 on Ubuntu 15.04. In my system there is a second disk mounted with the raster data as /media/name1/data/rasters/*.tif. The *.tif are good looking when I watch the metadata with ...
1
vote
1answer
187 views

Why is raster data in range 0-255 in PostGIS?

I'm having trouble interpreting some data I've loaded into a PostGIS database. I scraped rasters from here and converted to sql files using raster2pgsql. I'm now using PostGIS's special functions to ...
1
vote
1answer
146 views

raster2pgsql size problem

I am about to import a raster (.tif with 50mb, size 3301x21676, pixel size 10x10) into postgres with raster2pgsql. With small extracts of the image it works but ... raster2pgsql [myfilename].tif -F ...
1
vote
0answers
104 views

raster2pgsql stops at line 53 at RETURN

I am importing some very large rasters (in the tif format) into Postgres SQL (9.3) using raster2pgsql on the command line. Most of the rasters imported fine, some had to be converted to the img format ...
5
votes
1answer
742 views

Postgres, loading raster into db and visualize with qgis

I'm trying to import a TIF raster into a Postgres db using this command: Raster2pgsql -s 26591 -I -C -e -Y -F –N -M C:\Users\Ivn\Desktop\Postgre_HOME\scratchmres1.tif -F | psql -U postgres -d ivndb -...
0
votes
1answer
751 views

Using raster2pgsql to upload raster to PostGIS?

I am trying to upload a large number of 3 band rasters to a PostGIS database using raster2pgsql on the command line in Windows 7. Here is my command: raster2pgsql -I -C -s 27700 -F -t 100x100 -M F:\...
1
vote
2answers
545 views

Rasters loaded in Postgres/PostGIS using raster2pgsql contain blank lines

I recently set up an Ubuntu Server as a Postgres/PostGIS database server. In an effort to serve a collection of aerial photos to my colleagues, I loaded 608 GeoTiffs (non-overlapping 1km tiles each ~...
8
votes
1answer
2k views

Calculating mean value of polygon from raster in PostGIS?

I started with a NetCDF .gri and .grd raster file of the UK provided by a colleague. I clipped it in R to be only London, exported and converted to a ASC file, and then imported it to PostGIS using ...
2
votes
0answers
416 views

raster2pgsql error

I am attempting load ~500 rasters in a PostGIS table. They are .Hdr/.dat files. I am using raster2pgsql. I am able to load the first 260 rasters, but the remaining rasters fail with the following ...
2
votes
1answer
256 views

PostGIS raster2pgsql problem

I ran into this problem in PostGIS: raster2pgsql -c -I -C -s 4326 -N -9999 -M -Y -F ./test2/*.tif rdem2 > rdem2.sql Processing 84/84: ./test2/dem2_4326_06_14.tif ERROR: diff_rastinfo: ...
2
votes
1answer
596 views

How to get pixel values/cell values for stored raster files in postgis?

Raster files in tiff format are storing into database.However I gets only an attribute table. Is there any way to retrieve pixel values/cell values in the table. I have used raster2pgsql command for ...
2
votes
0answers
757 views

numeric issue while loading floating point-valued GeoTIFF into PostGIS

I am trying to import a floating point GeoTIFF image into PostGIS (2.1), using the following command: raster2pgsql -s 4326 -I -M -F -C tif_dir/*.tif public.map | psql -U postgres -h localhost -d ...
0
votes
0answers
542 views

Find correct SRID

I'm learning PostGIS raster, and importing GeoTiff with raster2pgsql. This command line tool states: -s <srid> Set the raster's SRID. Defaults to 0. If SRID not provided or is 0, raster'...
1
vote
1answer
810 views

raster2pgsql does nothing

I try to load rasters through raster2pgsql. I try to call it through pgAdmin command line, but when I call any raster2pgsql command (even raster2pgsql -G), it does nothing, I just get another line to ...
2
votes
2answers
2k views

Loading image tiff to PostgreSQL without use raster2pgsql? [closed]

I can load raster data by using raster2pgsql but i don't want to use the command line. I want to build a desktop application. I want to use C# or Java or matlab to load raster data without using ...
0
votes
3answers
2k views

Import DEM into PostGIS for QGIS

I'm a complete GIS newbie so sorry if I'm using the wrong terminology in searching for a solution to this... I'm trying to import a DEM into PostGIS and display it in QGIS. The data is from the EU-DEM ...
9
votes
1answer
2k views

How to fix “Raster layer: Provider is not valid” error when loading PostGIS rasters?

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 ...
1
vote
1answer
516 views

PostGIS 2.1.1 compilation issue

I tried to compile postgis-2.1.1 in RedHat 6.3 with: # ./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-gdalconfig=/usr/local/bin/gdal-config --with-geosconfig=/usr/local/bin/geos-...
2
votes
1answer
1k views

Cannot upload an IMG file into PostGIS using raster2pgsql

I cannot upload into PostGIS a raster with the following code: raster2pgsql -s 4326 -I -C -M "C:\lyr\gebco.img" -F public.gebco ¦ psql -d test -U postgres -W It says ERROR: Unable to read raster ...
2
votes
1answer
324 views

How to change table name of command raster2pgsql

I am completely newbie with GIS and PostGIS as well I'm trying to load raster into postgreSQL with raster2pgsql. It runs well. However, the table name of the raster is generated automatically. For ...
1
vote
0answers
5k views

“Schema does not exist” error trying to load raster using raster2pgsql

I receive a "schema does not exist" error when trying to load a raster to a PostGIS database (see full error at the bottom). The schema does exist in the database. This is the syntax I'm using: ...
2
votes
1answer
320 views

Can't view PostGIS rasters after changing schemas

I have loaded a few rasters into the Public schema of a PostGIS 2.0 database. Using the db manager in QGIS 1.8.0 I can add the rasters to the map canvas. After moving the rasters to another schema in ...
6
votes
3answers
9k views

Loading raster data to postgis

I'm a newbie in GIS technology and need some help in loading a rainfall radar raster data into PostGIS. The raster image is shown here: What I need is to store in the database the radar reflectivity ...
10
votes
1answer
6k views

How to import GeoTIFF via postGIS into GeoServer?

As a simple test case, I'm trying to configure the software stack of OpenGeo such that I can display a GeoTIFF as an overlay to a normal map like OSM. So I perform the following steps: Create a ...
1
vote
1answer
353 views

Which is better for tiling: raster2pgsql or GeoWebCache?

We have some raster image data stored as GeoTIFF which we would like to make available online as an overlay using the OpenGeo framework. As the data covers only a spatially restricted area and we don'...
1
vote
1answer
2k views

raster2pgsql missing in Opengeo-suite installation

I installed opengeo-suite 3.0.2 on Ubuntu 12.04 and although the stack seems to be working fine, raster2pgsql is no where to be seen! root@mywebsite:/usr/local/lib/postgresql/9.2# locate raster2pgsql ...
1
vote
0answers
127 views

blank preview image for ImageMosaicJDBC (postgis raster) layer [duplicate]

In geoserver, while publishing ImageMosaicJDBC layer seems no problem, the preview of this layer does not give me an meaningful overview image, only a blank image with the correct lat lon extend. Also ...