Questions tagged [postgis-raster]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
315 views

PostGIS ST_AsPNG faster than ST_PixelAsCentroids

I'm hoping to export a PostGIS raster into a non-GIS enabled database. Ideally, I'd like to be able to have three columns in the output: latitude, longitude, raster_value. Easy enough. Ideally, I'd ...
0
votes
1answer
161 views

postgis SRTM3 different raster scale in same column

SRTM3 elevation data are stored in HGT files each containing 1201x1201 values. I want to store this information in a PostGIS raster column with a single band. To optimize my queries, I wanted to ...
6
votes
0answers
764 views

PostGIS: Storing large gridded time series

I'm trying to store a large raster timeseries on PostGIS-2.2 / PostgreSQL 9.5. The data comes as a collection of HDF-EOS (basically HDF4) files. Each file contains 24 bands, representing hourly ...
1
vote
1answer
303 views

PostGIS: ST_Clip problem with area which oversteps the raster

Hello all the PostGIS wizards! I want to programmatically clip raster with bounding box which is overstepping the border of raster. Ok, i can do it with ST_Clip, but the problem is that ST_Clip only ...
1
vote
1answer
473 views

How to query with stored PostGIS time series raster data

I have time series raster data in PostGIS and I can't find a way to get the info as a time series from an XY point. For example: I would like to get the vale of the XY point in raster for the 13/08/...
1
vote
1answer
855 views

ST_AsRaster for polygon

Having a hard time to get a raster from a polygon ST_AsRaster(ST_Buffer(ST_GeomFromText('POLYGON((-30 40, -20 30, -25 20, -23 10, -30 40))', 4326), 50),ARRAY['8BUI'],ARRAY[118]); This line is giving ...
4
votes
0answers
284 views

Counting nodata and data pixels using PostGIS

I'm using PostgreSQL 9.2.4 and PostGIS 2.0.3. I have some raster layer and I'm trying to get the count of all pixels (including nodata), cliped by polygon. Raster was imported by raster2sql: ...
1
vote
0answers
54 views

Interative raster with PostGIS [closed]

I'm searching some solution to show raster layers from PostGIS on a Web Page. I need a solution to build a interactive map showing the values of my raster data when the user to click on pixel of the ...
2
votes
0answers
315 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 ...
4
votes
1answer
562 views

unable to render/view a postgis raster in qgis 2.14.1

I have successfully added a raster to postgis using the following: raster2pgsql -s 4326 -I -C -M 00N_030E.tif -F -t 250x250 -a test.00N_030E | psql -U postgres -d raster -h localhost -p 5432 I tried ...
2
votes
0answers
68 views

ST_ColorMap wrongly loses 0.0 value when INTERPOLATE

I want apply a colormap to a monoband grey scale tiff from postgis calling ST_ColorMap. My query is something like "SELECT oid, lowrite(lo_open(oid, 131072), tiff) As num_bytes " + "FROM ( ...
2
votes
1answer
712 views

Issues with raster data on postgresql / error:Attempting to get pixel value with out of range raster coordinates

So here is the issue, i am trying to extract values from a big raster divided in 200 or so tiles and applying them to a selection. The points are startpoints, endpoints and midpoints from vector items,...
1
vote
1answer
730 views

Is there a tool to shrink/grow raster data edge by n pixels

Looking for an open source tool to grow/shrink raster edge by n pixels. I noticed Grass has r.grow but hoping there might be a way to do it with GDAL, PostGIS or python library. More information: I ...
3
votes
1answer
530 views

PostGIS raster - sum of rasters

I have raster data stored in a PostgreSQL/PostGIS database. I need to create a summed raster from certain rasters. Something like: select sum(raw_data) as image from data where rid > 2 AND rid &...
3
votes
0answers
2k views

How to IDW interpolation in PostGIS

I'm trying to find PostGIS Raster functions supports the Inverse Distance Weighted interpolation method (IDW) and Kriging interpolation method. I'm especially trying to generate a temperature map ...
2
votes
1answer
416 views

