Questions tagged [postgis-raster]
PostGIS Raster is a PostGIS data type for storing and analyzing raster data.
140
questions
1
vote
0
answers
36
views
GDAL bin error regarding PROJ issue
GDAL bin error regarding PROJ issue!!
I have been trying to setup an elevation API in Ubuntu 20.04 server. For this elevation API, the first process is downloading a TIFF file, and then we convert the ...
0
votes
0
answers
18
views
How to resolve ImageMosaic JDBC plugin not functioning in GeoServer 2.24.1 [closed]
I'm experiencing challenges with publishing raster TIFF images stored in PostgreSQL using GeoServer 2.24.1 on Rocky Linux 9.3. After successfully importing the raster TIFF into PostgreSQL 15.6, I'm ...
1
vote
1
answer
72
views
Upgrading PostGIS 3.0 to PostGIS 3.3 on RHEL 8 fails
I am not a DBA.
I am trying to update our PostGIS 3.0 package installation on a PostgreSQL 12 database to PostGIS 3.3 package on a RHEL 8 server. I am unable to install both packages at the same time ...
2
votes
0
answers
58
views
How to make ST_SetZ respect NODATA?
ST_SetZ looked like a very useful new function to replace this sort of thing, especially when point is a complex expression:
ST_SetSRID(ST_PointZ(ST_X(point), ST_Y(point), ST_Value(rast, point)), ...
0
votes
1
answer
52
views
I would like to import PostGIS' Raster Layer into QGIS using SQL. Is there a way?
I imported PostGIS Raster Layer using PyQGIS. Can I apply SQL to it?
uri = QgsDataSourceUri()
uri.setConnection("localhost", "5432", "dbname", "user", "...
1
vote
1
answer
50
views
ST_ValueCount for multiple bands
Given a multi band raster, I would like to summarise the distinct combinations of values found, in a manner similar to ST_ValueCount, but across all the bands rather than a single band at a time.
...
1
vote
1
answer
52
views
PostGIS: postgis_raster out-db storage errors
PostGIS raster out-db storage doesn't work on my Windows 10 PostGIS installation. No issue with in-db rasters.
SELECT postgis_full_version();
POSTGIS="3.3.1 3.3.1" [EXTENSION] PGSQL="...
0
votes
0
answers
22
views
Making slices through postgis raster tables
I have an existing python script that i am trying to "translate" into postgres sql.
The reason for this is that the server im using for this is not running python.
The objective is to slice ...
0
votes
2
answers
77
views
How to test if a PostGIS table is a raster table or vector table?
Given a postgres table, is there a reliable way to test if it is a raster table?
I am planning on importing many rasters into PostGIS and then using pgraster and geometry interoperability. As a first ...
0
votes
1
answer
114
views
How to get the extent of a PostGIS raster table?
For vector data, it is possible to get the extent of an entire table using either ST_Extent or ST_EstimatedExtent.
How does one get the total extent of all rasters in a raster table?
0
votes
0
answers
68
views
Export each raster in a PostGIS raster table as a separate image using gdal_translate
I read from this SO question that one can export an entire PostGIS raster table into one image, as follows:
gdal_translate PG:"host=localhost port=5432 dbname=landslide user=postgres password=...
1
vote
0
answers
58
views
Why are overviews of an out-db postgis raster not out-db?
I'm working on out-db postgis raster and have generated overviews, but why are the overviews generated of an out-db rasters stored in-db?
I have tried creating overviews both manually using ...
0
votes
0
answers
66
views
Transform raster of unknown SRID using proj4 in PostGIS
In PostGIS is there any way to transform raster of unknown SRID using proj4 to EPSG:3857 without dumping polygons?
4
votes
2
answers
249
views
Convert datum of elevation data in PostGIS
Is there any specific feature to convert raster values (representing elevation) between basis systems, or do I just have to make do with manually adding the mean offset having looked it up from ...
0
votes
0
answers
56
views
ST_PixelAsPolygons returning incorrect results
I stored sentinel 2 images as a tiled raster in my DB. The tile size is 244x244. So I want to extract data from those rasters. Currently I am trying to export the data by giving a point and number of ...
0
votes
1
answer
75
views
ST_Transform in PostGIS not working on Linux, GDAL 3.5.1, but working on MacOS, GDAL 3.5.3
I have a raster in PostGIS that has a non-standard projection, namely
select srid,proj4text from spatial_ref_sys where srid=9822;
srid | proj4text ...
2
votes
1
answer
153
views
ST_SummaryStats gives unknown values (infinity and different values) when clipping raster with buffer
I am loading a raster to postgis (see postgis version and command below)
raster2pgsql /path_to_raster/temp-221025_12.tif -d icon_test -F -n name | PGPASSWORD=<PASS> psql -d <myDB> -h <...
1
vote
0
answers
143
views
How can I get the raster cell values for a set of rasters in PostGIS, for each cell that intersects an arbitrary, user-provided polygon?
In PostGIS, I have a set of (large, U.S.-wide) rasters at high (30m) resolution. For my application, I need to take an arbitrary area of interest provided by the user, likely ranging in size from ...
1
vote
0
answers
43
views
Coverage concept and PostGIS [closed]
I'm trying to understand the implementation of the interplay of raster and vector data in PostGIS. In this article Coverage Concepts and PostGIS on the PostGIS wiki page the concept of vector and ...
2
votes
0
answers
97
views
ST_Rotate in geometry Vs ST_SetRotation in raster
I have one polygon geometry (Square to be precise). I tried to rotate that geometry via ST_Rotate(). Then I stored that same geometry in a raster and tried to rotate the raster with ST_SetRotation().
...
2
votes
1
answer
375
views
Proj pipeline support in PostGIS
I would like to use proj pipeline in PostGIS ST_Transform function.
My sample SRS is as follows:
+proj=pipeline +step +inv +proj=unitconvert +xy_in=m +xy_out=us-ft +z_in=m +z_out=us-ft +step +inv +...
1
vote
0
answers
95
views
Horizontal coordinate adjustment using EPSG 9621 operation method in PostGIS
We have some Cartesian coordinates which needs to be applied with similarity transformation. The transformation operation method describing how to do the same is explained in EPSG 9621 method.
How to ...
1
vote
0
answers
163
views
Addition of two rasters in PostGIS
I have two rasters (prast and frast) in PostGIS each with 1 band and with the similar extent and pixel characteristics (They were originally different bands of the same raster before I did some ...
3
votes
1
answer
395
views
PostGIS breaks after upgrade
I was running PostgreSQL 12 with PostGIS 3.1.1 extension. More than a week ago, I accidentally performed a PostGIS upgrade by running this query
SELECT PostGIS_Extensions_Upgrade(); which returned &...
1
vote
1
answer
660
views
How to install raster2pgsql on centos7
I am running a postgis database on a server at work. The os is centos7, I can do more or less anything on the server, except for installing another os.
I want to upload some raster files to my ...
0
votes
0
answers
269
views
Raster not loading to PostgreSQL database
I am trying to load rasters to my PostgreSQL database with PostGIS enabled.
I am following the tutorial from here for using raster2pgsql: https://postgis.net/docs/using_raster_dataman.html#...
3
votes
1
answer
197
views
How to store historical value of a raster pixel in postgis raster datatype?
I have a postgres table to store rasters having elevation value in each pixels. the raster size on average is around 100x100 with scale of 1. The elevation value is historic and I store timestamp in ...
0
votes
0
answers
333
views
raster2pgsql with GDAL Virtual File System /vsis3/
I cannot succeed to upload an out db cloud raster from AWS to a PostGIS db using raster2pgsql.
I'm working on Windows 10, using PowerShell. I've set the appropriate environment variables and I can ...
2
votes
1
answer
238
views
GiST indexing on constantly updating PostGIS Raster table best practice
I have a single PostGIS raster (3.x) table that holds multiple dates tiled up. I am constantly adding to this table via raster2pgsql. I want to keep the GiST index updated so I attach the -I flag but ...
1
vote
1
answer
168
views
Error in URL connection of PostGIS Raster community module plugin in GeoServer
I have a raster named MODIS_All_India_NDVI_2001_01_01.tif in the database named agro_dss in
PostGIS, in the public.modis_all_india_ndvi_2001_01_01 table.
The import was done using:
raster2pgsql -s ...
2
votes
0
answers
116
views
Clip PostGIS raster to region that crosses 180 meridian
I am using postgis 2.5's raster to store global geographical data (weather forecast) in EPSG:4326 projection, using 0.25° resolution. I use tiling. I created queries to clip the global data to given ...
2
votes
0
answers
421
views
Should TOAST compression be disabled for PostGIS?
From this post about Binary data performance in PostgreSQL, I read that storing (large) binary data can be very slow in PostgreSQL (compared to storing the same data in file systems). This seems to ...
2
votes
0
answers
215
views
Converting a PostGIS grid back to raster
This is a follow-up question (or inverse) of the question
Converting a PostGIS raster back to vector.
I am trying to create a workflow that converts a PostGIS raster into a regular grid of polygons, ...
1
vote
0
answers
139
views
Schema error while uploading raster in PostgreSQL
Tried many ways
A.
import os
import subprocess
from subprocess import PIPE, run
db_name = 'agro_dss'
db_host = 'localhost'
db_port = '5432'
db_user = 'postgres'
db_password = 'imd123#'
os.environ['...
2
votes
2
answers
579
views
How to efficiently fetch multiple ST_Value from PostGIS raster(s)
I have a raster table with index created by raster2pgsql
CREATE TABLE tbl (rid serial PRIMARY KEY, rast raster);
CREATE INDEX ON tbl USING gist (st_convexhull(rast));
I can see the best way to fetch ...
0
votes
0
answers
512
views
raster2pgsql command line issue (Windows 10) - ERROR: syntax error at or near "raster2pgsql"
I'm using the OsGeo4W64 shell that comes with QGIS (I'm using Windows 10) and have managed to log into my postgres database. However I'm looking to import a raster into a new table, and all roads seem ...
1
vote
0
answers
50
views
Is a PostGIS raster column more efficient than a geometry column in this scenario?
We have several different PostGIS tables that have a timestamp column and a geometry column. The geometry column contains polygons that are queried by a GeoServer instance to be served for display.
...
1
vote
1
answer
2k
views
How to write docker-compose.yml after enabling postgis_raster for PostGIS Docker Image
I'm using the docker image of https://github.com/postgis/docker-postgis and it works fine with the commands below which is also defined in README file.
docker run --name some-postgis -e ...
0
votes
1
answer
177
views
Creating raster with cell value counts from another raster in buffer around each cell using PostGIS
Main objective
My main objective is to compute 1) the proportion of a given type of land cover around every raster cell in a radius of 500 m at the scale of an island (e.g.: there is 40 % of ...
0
votes
1
answer
162
views
Multiplying rasters by rasters within PostGIS
I have a situation where I have to multiply sets of rasters by each other.
Currently I have subfolders of rasters on my machine and am looping through them and multiplying them with rasterio.
Is there ...
5
votes
1
answer
892
views
Slow retrieve PostGIS raster value through ST_Value
I have a PostGIS DB containing a set of daily raster data from 1981 up to 2021. The inserted raster tile size is 83x90.
Problem: I wanna query the data through ST_Value for a specified Lat Lon, ...
1
vote
0
answers
56
views
Can't upload raster file on PostGIS
I've been trying to upload my satellite imagery which is 1.5 GB to my PostgreSQL database, using the code below, the error for each command is stated below;
raster2pgsql -s 4326 -t auto -F -I -C -Y '....
2
votes
1
answer
142
views
Get majority value of raster data inside polygon using PostGIS
We have imported a tiff with landcover data into PostGIS as a raster table.
We also have a polygon table with provinces.
I'm trying to get the majority of the landcover in each province.
But can't get ...
1
vote
0
answers
233
views
GeoServer pgraster - Unable to convert coverage URL to a URI, attempting to use it as a path [closed]
I'm trying to configure an ImageMosaicJDBC using pgraster but I get the error in the screenshot.
As I'm really new on GeoServer, I guess I did something wrong.
From the log I can see this:
Aug 20 08:...
0
votes
1
answer
229
views
raster2pgsql - invalid pointer
I get the following error each time I run the raster2pgsql:
[postgres@li1959-236 ~]$ raster2pgsql -I -C -s 4326 -M -F /home/temp/wrf_d02_202005010000.tif grib_test | psql -d cep
Processing 1/1: /home/...
1
vote
1
answer
47
views
Showing number of added satellite images in PostGIS
I want to check how many bands of a satellite image have been added to a PostGIS raster table.
I know that you can get information by \d raster_columns (as told at PostGIS raster maximum number of ...
1
vote
1
answer
2k
views
Problems enabling the postgis_raster extension, postgis_raster.control seems to be missing
I am a student and to learn more about PostGIS. I installed it to my Raspberry Pi, so that I can remotely access it via my laptop. The installation worked with the exception of the raster module.
When ...
2
votes
1
answer
391
views
Clip raster with postgis outputting result in clipping geometry extent
I want postgis st_clip to output clipped result in extent of initial clipping geometry.
Currently, it's crop option can be set to output either in initial raster extent or in extent of intersection ...
2
votes
0
answers
186
views
Optimization of multi-band raster clip by polygon
I have tiled (50x50), 365 band, rasters in my postgis database. Each band represents a day in a year.
I want to return the raster pixels which intersect with an input geometry, including all bands. I'...
1
vote
0
answers
101
views
Uploading m/analysing raster vector data in PostGIS
I am trying to build a web-GIS platform where user can upload their data (raster & vector) and do some kind of analysis, like calculate zonal statistics. I read lots of articles and blogs about ...