Hi Kirill,
Using the callback version of ST_MapAlgebra() should be much faster but you
have to write your own callback function.
https://postgis.net/docs/RT_ST_MapAlgebra.html
Let us know the difference.
Pierre
De : postgis-users De la part de ?
?? ??
Envoyé : April 6, 2020
Solution is to filter out NULL returned when using ST_Value() or DISTINCT or
GROUP BY multiple values returned when using ST_Intersect().
Using (only) one solution consistently returns consistent results.
Pierre
-Message d'origine-
De : postgis-users De la part de Peter
Devoy
Envoyé
GDAL is complaining that your image is rotated and that it does not support it
yet. What if you erase (or just rename) the .jgw, temporally to remove the
rotation?
Pierre
-Message d'origine-
De : postgis-users De la part de Jorge
Gustavo Rocha
Envoyé : 27 septembre 2019 18:18
À :
ot;... d.geom touch (ndvi2018 < ndvi2019)" where ndvi are raster
data.
Att.
Em 15-07-2019 14:43, Pierre Racine escreveu:
Hi,
That could translate into something like this in PostGIS:
WITH floodareas AS (
SELECT ST_MapAlgebra(rast, ‘1BB’, ‘CASE WHEN [rast] < 10 THEN 1 ELSE
Hi,
That could translate into something like this in PostGIS:
WITH floodareas AS (
SELECT ST_MapAlgebra(rast, ‘1BB’, ‘CASE WHEN [rast] < 10 THEN 1 ELSE NULL
END’) rast
FROM elevation
)
SELECT d.*
FROM districts d, floodareas f
WHERE ST_Intersects(g.geom, f.rast)
NULL becomes nodata values.
wouldn't be asked questions
How come ST_Equals says these are equal but geom::text = geom::text says they
are not.
Seems to me like trading one set of problems for another.
Thanks,
Regina
From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of
Pierre Racine
Sent: Monday,
org>
Objet : Re: [postgis-users] Strange behavior with empty geometries GROUP BY
BTree = operator
Which is bounding box equality
From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of
Pierre Racine
Sent: Monday, September 11, 2017 3:54 PM
To: PostGIS Users Discussion
&l
251250 5243749.86206897)
From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of
Pierre Racine
Sent: Monday, September 11, 2017 3:08 PM
To: PostGIS Users Discussion
<postgis-users@lists.osgeo.org<mailto:postgis-users@lists.osgeo.org>>
Subject: Re: [postgis-users
,
251000 5243597.61702128,
251000 5243681.87096774))') geom
) SELECT ST_AsText(geom)
FROM polys
GROUP BY geom;
Pierre
De : postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] De la part de
Pierre Racine
(geom) geom
FROM polys
UNION ALL
SELECT 3 test, ST_Collect(geom) geom
FROM polys
)
SELECT test, ST_AsText(ST_Polygonize(geom))
FROM extrings
GROUP BY test;
De : postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] De la part de
Pierre Racine
Envoyé : 7 septembre 2017 09:46
À : PostGIS
Hi,
Is it normal that ST_Polygonize() gives two different results depending on if
the linestrings are ST_Union() before calling it or not?
In the following example, test 1 (no union) and 3 (ST_Collect) give the same
result, constructing two overlapping polygons. Test 2 (ST_Union) on the other
GEOS="3.6.1-CAPI-1.10.1 r4317" PROJ="Rel. 4.9.1, 04
March 2015" GDAL="GDAL 2.1.3, released 2017/20/01" LIBXML="2.7.8"
LIBJSON="0.12" RASTER
Thanks,
Regina
From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of
Pie
Try setting the ST_MakeEmptyRaster() upperlefty parameter to a negative value
(-1).
Pierre
De : postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] De la part de
Vitor Sapucaia
Envoyé : 21 juin 2017 04:58
À : postgis-users@lists.osgeo.org
Objet : [postgis-users] PostGIS
Hi,
When I try to count the occurrence of a number of empty geometries like this:
SELECT ST_AsText(geom) txt, count(*)
FROM (
SELECT 'POINT(0 0)'::geometry geom
UNION ALL
SELECT 'POINT(0 0)'::geometry geom
UNION ALL
SELECT 'POINT(0 0)'::geometry geom
UNION ALL
SELECT 'POINT(0 1)'::geometry geom
[mailto:l...@pcorp.us]
Envoyé : 16 avril 2017 00:06
À : 'PostGIS Users Discussion' <postgis-users@lists.osgeo.org>
Cc : Pierre Racine <pierre.rac...@sbf.ulaval.ca>; 'Bborie Park'
<dustym...@gmail.com>
Objet : RE: [postgis-users] Fwd: PostGIS Out-DB Raster Not Behaving A
mars 2017 15:50
To: Pierre Racine <pierre.rac...@sbf.ulaval.ca>
Cc: postgis-users@lists.osgeo.org
Subject: Re: Cost weighted distance raster
Just to follow up:
I was able to execute the CREATE FUNCTION scripts with some minor tweaking.
When I run ST_CostDistance it chokes on making
In the code page :
https://trac.osgeo.org/postgis/wiki/PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools/code
There is a ST_CostDistance() function.
Pierre
From: Spencer Gardner [mailto:spencergard...@gmail.com]
Sent: 7 mars 2017 12:35
To: Pierre Racine <pierre.rac...@sbf.ulaval.ca&
There is no .sql. just copy the functions into a .sql text file and execute.
From: Spencer Gardner [mailto:spencergard...@gmail.com]
Sent: 7 mars 2017 11:16
To: Pierre Racine <pierre.rac...@sbf.ulaval.ca>
Cc: postgis-users@lists.osgeo.org
Subject: Re: Cost weighted distance raster
On Tue,
since a while, not
sure the code is working properly.
Did you get time to test it? If it work fine, I might take time to add it to
the Addons before FOSS4G 2017.
Pierre
From: Spencer Gardner [mailto:spencergard...@gmail.com]
Sent: 6 mars 2017 18:09
To: postgis-users@lists.osgeo.org; Pierre
Hi Spencer,
I don’t know if they are still compatible with the newest PostGIS version.
They used to work fine but don’t expect very good performance.
Pierre
From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of
Spencer Gardner
Sent: 3 mars 2017 15:03
To:
Sounds reasonable to me. You could try splitting the process between your 4 or
8 processors, each importing a selection of files. Maybe this could help, maybe
this could make the whole process even slower (depend on what is slow the CPU
or the disk)...
If you don't necessarily need all the
ST_Union works on overlapping rasters as well but maybe you have to provide two
3 bands rasters. If your rasters are tiled, you also have to GROUP BY tiles
having the same alignment:
GROUP BY ST_UpperleftX(rast), ST_UpperleftY(rast)
ST_MapAlgebra() should work also. The expression should be
From the ST_SummaryStatsAgg () doc: "By default will sample all pixels. To get
faster response, set sample_percent to value between 0 and 1"
Pierre
> -Original Message-
> From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf
> Of matteo rivola
> Sent: Wednesday,
<postgis-users@lists.osgeo.org>
> Subject: Re: [postgis-users] Raster tile size impact results
>
> Hello,
>
> Unfortunatly, I don't find a way to print raster results in OpenJump. Can you
> explain me how I can do it ?
>
> Thank you for your help !
>
> Pier
Tile them! Should be much faster.
> -Original Message-
> From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On
> Behalf Of Stephen Crawford
> Sent: Thursday, March 10, 2016 12:05 PM
> To: PostGIS Users Discussion
> Subject: [postgis-users] raster question
>
> Hell all,
>
Or ST_ReClass() and ST_PixelAsCentroids()?
> -Original Message-
> From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On
> Behalf Of Regina Obe
> Sent: Wednesday, March 09, 2016 7:04 AM
> To: 'PostGIS Users Discussion'
> Subject: Re: [postgis-users] Raster SQL to separate
Hi Etienne,
> Still, I can't figure how to load an arbitrary number of bands using your
> snippet. If I remove WHERE band=1 I still get a unique band.
This query will work for many bands and will aggregate all of them in a single
raster:
WITH rows AS (
SELECT band, colx, array_agg(v ORDER BY
The two NOTICE are because there is actually two rasters created by in the
dummy_rast table and the first one has no bands.
Values are rounded by ST_MapAlgebra() because, by default, ST_MapAlgebra() will
try to produce a raster with the same pixel type as the input rasters. If you
want the
Étienne,
The columnx and rowy ST_SetValues() parameters are not references to each pixel
values. They are the coordinates only of the first upperleft pixel to be set.
Other pixels coordinates are automatically derived from the size of the passed
two dimensional array (newvalueset). That means
This all depends on the kind of operations you want to do... Some might be
easier keeping rasters as raster. Others are easier if you convert everything
to vector.
You can easily convert raster loaded in PostGIS to vector using
ST_DumpAsPolygons(). The reverse operation is done through a mix
James,
> When importing a large raster dataset, it is typically tiled and the only
> reference in postgis that these tiles form a single dataset is the
> raster_columns table.
You could also load your rasters with the -f option which add a column with the
filename of the original raster file.
> @Vincent : For ArcGIS Union, please see here.
> http://resources.esri.com/help/9.3/arcgisengine/java/gp_toolref/analysis_
> tools/union_analysis_.htm
ArcGIS Union resume to removing overlaps from the union of two tables. Look at
the ST_DifferenceAgg() example in the PostGIS Addons:
is a pleasure - albeit the results do not
always please me :)
Hopefully I can put this to work later tonight.
Best wishes
Darrel
From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of
Pierre Racine
Sent: 23 November 2015 16:17
To: PostGIS Users Discussion
<postgis-u
her you again.
Darrel
From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of
Pierre Racine
Sent: 23 November 2015 20:30
To: PostGIS Users Discussion
<postgis-users@lists.osgeo.org><mailto:postgis-users@lists.osgeo.org>
Subject: Re: [postgis-users] Help with S
Darrel,
1) Create a new raster selecting the right pixels with
ST_MapAlgebra(raster, raster)
2) Make sure only intersecting rasters are processed by using their upper
left corner X and Y coordinates (with ST_UpperLeftX() and UpperLeftY())
3) Sum the selected pixels with
Doesn’t the second example (One raster, several bands) similar to your case in
the doc?
http://postgis.net/docs/RT_ST_MapAlgebra.html
Pierre
From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of
David Haynes
Sent: Tuesday, November 17, 2015 9:48 AM
To:
If by "sum" you mean "merge" or "union" use ST_Union(). Be careful as the "sum"
can exceed available memory if they are too many rasters in the table.
> -Original Message-
> From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On
> Behalf Of Stephen Crawford
> Sent: Monday,
Copy all your files in a single folder and only use one wildcard.
d:\postgis_in_action\ch13_data_code\vietnam\dted\allfiles\*.dt0
From: postgis-users-boun...@lists.osgeo.org
[mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of toni hernández
Sent: Tuesday, October 06, 2015 10:49 AM
To:
I guess the band argument comes before the geom argument in ST_Clip(). You can
pass an array for the bands you require.
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of David Haynes
Sent: Wednesday,
Adding a GROUP BY t1.rid, doesn't solve the problem, still get an error.
Which error?
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
have a way to display the footprints of your rasters tiles?
Pierre
-Original Message-
From: juli g. pausas [mailto:juli.g.pau...@uv.es]
Sent: Monday, July 06, 2015 9:58 AM
To: Pierre Racine
Cc: PostGIS Users Discussion
Subject: Re: [postgis-users] raster, stats conditioned to a set
But my main problem is that I would like to do this (e.g., the query above),
but only for the pixels in which Band2 = 0. Any idea? any clue?
1) isolate the pixels with 0. For this you can use ST_MapAlgebra() or
ST_Reclass(). I use ST_MapAlgebra() in the following query
2) compute the
Why is the first argument to ST_Clip() is a geometry? Should be a raster.
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Marcello Benigno
Sent: Wednesday, July 01, 2015 7:12 AM
To: PostGIS Users Discussion
|
On Tue, Jun 30, 2015 at 5:29 PM, Pierre Racine
pierre.rac...@sbf.ulaval.ca wrote:
You can select pixels fulfilling an expression using the one-raster
variant of ST_MapAlgebra
http://postgis.net/docs/RT_ST_MapAlgebra_expr.html
So just do something like
You can select pixels fulfilling an expression using the one-raster variant of
ST_MapAlgebra
http://postgis.net/docs/RT_ST_MapAlgebra_expr.html
So just do something like:
ST_MapAlgebra(rast, '8BUI'::text, '[rast] 0')
before computing stats.
To count the number of pixels of a certain value
Or ST_Reclass() reclassifying everything 10 to nodata...
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Rémi Cura
Sent: Wednesday, May 27, 2015 9:31 AM
To: PostGIS Users Discussion
Subject: Re:
Read this:
https://smathermather.wordpress.com/2012/08/10/what-is-the-center-line-of-a-complex-polygon-routing-stream-and-rivers-part-two/
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Tom van Tilburg
Sent:
What do you mean by proper? How is it? Your query should results in a raster
column.
Pierre
From: postgis-users-boun...@lists.osgeo.org
[postgis-users-boun...@lists.osgeo.org] On Behalf Of Ahmet Temiz
[ahmettemi...@gmail.com]
Sent: Friday, May 08, 2015
You have to project your raster wit ST_Transform() before calling ST_Slope().
You also have to ST_Union() your raster tiles before projecting it.
Pierre
From: postgis-users-boun...@lists.osgeo.org
[postgis-users-boun...@lists.osgeo.org] On Behalf Of
I guess you have two options:
1) clip and union your tiles BEFORE computing the quantile
2) use the ST_Quantile variant taking table and column names. I don't know if
these function aggregates the results though.
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org
1 - What's the best way to do raster/polygon intersections? I read about
two different approaches, one using ST_Intersection and the other one
using ST_Clip. The second one apparently is faster and more efficient, but i
don't know about its precision.
The precision depends on the sizes of
Just
SELECT (ST_DumpAsPolygons(rast)).*
FROM deforested_areas
-–WHERE rid = 1
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Hugues François
Sent: Tuesday, March 31, 2015 10:05 AM
To: PostGIS Users
How do you check that your rasters only nodata value?
You know, very often, raster and geometries are not displayed in the pgAdmin
table result when they are too large.
What's the result of
SELECT postgis_full_version()
on both machines?
Pierre
-Original Message-
From:
If you're storing the raster in the database, I have no specific suggestions.
The reason for no suggestion is that it really depends on the characteristics
of the raster (number of bands, pixel type of each band) and the server
environment.
You normally want to store in-db because you want to
Hi,
I have:
POSTGIS=2.1.5 r13152 GEOS=3.4.2-CAPI-1.8.2 r0 PROJ=Rel. 4.8.0, 6 March
2012 GDAL=GDAL 1.11.1, released 2014/09/24 LIBXML=2.7.8 LIBJSON=UNKNOWN
RASTER
and
SELECT ST_Clip(ST_MakeEmptyRaster(42, 42, 0, 0, 1.0, 1.0, 0, 0, 4269),
ST_MakeEnvelope(0, 0, 20, 20, 4269));
crashed my
, 2015 at 6:50 AM, Pierre Racine
pierre.rac...@sbf.ulaval.ca wrote:
Hi,
I have:
POSTGIS=2.1.5 r13152 GEOS=3.4.2-CAPI-1.8.2 r0 PROJ=Rel.
4.8.0, 6 March 2012 GDAL=GDAL 1.11.1, released 2014/09/24
LIBXML=2.7.8 LIBJSON=UNKNOWN RASTER
and
SELECT ST_Clip
rasters
Thanks,
I'm using the technique described at http://blog.mathieu-
leplatre.info/drape-lines-on-a-dem-with-postgis.html
What would be small tiles in this context? 256x256? The raster I was testing
against was ~1200x1200.
-ra
On 27 Aug 2014, at 16:19, Pierre Racine pierre.rac
Elevation profile should be quite fast depending on how you tile your raster
coverage. Smaller tiles make computation faster. Index them and make sure your
query is actually using the index.
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
You should use the raster stats functions instead of ST_DumpAsPolygon to get
values or summary stats from the clipped rasters.
http://postgis.net/docs/RT_reference.html#RasterBand_Stats
Pierre
From: postgis-users-boun...@lists.osgeo.org
...@postgis.refractions.net; Pierre Racine
Subject: Re: [postgis-users] Summary Statistics (vector, raster)
POSTGIS begginer here:
I think I'm having a similar problem as described in this post. I tryed
following Pierre's sucgestion (second post), but I'm not able to find or
install the
SummarystatsAgg
Try ST_Reclass().
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of David Haynes
Sent: Friday, May 30, 2014 10:49 AM
To: postgis-users@lists.osgeo.org
Subject: [postgis-users] ST_SelectByValue
Hello,
I
These variables are system variables, not PostgreSQL variables. to know how to
set them in your system search for set environment variable os x.
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of John
, June 05, 2014 3:34 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] ST_SelectByValue
reclass would allow me to change the values of the pixel.
ST_SelectByValue is supposed to like a map algebra or in ArcGIS Terms
select by attribute.
On Thu, Jun 5, 2014 at 1:38 PM, Pierre
To: PostGIS Users Discussion; Pierre Racine
Subject: Re: [postgis-users] getting raster values for point from st_value
Hi Pierre,
Thanks so much for super quick response. You will have to forgive me I am
fairly new to postgis.
Creating the table is no problem but how would I check
You can add the filename as a new column with the -f option. Then you can
extract whatever you want from this column to build a key.
Does this works for you?
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On
before importing
in the DB.
Pierre
-Original Message-
From: Max Demars [mailto:burton449...@gmail.com]
Sent: Wednesday, May 14, 2014 11:19 AM
To: PostGIS Users Discussion
Cc: Pierre Racine
Subject: Re: [postgis-users] add foreign-key constraint on raster import
I was thinking
Done!
http://geospatialelucubrations.blogspot.ca/2014/05/a-guide-to-rasterization-of-vector.html
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of georgew
Sent: Monday, April 21, 2014 6:37 PM
To:
Create a new table with the extents of the raster tiles and check if it
overlaps with your points:
CREATE TABLE rastextets AS
SELECT rast::geometry
FROM tbl_raster
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org]
What happened when you remove and st_value (dted_elevations.rast, f.geom) is
not null? You get null values?
Do you have many nodata values in your raster?
How is your raster tiled? Did you build a spatial index on the raster tiles?
Pierre
-Original Message-
From:
Hi,
What maximum size the result of a ST_Union(rast) can be if it is embedded in a
ST_Tile() call?
SELECT ST_Tile(ST_Union(rast), 100, 100) rast FROM ...
The RAM available to PostgreSQL or the maximum size of a PostgreSQL field (1GB)?
Thanks,
Pierre
6, 2014 at 6:35 AM, Pierre Racine
pierre.rac...@sbf.ulaval.ca wrote:
Hi,
What maximum size the result of a ST_Union(rast) can be if it is
embedded in a ST_Tile() call?
SELECT ST_Tile(ST_Union(rast), 100, 100) rast FROM ...
The RAM available to PostgreSQL
...@lists.osgeo.org] On Behalf Of Bborie Park
Sent: Tuesday, May 06, 2014 10:03 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Raster ST_Union memory limit
I think your query will explode...
On Tue, May 6, 2014 at 7:01 AM, Pierre Racine
pierre.rac...@sbf.ulaval.ca wrote
There are two strategies to convert a table composed of many geometries to a
raster coverage:
1) ST_AsRaster each geometries, ST_Union them and then ST_Tile them.
2) Use ST_ExtractToRaster() from the PostGIS Add-ons.
I plan to blog about this as soon as I get 400 times 5 minutes...
Pierre
It's not because the entries in raster_columns are different that the actual
tables are different. Info in raster_columns is generated from constraints set
by raster2pgsql. A better way to compare the two tables is to use ST_Metadata()
and ST_BandMetadata().
You can also set the constraints on
You can set the pixeltype and the extent in ST_AsRaster(). You seems also to
have a different nodata value that you can also set in ST_AsRaster(). So a bit
of reading about ST_AsRaster() and experiment and you'll should get what you
want.
Pierre
-Original Message-
From:
Importing a big raster as a coverage with a huge number of small tiles always
takes a long time. Two options:
-Increase the size of your tiles. They don't have to be that small to get good
performance with intersections.
-Do you really need the raster to be inside the database? Try adding the
What is the exact query you do when trying to compute the sum or the max of the
resulting raster?
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of g.si...@utwente.nl
Sent: Monday, February 24, 2014 3:44 PM
Guido,
no masks (you can create a mask as a band) means that a mask is nothing
different than a normal band. It's just a band that is mostly used to intersect
(mask) another band having normal values. You can do that with... ...
ST_Intersection(raster, raster)
So first you want to
Give a try to ST_TrimMulti() in the PostGIS Add-ons:
http://geospatialelucubrations.blogspot.ca/2013/11/launching-postgis-add-ons-new-postgis.html
https://github.com/pedrogit/postgisaddons/releases/tag/1.21
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org
Try this:
SELECT ST_Buffer(ST_Union(ST_Buffer(geom, 0.0001)), -0.8) FROM points
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Ivan Price
Sent: Tuesday, January 14, 2014 8:36 AM
To: PostGIS Users
You did not paste your code...
ST_ExtracToRaster() should work on a geometry table. If you want it to work on
point cloud table you have to add a set of methods to the
ST_ExtractPixelValue4ma() function. Sorry that was not clear. you could start
by converting your patches to geometries to test
MEAN_OF_VALUES_AT_PIXEL_CENTROID, which is the default ST_ExtractToRaster()
method, search for geometries intersecting with the centroid of the pixel (a
point). That's the method you use both calls to ExtractToRaster(). As it's
almost impossible that a point intersects a point, this is
Can you please confirm if there is or isn't a method to set/get several pixels
at a time?
I don't know any...
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
2013/12/19 Pierre Racine
pierre.rac...@sbf.ulaval.ca
MEAN_OF_VALUES_AT_PIXEL_CENTROID,
which is the default ST_ExtractToRaster() method, search for geometries
intersecting with the centroid of the pixel (a point). That's the method you
use both calls
I would rather use the user custom function mapalgebra technique used in
ST_ExtracToRaster() in the PostGIS Add-ons to extract a mean value for the
group of point intersecting with each pixel. This should work well if 1) most
pixels have points inside so there is no need to interpolate 2) it is
Assuming your three rasters would be in three different tables and not tiled,
it could look like this:
WITH
solandcov AS (SELECT ST_MapAlgebra(a.rast, b.rast, '([rast1] = 1491 and
[rast2] = 70)::int', 4BUI) FROM sol_gain_clipped a, can_cov_01 b),
creek AS (SELECT ST_MapAlgebra(a.rast, b.rast,
You will have to define biggest more precisely. Biggest in terms of area?
There might be many inner rectangles having the same biggest area. How to
choose one over the other?
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
Of Pierre Racine
Sent: Wednesday, December 04, 2013 9:42 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] biggest rectangle contained within another
polygon
You will have to define biggest more precisely. Biggest in terms of area?
There might be many inner rectangles having the same
You are getting fast result because you are not operating at the pixel level.
Only at the raster extent level (converted to geometry). A more usual query
would be to intersect a raster with some polygons:
SELECT (ST_Intersection(r.rast, q.geom)).*
FROM ilatlon32x32 as r, geometrytable as q
-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Pierre Racine
Sent: Mittwoch, 4. Dezember 2013 17:43
To: PostGIS Users Discussion
Subject: Re: [postgis-users] [postgis] Optimal tile size for Raster
You are getting fast result because
Laurent,
The list of available drivers is dependent on your installation. Normally if
you can gdalinfo a raster, raster2psgql should be able to load it. So the first
thing is: Does gdalinfo works fine? If not then you should refer to the gdal
list. I yes then it might be a raster2pgsql problem
Not really the same thing as I said... ;-)
I would prefer You just DO WHAT THE FUCK YOU WANT TO as long as it stay
open...
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Mateusz Loskot
Sent: Wednesday,
The result is that I change raster values in only 1 of the 81 polygon cells
that I have in
schema.data_vector. What am I missing here? Thanks for your help! Keep
up the great work!
UPDATE schema.data_raster SET rast = ST_SetValue(rast,1, geom, 100)
FROM schema.data_vector
I don't fully
] The first release of the PostGIS Add-ons is out!
Le 11/18/2013 12:25 PM, Stephen Woodbridge a écrit :
On 11/18/2013 12:20 PM, Mateusz Loskot wrote:
On 18 November 2013 17:13, Pierre Racine
pierre.rac...@sbf.ulaval.ca
wrote:
I'm a license ignorant.
Release it into the public domain
] On Behalf Of Pierre Racine
Sent: Tuesday, November 19, 2013 1:45 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] The first release of the PostGIS Add-ons is out!
I knew we would fall into a license nightmare... So far we've got suggestions
for No rights reserved, BSD, Creative Common
IMHO, It's fine (actually wonderful) that postgis is in the GPL, it protects
the
project and does not really limit its use in any substantive way. It's big
enough to stand on its own. But re: #2 GPL would limit the wide use of
these scripts.
How would GPL limit the wide use of these
Hey!
I'm glad today to launch the PostGIS Add-ons. This new PostGIS extension aims
at providing a quick, more Agile way to release pure PL/pgSQL functions
developed by the PostGIS user community. It includes 15 new functions. Among
them, two functions to aggregate raster/vector overlay
Sent: Monday, November 18, 2013 11:49 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] The first release of the PostGIS Add-ons is out!
Very cool idea.
I have a lot of plpgsql functions.
One more detail : what about licenses?
Cheers,
Rémi-C
2013/11/18 Pierre Racine
Humm.. Lots of requirements...
Sorry for the license, I needed a clear answer :-) I personnaly would prefere
LGPL, like postgres.
Doesn't seems like a good idea to make it different than PostGIS. How is LGPL
different from LPG? I'm a license ignorant.
can you consider to use a template doc
Rémi,
About license :
if you use GPL function, your code becomes GPL, this might be a problem if
using it inside company.
If you use LGPL, you can do basically what you want.
I think about going like Mateusz and Stephen suggested. What do you think?
Using PostGIS everyday, I already find
1 - 100 of 141 matches
Mail list logo