Storing and updating large amount of raster data

Large amount of data = ~10TB of rasters (multiple projections) with the possibility of this data growing. The basic architecture I'm planning at the moment is having 2 clusters of GeoServer--one ...
2
votes
1answer
2k views

Connecting PostGIS raster data to GeoServer

The data I have used is DEM. It creates a table and has 2 columns in PostGIS. Is it necessary to create a new table again and follow the configuration process as mentioned in the Image Mosaic JDBC ...
1
vote
1answer
203 views

What does skew X/Y do in PostGIS?

I am just wondering what the exact function of skewX and skewY in raster constructors is. According to the documentation linked: ST_MakeEmptyRaster — Returns an empty raster (having no bands) of ...
0
votes
0answers
169 views

Different pixel values for a raster between QGIS and PostGIS

I have inserted a Landsat raster into PostGIS using the command : raster2pgsql -I -C -s 28356 -M -t 100x100 /data/LS7_20150425_B40.tif public.red | psql -d postgres -U postgres Using QGIS, I have ...
2
votes
1answer
465 views

PostGIS Raster performances

I ingested two Landsat images into PostGIS database using : raster2pgsql -I -C -s 28356 -M -t 100x100 LS7_20150425_B40.tif public.red | psql -d postgres -U postgres raster2pgsql -I -C -s 28356 -M -t ...
1
vote
1answer
454 views

Using raster2pgsql to display data in QGIS

I am quite new to this process (using raster data in PostGIS) and tried to find some tips/solutions on other threads but I didn't manage to get things working. I ingested some Landsat data into my ...
2
votes
1answer
244 views

Display simple raster file in openlayers

I have raster files (one sample can download from here) just have values for points and in beside i have top-left and bottom-right geo data and pixel size of file. so i want to just simply display ...
2
votes
0answers
141 views

Add bands or new raster column in Postgis?

Would it be faster to work with a new band or a new raster column for a raster dataset in Postgres with new pixel values, assuming that the size, extent and everything else relevant remains constant? ...
2
votes
0answers
366 views

How to perform spatial interpolation using PostGIS? [closed]

I need to interpolate some point data and would like to use the ST_InvDistWeight4ma function. As I am new to raster PostGIS, I would like to get some help about this.
6
votes
1answer
2k views

Converting a PostGIS raster back to vector

Is it possible to convert a PostGIS raster back to a line? I'd like to generalize some vector data by converting it to raster and altering the cellsize to fix 'gaps' in the vector connectivity. Once ...
1
vote
0answers
797 views

How raster files are stored in databases? [closed]

When storing raster files in PostgreSQL only one row is created in the database, but the raster is a matrix so typically it must create rows and columns. I want to understand how raster files are ...
3
votes
2answers
341 views

How to classify a raster using QGIS Plugin interacting with PostGIS?

I'm developing a QGIS plugin where users can enter some parameters (like distance, depth, area...) and by submiting the plugin interact with a PostGIS database and extract informations form vector and ...
2
votes
1answer
599 views

St_Difference between raster and vector using PostGIS

I want to calculate the difference between a raster and vector layer, I used this querie but it's so slow and I don't know if it's right or not. I'm not using st_difference because it only support ...
26
votes
3answers
8k views

Poor performance with storing large rasters in PostGIS and visualising in QGIS

my question concerns the use and performance of several software tools in conjunction, namely PostgreSQL, PostGIS, QGIS, and GDAL. I'm a long-time ArcGIS, Python, and R user who is interested in ...
1
vote
1answer
412 views

How to perform slope using PostGIS?

I want to perform Slope using PostGIS. I used this query but I got a strange result unit: create table my_slope as SELECT ST_Slope(rast,1,'32BF','PERCENT',1, false) as slope FROM my_raster I wonder ...
4
votes
1answer
731 views

Selecting all pixels above a given value in a raster in PostGIS

I have a raster with one band whose value represents the date of the occurrence (a sequential integer). This raster file gets updated regularly, and each time that happens, I need to run a process ...
2
votes
2answers
334 views

