PostGIS Development Blog http://postgis.net/ 2014-11-01T07:17:35+00:00 PieCrust 0.8.7 Getting distinct pixel values and pixel value counts of a raster 2014-09-26T00:00:00+00:00 2014-09-26T00:00:00+00:00 http://postgis.net/2014/09/26/tip_count_of_pixel_values Regina Obe Regina Obehttp://postgis.net <p>PostGIS raster has so so many functions and probably at least 10 ways of doing something some much much slower than others. Suppose you have a raster, or you have a raster area of interest &#8212; say elevation raster for example, and you want to know the distinct pixel values in the area. The temptation is to reach for <a href="/docs/manual-dev/RT_ST_Value.html" target="_blank"><code>ST_Value</code></a> function in raster, but there is a much much more efficient function to use, and that is the <a href="/docs/manual-dev/RT_ST_ValueCount.html" target="_blank"><code>ST_ValueCount</code></a> function.</p> <p><code>ST_ValueCount</code> function is one of many statistical raster functions available with PostGIS 2.0+. It is a set returning function that returns 2 values for each row: a pixel value (value), and a count of pixels (count) in the raster that have that value. It also has variants that allow you to filter for certain pixel values. </p> <p>This tip was prompted by the question on stackexchange <a href="http://gis.stackexchange.com/questions/115161/how-can-i-extract-all-distinct-values-from-a-postgis-raster/115245" target="_blank">How can I extract all distinct values from a PostGIS Raster?</a></p> Continue Reading by clicking title hyperlink .. PostGIS 2.1.4 Released 2014-09-10T00:00:00+00:00 2014-09-10T00:00:00+00:00 http://postgis.net/2014/09/10/postgis-2.1.4 Regina Obe Regina Obehttp://postgis.net <p>The 2.1.4 release of PostGIS is <a href="http://download.osgeo.org/postgis/source/postgis-2.1.4.tar.gz">now available</a>.</p> <p>The PostGIS development team is happy to release patch for PostGIS 2.1, the 2.1.4 release. As befits a patch release, the focus is on bugs, breakages, and performance issues</p> <p><a href="http://download.osgeo.org/postgis/source/postgis-2.1.4.tar.gz">http://download.osgeo.org/postgis/source/postgis-2.1.4.tar.gz</a></p> Continue Reading by clicking title hyperlink .. Security releases 2.0.6 and 2.1.3 2014-05-19T00:00:00+00:00 2014-05-19T00:00:00+00:00 http://postgis.net/2014/05/19/postgis-2.0.6_and_2.1.3 Sandro Santilli Sandro Santillihttp://postgis.net <p>It has come to our attention that the PostGIS Raster support may give more privileges to users than an administrator is willing to grant. These include reading files from the filesystem and opening connections to network hosts.</p> Continue Reading by clicking title hyperlink .. PostGIS 2.0.5 Released 2014-03-31T00:00:00+00:00 2014-03-31T00:00:00+00:00 http://postgis.net/2014/03/31/postgis-2-0-5 Paul Ramsey Paul Ramseyhttp://postgis.net <p>The 2.0.5 release of PostGIS is <a href="http://download.osgeo.org/postgis/source/postgis-2.0.5.tar.gz">now available</a>.</p> <p>The PostGIS development team is happy to release patch for PostGIS 2.0, the 2.0.5 release. As befits a patch release, the focus is on bugs and breakages.</p> <p>Best served with a bottle of GEOS 3.3.9.</p> <p><a href="http://download.osgeo.org/postgis/source/postgis-2.0.5.tar.gz">http://download.osgeo.org/postgis/source/postgis-2.0.5.tar.gz</a></p> <p>Doc downloads: <a href="http://download.osgeo.org/postgis/docs/doc-html-2.0.5.tar.gz">html doc download</a> <a href="http://download.osgeo.org/postgis/docs/postgis-2.0.5.pdf">pdf doc download</a></p> Continue Reading by clicking title hyperlink .. PostGIS 2.1.2 Released 2014-03-31T00:00:00+00:00 2014-03-31T00:00:00+00:00 http://postgis.net/2014/03/31/postgis-2.1.2 Paul Ramsey Paul Ramseyhttp://postgis.net <p>The 2.1.2 release of PostGIS is <a href="http://download.osgeo.org/postgis/source/postgis-2.1.2.tar.gz">now available</a>.</p> <p>The PostGIS development team is happy to release patch for PostGIS 2.1, the 2.1.2 release. As befits a patch release, the focus is on bugs and breakages.</p> <p>Best served with a bottle of GEOS 3.4.2.</p> <p><a href="http://download.osgeo.org/postgis/source/postgis-2.1.2.tar.gz">http://download.osgeo.org/postgis/source/postgis-2.1.2.tar.gz</a></p> Continue Reading by clicking title hyperlink .. Getting intersections the faster way 2014-03-14T00:00:00+00:00 2014-03-14T00:00:00+00:00 http://postgis.net/2014/03/14/tip_intersection_faster Regina Obe Regina Obehttp://postgis.net <p>Doing an <a href="/docs/manual-dev/ST_Intersection.html" target="_blank"><code>ST_Intersection</code></a> is much slower than relation checks such as <a href="/docs/manual-dev/ST_Intersects.html" target="_blank"><code>ST_Intersects</code></a> , <a href="/docs/manual-dev/ST_CoveredBy.html" target="_blank"><code>ST_CoveredBy</code></a>, and , <a href="/docs/manual-dev/ST_Within.html" target="_blank"><code>ST_Within</code></a> . In many situations you know the intersection of 2 geometries without actually computing an intersection. In these cases, you can skip the costly <code>ST_Intersection</code> call. Cases like this:</p> <ol> <li>geometry a is covered by geometry b -> intersection is geometry a</li> <li>geometry b is covered by geometry a -> intersection is geometry b</li> <li>geometry a does not intersect geometry b -> intersection is empty geometry</li> </ol> <p>This kind of question comes up a lot: As discussed in stackexchange <a href="http://gis.stackexchange.com/questions/31310/acquiring-arcgis-like-speed-in-postgis/31562" target="_blank">Acquiring ArcGIS speed in PostGIS</a></p> Continue Reading by clicking title hyperlink .. PostGIS Day Hang-out Panel discussion 2013-11-21T00:00:00+00:00 2013-11-21T00:00:00+00:00 http://postgis.net/2013/11/21/postgis-day-panel Regina Obe Regina Obehttp://postgis.net <p>November 21st, 2013 was PostGIS day and to celebrate we had a four panel discussion with host James Fee and panel members <a href="http://blog.cleverelephant.ca" target="_blank">Paul Ramsey</a>, <a href="http://www.linkedin.com/pub/bborie-park/54/a16/b7b" target="_blank">Bborie Park</a>, <a href="http://smathermather.wordpress.com" target="_blank">Stephen Mather</a>, and <a href="http://www.databasesoup.com/" target="_blank">Josh Berkus</a>.</p> <p><a href="http://www.youtube.com/watch?feature=player_embedded&v=xzl6gaOsasE" target="_blank">Video here</a></p> Continue Reading by clicking title hyperlink .. PostGIS 2.1.1 Released 2013-11-08T00:00:00+00:00 2013-11-08T00:00:00+00:00 http://postgis.net/2013/11/08/postgis-2.1.1 Paul Ramsey Paul Ramseyhttp://postgis.net <p>The 2.1.1 release of PostGIS is <a href="http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz">now available</a>.</p> <p>The PostGIS development team is happy to release patch for PostGIS 2.1, the 2.1.1 release. As befits a patch release, the focus is on bugs and breakages.</p> <p>Best served with a bottle of GEOS 3.4.2.</p> <p><a href="http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz">http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz</a></p> Continue Reading by clicking title hyperlink .. pgAdmin shows no data 2013-10-05T00:00:00+00:00 2013-10-05T00:00:00+00:00 http://postgis.net/2013/10/05/tip_pgAdmin_shows_no_data Regina Obe Regina Obehttp://postgis.net <p>Every one or two months, someone asks on the PostGIS users list usually somewhat panicked, <em>My geometry is missing when I look in pgAdmin III</em></p> <p>This is documented in the PostGIS Frequently Asked questions section of the manual <a href="/docs/manual-dev/PostGIS_FAQ.html#pgadmin_shows_no_data_in_geom" target="_blank">I tried to use PgAdmin to view my geometry column and it is blank, what gives?</a></p> <p>Since this question gets asked so much, I thought it best to highlight it again.</p> <p>Spatial objects can be big things and if your geometry, geography, or raster row field is big enough, pgAdmin is not going to load it and will just show an empty field. This is by design. There are a couple of ways to verify you really have data and even how big your geometry, geography or raster column is</p> Continue Reading by clicking title hyperlink .. PostGIS 2.0.4 Released 2013-09-06T00:00:00+00:00 2013-09-06T00:00:00+00:00 http://postgis.net/2013/09/06/postgis-2-0-4 Paul Ramsey Paul Ramseyhttp://postgis.net <p>The 2.0.4 release of PostGIS is <a href="http://download.osgeo.org/postgis/source/postgis-2.0.4.tar.gz">now available</a>.</p> <p>The PostGIS development team is happy to release patch for PostGIS 2, the 2.0.4 release. As befits a patch release, the focus is on bugs and breakages.</p> <p>Best served with a bottle of GEOS 3.3.9.</p> <p><a href="http://download.osgeo.org/postgis/source/postgis-2.0.4.tar.gz">http://download.osgeo.org/postgis/source/postgis-2.0.4.tar.gz</a></p> <p>Doc downloads: <a href="http://download.osgeo.org/postgis/docs/doc-html-2.0.4.tar.gz">html doc download</a> <a href="http://download.osgeo.org/postgis/docs/postgis-2.0.4.pdf">pdf doc download</a></p> Continue Reading by clicking title hyperlink ..