If you are willing to do it you could write a ST_ChangePixelType(raster,
newpixeltype) sql function that would automatically define the reclassexpr
parameter to ST_Reclass...
We could then add it to the API.
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org
You loaded specifying -b 1 so it's not surprising it complains when you try to
display stats about band 2 and 3... You have only one band in the db...
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Yves
Because I did a quick test and copied past previous SQL requests and I did
not
clean it before! Of course you can remove the next 2 bands which don't
exist
but the first one should have correct statistic.
Thanks Pierre to let me know the logical ;)
Sorry I thought you were complaining
Marcello,
You have two choices:
a) load the rasters as rasters and vectorizing INSIDE the database at the same
time of doing the intersection or
b) load the rasters as rasters, clip the raster tiles with the 'fazendas' and
computing the number of with-value pixels in the clipped rasters
fazendas f, capacidade_rast c
WHERE ST_Intersects(ST_Buffer(f.geom, 0.01), c.rast)
AND f.gid = 6
) AS tmp
WHERE ST_Intersects(f.geom, tmp.geom)
GROUP BY tmp.pixel_value
ORDER BY tmp.pixel_value;
Regards
2013/10/21 Pierre
break up this template raster into tiles for performance gains.
Does that sound reasonable?
Thanks again,
Sebastian
On 10/16/2013 04:23 PM, Pierre Racine wrote:
Sebastian,
Your problem is that you did not manage the tiling properly.
1) You loaded dbe.elevation50km as 3045 tiles
Sebastian,
Your problem is that you did not manage the tiling properly.
1) You loaded dbe.elevation50km as 3045 tiles (with the -t raster2pgsql option)
and dbe.elevation20km apparently as 198 tiles (this is odd because there should
be more tiles in the lower resolution dataset. Are they
I use ST_MapAlgebraFct for this sort of things.
Look at the example in:
http://geospatialelucubrations.blogspot.ca/2012/07/a-slow-yet-1000x-faster-alternative-to.html
that shows how to extract values from another raster coverage. You will have to
modify the SQL query in the
Hi PostGIS Community,
I'd like to propose you this text about the use of Semantic MediaWiki to
develop web crowdsourced applications and the possibility to add more
geospatial capacities to it (powered by PostGIS evidently!).
What is this misterious calculation that can't be performed with any version of
MapAlgebra?
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Miguel-Angel Manso-Callejo (UPM)
Sent: Friday, September 27, 2013
You can also have a look at this article from Duncan Golicher if you are doing
raster/vector analysis:
http://duncanjg.wordpress.com/2012/10/30/tile-size-for-raster-vector-overlays-in-postgis/
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
/28 Pierre Racine pierre.rac...@sbf.ulaval.ca
Hi,
This query should return the geometry splitted in two but it returns
only one of the two sides.
SELECT
ST_Split(ST_GeomFromEWKT('POLYGON((252049.803755834
5230978.87794769
You should check with EXPLAIN if ST_Intersects() is using any index. I'm pretty
sure it doesn't.
You might want to create an intermediate table with your buffers and index it
and perform the ST_Union and ST_Clip in a second query.
-Original Message-
From:
Hailey,
Could you post here the definition of ST_SummaryStatsAgg() you are using. I'm
pretty sure I fixed this some time ago. I'd like to compare what you have with
what I have.
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
Congratulation and thanks everybody for this very significant release of
PostGIS and for continuously maintaining it as the number one geospatial
database in the world!
-Original Message-
From: postgis-devel-boun...@lists.osgeo.org [mailto:postgis-devel-
boun...@lists.osgeo.org] On
where each record is a date and an untiled raster, date is unique, one
raster per date. Is there a way to SELECT INTO a new table so for each
date the raster gets tiled?
Look for ST_Tile() in the doc.
And for a 2145 x 1377 original raster, can you recommend a size for the
tiles?
33 x 27?
Hi,
I do this query for counting the frequency of values in a raster:
SELECT identifian, ST_ValueCount(ST_Clip(rast, geom)) As pvc
FROM raster400x400_out, zones
WHERE ST_Intersects(rast, geom)
and I get many message like:
Unable to count the values for band at index 1
What does that mean?
That one of the things I would had in PostGIS 3.0.
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Bborie Park
Sent: Friday, May 24, 2013 11:01 AM
To: PostGIS Users Discussion
Subject: Re:
Am I doing something wrong?
Yes! You are writing to wrong list. Try the GDAL list.
Pierre
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Look at ST_MapAlgebra() and ST_Reclass().
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Amin Tayyebi
Sent: Thursday, April 25, 2013 12:26 PM
To: postgis-users@lists.osgeo.org
Subject: [postgis-users]
a. How would you turn this pseudocode into a PostGIS SQL query so this action
is
done quickly (we are not particularly skilled at SQL and new to PostGIS raster
processing functions)? That is, should we use an intersection approach or a
map
algebra approach? What would the SQL look like?
Pixel selection is possible via three options:
1) one raster ST_MapAlgebra
2) ST_Reclass
3) ST_DumpAsPolygons (with a where clause)
OK, we will test the different approaches to see what works best/fastest.
When
a query refers to multiple raster layers (e.g., select
Try this:
SELECT grid.pk_uid, point.pk_uid AS el_id, point.elevation
FROM grid_rail_lines grid, elev_rail_combined point
WHERE point.pk_uid = (SELECT point.pk_uid id2
FROM grid_rail_lines point
ORDER BY point.geom - grid.geom
LIMIT 1)
ORDER BY grid.pk_uid
From:
You can do:
SELECT ST_PixelAsPolygon(rast, ST_WorldToRasterCoordX(rast, ST_X(geom)),
ST_WorldToRasterCoordY(rast, ST_Y(geom))) geom
FROM yourrast, yourpoints
WHERE ST_Intersects(rast, geom)
Note that PixelAsPolygon has no s.
You will get the vectorization of every pixels having a point inside.
...@lists.osgeo.org] On Behalf Of Pierre Racine
Sent: Monday, February 25, 2013 5:51 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Postgis raster question: how to enable raster
type in
2.0
rtpostgis.sql if for loading raster definition and function into the
database
Did you load rtpostgis.sql?
Pierre
From: postgis-users-boun...@lists.osgeo.org
[mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of Ivan Santiago
Sent: Monday, February 25, 2013 1:42 PM
To: postgis-users@lists.osgeo.org
Subject: [postgis-users] Postgis raster question: how to enable
=http://www.ogp.gobierno.pr/
787.725.9420 x 2378
Calle Cruz 254
PO Box 9023228
San Juan, PR 00902-3228
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Pierre Racine
Sent: Monday, February 25, 2013 4:06 PM
To: PostGIS Users
Normally you would want to interpolate a continuous raster surface from a
number of points. Unfortunately we still don't have any interpolation algorithm
to do that. One way would be to ST_DelaunayTriangles() your points and then to
ST_Union(ST_AsRaster()) them to a raster. But we definitely
I think it would be nice to have a new simple GIS desktop application based
only on PostGIS. When you open a shapefile or an image, it is imported in
PostGIS. The GUI of the GIS would be just an SQL statement builder sending
queries to PostGIS, producing temporary or permanent tables and
The raster cells with the same elevation value got merged, why?
Because intersecting with every single pixel outline would be just too long.
The mean value which based on the actual result cannot be correct.
You actually want to compute a weighted mean, not simply a mean. The weighted
mean
With QuantumGIS (fresh install) i can view the raw image and an in - db
image but the out-db image returns the following fault.
Problem signature:
Problem Event Name: APPCRASH
Application Name: qgis.exe
Application Version:0.0.0.0
Application Timestamp: 4fdce845
not
want
to run 40 odd queries if I can do it with one. Since I'm new to PostGIS
though, I
don't know how to, hence why I'm asking.
Thanks,
Tim
Tim-Hinnerk Heuer
Twitter: @geekdenz
Blog: http://www.thheuer.com http://www.thheuer.com/
On 18 December 2012 08:53, Pierre Racine
://www.thheuer.com http://www.thheuer.com/
On 9 December 2012 20:24, Pierre Racine
pierre.rac...@sbf.ulaval.ca wrote:
SELECT ST_Value(rast,ST_SetSRID(ST_Point(1821416, 5649720),
2193))
FROM nzdem3
WHERE ST_Intersects(rast,ST_SetSRID
Which software? The software has to interpret himself the three bands as RGB. I
don't think QGIS does that...
There is nothing in PostGIS stating that a three bands raster is a TIFF or JPEG
file. PostGIS store rasters, not images.
Pierre
-Original Message-
From:
: @geekdenz
Blog: http://www.thheuer.com http://www.thheuer.com/
On 9 December 2012 00:49, Pierre Racine pierre.rac...@sbf.ulaval.ca wrote:
select st_value(rast,ST_SetSRID(ST_Point(1821416, 5649720), 2193))
from nzdem3
___
postgis-users
I made the tile size 1200x1200 and used the -R option when doing the
raster2pgsql import because the raster is a .img/.ige file which is 26GB. But
this
query result tells me it got the right geo transform.
If your coverage is tiled, your query should look like:
SELECT
I suggest you try ST_Reclass...
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of Mahavir Trivedi
Sent: Wednesday, November 28, 2012 11:46 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users]
The function is described in objective FV.20 at
http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03
There has been no effort to develop a plpgsql prototype and that would be VERY
welcome.
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org
Mathieu,
I see now what you mean. ST_Envelope gives the behaviour you described
(i.e. one polygon per tile, which is 9 lines). If I try to ST_Union them, I
get the exact same problem I had before with ST_Polygon: not all
polygon-tiles are unioned, as can be seen with a ST_Dump:
SELECT
for two of the polygons that are adjacent:
Clarendon 698486.043582936 617384.893096908 153 229 250 250 0 0
3448 4
Manchester 683177.872077352 632613.85425893 117 182 250 250 0 0
3448 4
On Wed, Nov 7, 2012 at 6:01 PM, Pierre Racine
pierre.rac...@sbf.ulaval.ca wrote
ST_PixelSizeX(raster) was replaced by ST_ScaleX(raster) since a while.
There is a function to convert a raster to polygons: ST_DumpAsPolygons()...
Pierre
-Original Message-
From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-
boun...@lists.osgeo.org] On Behalf Of
101 - 141 of 141 matches
Mail list logo