Is it possible to georeference raster stored in Postgis?

I'm looking to store a huge raster aerial image (400 Gb) into Postgis, but before storing it i like to know how i could georeference or rectify raster stored in postgis ? is there any Qgis plugins ...
3
votes
1answer
2k views

How to view a postgis raster query in QGIS

I have successfully loaded a large number of .asc images (>2800 200x200 tiles) into a Postgres table with PostGIS 2.1 support. The new table appears in QGIS's DB Manager and I can add the whole image ...
2
votes
0answers
434 views

I am getting error in PostGIS 'function st_clip(raster, integer, geometry) does not exist'? [closed]

I have to find the count of the number of pixels in a given band of a clipped raster. For clipping, I am using ST_clip(). Through clip function raster is clipped with a polygon. I am getting ...
2
votes
1answer
746 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 ...
3
votes
1answer
685 views

Create a raster with fixed 10meter pixel scale in PostGIS

I have a series of points that I would like to convert to a raster, and then calculate the area of the raster as a proxy for "amount of area covered". I'm trying to do this using PostGIS rather than ...
1
vote
0answers
165 views

Is there PostGIS equivalent to arcpy.sa.Slice() function?

I have an existing system built on an 8.3 PostgreSQL database which uses a ArcGIS - Spatial Analyst for a couple of raster operations. The system is moving to PostgreSQL 9.2 and I'm evaluating if the ...
1
vote
1answer
106 views

Is the PostGIS Raster primary key required to be named rid?

In all examples from the PostGIS Raster reference the primary key in tables with a raster column is named rid. I wonder if that naming is expected by any functionality of PostGIS itself or any client ...
1
vote
1answer
542 views

Can I make tiles of a raster in postgis?

I am doing some work on dtms in postgis. To import the dtm, I snipped it into tiles and the work directly on the dtm works fine. Then I calculated aspect and slope of the dtm and got some bad ...
6
votes
2answers
680 views

Is there an open standard for raster information?

For geographic vector data (Features) there is an OGC standard that defines geometries and their different annotations such as WKT and WKB. For raster image data however, I was not able to find ...
13
votes
2answers
3k views

Downloading raster data into python from postgis using psycopg2

I have raster data in a postgres table that I want to get into python as a numpy array. I am using psycopg2 to connect to the db. I am able to download the data but it comes back as a string (probably ...
3
votes
1answer
2k views

Importing GeoTIFF into PostGIS without raster2pgsql?

I know that one can import GeoTIFF into PostGIS via raster2pgsql. I was wondering if there is any easy way (as a sequence of SQL statements) to do the same without resorting to the command line tool? ...
3
votes
1answer
755 views

Replacing pixel value by lookup table using PostGIS?

I was wondering if it is possible to write a PostgreSQL statement to replace the value of each pixel in an input PostGIS-raster with a value obtained from a look up table. For example, suppose I have ...
3
votes
1answer
554 views

How to speed up raster/map algebra in PostGIS?

I am testing map algebra with PostGIS (2.1 with PostgreSQL 9.3) on two images, and found it to be rather slow. For example, dividing two images of 7200 * 3600 pixels took 110 ~ 120s on a desktop with ...
14
votes
1answer
488 views

PostGIS raster summation (map algebra)

I have a table of polygons representing travel time isochrones on particular days. For each origin point, there are five isochrone geometries (stored in separate rows). For each origin point, I want ...
4
votes
1answer
538 views

PostGIS resampling two rasters to common grid system

I am testing the PostGIS map algebra (ST_MapAlgebra) on two different raster tables. Each table contains a single image/row. They have the same SRID but different, overlapping extents and different ...
6
votes
0answers
2k views

Uploading raster format(*.tif) to postgis through raster2pgsql

I'm new to postgis and raster file format. i currently working on netcdf files and i want to import it into postgis through curl command line tool but its failed for me.so i jump on to GDAL v1.9.2 ...

1
2