[postgis-tickets] r14784 - more formatting cleanup
Regina Obe
lr at pcorp.us
Sun Mar 13 12:25:03 PDT 2016
Author: robe
Date: 2016-03-13 12:25:03 -0700 (Sun, 13 Mar 2016)
New Revision: 14784
Modified:
web/_content/posts/2016/03-13_tip_pixels_of_range_value.html
Log:
more formatting cleanup
Modified: web/_content/posts/2016/03-13_tip_pixels_of_range_value.html
===================================================================
--- web/_content/posts/2016/03-13_tip_pixels_of_range_value.html 2016-03-13 19:22:28 UTC (rev 14783)
+++ web/_content/posts/2016/03-13_tip_pixels_of_range_value.html 2016-03-13 19:25:03 UTC (rev 14784)
@@ -10,7 +10,8 @@
This raster question comes up quite a bit on PostGIS mailing lists and stack overflow and the best answer often involves
the often forgotten <a href="/docs/RT_ST_Reclass.html" target="_blank">```ST_Reclass```</a> function that has existed since PostGIS 2.0.
-People often resort to the much slower though more flexible ST_MapAlgebra or dumping out their rasters as Pixel valued polygons they then filter
+People often resort to the much slower though more flexible ```ST_MapAlgebra``` or dumping out
+their rasters as Pixel valued polygons they then filter
with WHERE val > 90,
where ```ST_Reclass``` does the same thing but orders of magnitude faster.
@@ -18,7 +19,8 @@
The question goes something like this
-<em>I have this raster measuring contaminent levels of ammonia in the pixel values in band 1, and I want to rank contamination by 0 low, 1 medium, 2 high. Then I want to find the area of this contamination or do some other crazy geometric thing to it.</em>
+<em>I have this raster measuring contaminent levels of ammonia in the pixel values in band 1, and I want to rank contamination by 0 low, 1 medium, 2 high.
+Then I want to find the area of this contamination or do some other crazy geometric thing to it.</em>
The basic strategy is to reduce your raster into a simpler one that contains 0s, 1s, 2s where 0 ends up being marked as ```nodata```. Then you mark off 0 (or whatever number you choose) as ```nodata```. In the end you end up with a fairly simple raster that is easy to vectorize or keep as raster and do stats on.
More information about the postgis-tickets
mailing list