Questions tagged [postgis-raster]

PostGIS Raster is a PostGIS data type for storing and analyzing raster data.

Filter by
Sorted by
Tagged with
1 vote
0 answers
27 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 ...
user avatar
0 votes
0 answers
23 views

PostGIS function ST_MakeEmptyRaster does not exist

First time using InterpolateRaster and it tells me Select ST_InterpolateRaster((ST_DumpPoints(st_collect(geog::geometry))).geom,'invdist:smoothing:2.0',ST_AddBand(ST_MakeEmptyRaster(200, 400, 10, 10, ...
user avatar
2 votes
0 answers
48 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(). ...
user avatar
2 votes
1 answer
68 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 +...
user avatar
1 vote
0 answers
41 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 ...
user avatar
1 vote
0 answers
43 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 ...
user avatar
  • 405
0 votes
0 answers
44 views

PostGIS raster transformation from 4326 to 3857

Ok after two tries now I am absolutely confused. I have a raster in 4326 and I want to transform it to 3857. A simple replication I think is valid. select ST_Transform(ST_MakeEmptyRaster( 100, 100, 0....
user avatar
2 votes
0 answers
29 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 &...
user avatar
  • 21
1 vote
1 answer
64 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 ...
user avatar
  • 2,650
0 votes
0 answers
49 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#...
user avatar
  • 779
0 votes
0 answers
10 views

PostGIS Raster in QGIS

I have a PostGIS raster table that has multiple raster records in it but only record 0 will display. Is there a way to get all rows to display?
user avatar
  • 1
3 votes
1 answer
72 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 ...
user avatar
0 votes
0 answers
36 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 ...
user avatar
2 votes
1 answer
48 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 ...
user avatar
  • 687
0 votes
0 answers
73 views

Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file mosaicpgraster.pgraster.xml in GeoServer

While creating new database in ImageMosaicJDBC store, I am getting the error below while connecting the mosaicpgraster.pgraster.xml file in URL as file://C:\Program Files\Apache Software Foundation\...
user avatar
1 vote
0 answers
56 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 ...
user avatar
2 votes
0 answers
76 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 ...
user avatar
2 votes
0 answers
121 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 ...
user avatar
  • 10.3k
2 votes
0 answers
46 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, ...
user avatar
  • 10.3k
0 votes
0 answers
58 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['...
user avatar
0 votes
1 answer
85 views

Extracting a subset of pixels from a large raster in PostGIS/ST_Clip result missing values

PostgreSQL: 12.4 (running on Amazon Aurora) PostGIS: 3.0.2 I'm attempting to clip a much larger raster (global meteorological data on a 0.25 degree resolution grid, split into 64x64 tiles, with 9 ...
user avatar
2 votes
2 answers
107 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 ...
user avatar
  • 171
0 votes
0 answers
191 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 ...
user avatar
1 vote
0 answers
14 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. ...
user avatar
1 vote
1 answer
1k 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 ...
user avatar
0 votes
1 answer
102 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 ...
user avatar
0 votes
1 answer
69 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 ...
user avatar
5 votes
1 answer
393 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, ...
user avatar
  • 93
1 vote
0 answers
30 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 '....
user avatar
2 votes
1 answer
82 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 ...
user avatar
1 vote
0 answers
97 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:...
user avatar
0 votes
1 answer
146 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/...
user avatar
1 vote
1 answer
42 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 ...
user avatar
  • 173
1 vote
1 answer
789 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 ...
user avatar
  • 11
2 votes
1 answer
181 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 ...
user avatar
  • 1,099
2 votes
0 answers
83 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'...
user avatar
1 vote
0 answers
67 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 ...
user avatar
  • 239
1 vote
1 answer
105 views

Loading raster in PostGIS

I am trying to load raster in PostGIS from my Windows cmd using: C:\Program Files\PostgreSQL\9.6\bin>raster2pgsql.exe -s 4326 -I -C -M "D:\9.Taji\data\1_Admin Boundary-20200211T030329Z-001\check\...
user avatar
0 votes
1 answer
111 views

Zonal stats for raster in PostGIS

I am trying to do zonal stat in PostGIS with the following command. SELECT (ST_SummaryStats(ST_Clip(agri_final_proj.rast, district.geom, TRUE))).*, district.district_1 AS district_1, ...
user avatar
1 vote
1 answer
402 views

Load all SRTM data into PostGIS

I am trying to load all the SRTM data into a PostGIS database. I tried the process described here: https://postgis.net/docs/using_raster_dataman.html It created a giant SQL file. When I tried ...
user avatar
  • 197
2 votes
1 answer
200 views

Connecting MapServer to a raster table in PostGIS

I am new in MapServer and I want to visualize some raster tables in MapServer. My mapfile is: MAP CONFIG "MS_ERRORFILE" "error.log" DEBUG 5 NAME "milad" STATUS on SIZE 600 600 EXTENT -8321547 ...
user avatar
  • 525
1 vote
1 answer
391 views

Insert QGIS processed raster image (e.g. GeoTIFF) to PostgreSQL/PostGIS database by pyqgis

I've already connected to my database by a script, and loaded a vector a layer to QGIS. Is there a way to upload a raster layer back to the database? tablename = "***" geometrycol = "***" from qgis....
user avatar
  • 1,509
4 votes
1 answer
2k views

How install postgis_raster extention on PostgreSQL 11.5?

I want install postgis_raster extension on PostreSQL 11.5 + PostGIS 2.5.3 + MacOS 10.14.6 There is a install script on https://postgis.net/install/. All installations of extensions work fine, except ...
user avatar
  • 661
3 votes
1 answer
245 views

PostGIS raster calculate average slope of 3x3 neighborhood around a geometry point

I have two tables corners_final (vector point data) dem_slope (1ft slope DEM, calculated in degrees) With this simple query I am able to extract the slope value that intersects a given point SELECT ...
user avatar
  • 4,075
1 vote
0 answers
87 views

raster2pgsql fail with JPEG encoded image

The problem I have one JPEG encoded raster that works in GDAL and QGIS. The original file 05-D Braga.jpg is available online. The CRS is EPSG:20790. To upload it to Postgis, I use: raster2pgsql -s ...
user avatar
  • 4,545
2 votes
0 answers
254 views

PostGIS Rasters not aligned even after calling ST_Resample() or ST_SnapToGrid()

I am trying to compute certain statistics from an elevation (DEM) raster column but at certain points the raster tiles are not aligned, and continue to not be aligned even though ST_SnapToGrid() or ...
user avatar
  • 41
0 votes
0 answers
43 views

Permissions are blank when trying to load satellite images from Planet API

I am trying to download the map of Melbourne using Planet API. I have given AOI coordinates of Melbourne. When I run the code the permissions are returning blank ("_permissions": []). I cannot able to ...
user avatar
  • 21
1 vote
1 answer
599 views

Importing raster data automatically to GeoServer

I'mtrying to make an automatic raster data import to GeoServer for later use in an OpenLayers web application in which i need to add raster files frequently, so I added Image Mosaic JDBC Plugin and ...
user avatar
3 votes
1 answer
426 views

Creating a raster with point count as cell value?

I have a PostGIS table with Point geometries in it. I want to create a raster object where each cell value is the number of points within a given raster cell. Cells with zero points in it can be 0, ...
user avatar
  • 2,271
1 vote
0 answers
110 views

Storing raster imagery in PostgreSQL [duplicate]

I have a number of raster files saved locally which I use for basemapping in QGIS. I have built virtual raster fields to load these in one go but I'm looking to store them within my PostgreSQL ...
user avatar