122 | | Pros: |
123 | | ○ Source points do not have to be in the raster extent (constraint 4) |
124 | | ○ Should work well with large number of source points (constraint 1, 5c & 5d) since we will be using KNN index to find the nearest point. |
125 | | ○ Make it possible to to createa tiled raster coverage aligned to an existing one (constraint 3) |
126 | | ○ Opening to be able to reused for further computing interpolation since the method to find neighbors is quite generic. |
127 | | Cons: |
128 | | ○ Might not be as light as Approach 1 in case there is only one point in the source table (Constraint 1) or there are very small number of source points and the requested raster is relatively small too (Constraint 5) |
129 | | ○ Have no idea how to deal with Constraint 9. |
| 128 | '''Pros:''' |
| 129 | * Source points do not have to be in the raster extent (constraint 4) |
| 130 | * Should work well with large number of source points (constraint 1, 5c & 5d) since we will be using KNN index to find the nearest point. |
| 131 | * Make it possible to to createa tiled raster coverage aligned to an existing one (constraint 3) |
| 132 | * Opening to be able to reused for further computing interpolation since the method to find neighbors is quite generic. |
135 | | ● it exploits and benefits from a very unique and performant new feature of PostGIS: KNN indexing, |
136 | | ● it is compliant with PostGIS Raster powerful raster/vector interactions |
137 | | ● in terms of scalability, it provides the possibility to generate a distance raster from any coverage of point (however numerous they are) since the time to find the nearest neighbor for each pixel is relatively constant (thanks to the KNN index), |
138 | | ● it makes it possible to work with huge tiled coverage (constraint 3) since the extent of the raster is independent of the source extent, |
139 | | ● it provides a reusable approach for other types of distances (Constraint 13) and interpolation. |
| 142 | * It exploits and benefits from a very unique and performant new feature of PostGIS: KNN indexing, |
| 143 | * It is compliant with PostGIS Raster powerful raster/vector interactions |
| 144 | * In terms of scalability, it provides the possibility to generate a distance raster from any coverage of point (however numerous they are) since the time to find the nearest neighbor for each pixel is relatively constant (thanks to the KNN index), |
| 145 | * It makes it possible to work with huge tiled coverage (constraint 3) since the extent of the raster is independent of the source extent, |
| 146 | * It provides a reusable approach for other types of distances (Constraint 13) and interpolation. |
150 | | ● Set the dimensions of the raster by providing the parameters of a pixel size (scalex & scaley and skewx & skewy). The width & height of the resulting raster will be adjusted to fit the extent of the geometry |
| 160 | * Set the dimensions of the raster by providing the parameters of a pixel size (scalex & scaley and skewx & skewy). The width & height of the resulting raster will be adjusted to fit the extent of the geometry |
| 161 | {{{ |
| 162 | #!c |
| 163 | ST_EuclideanDistance(text dbschema, text sourcetable, text sourcegeomcolumn, double precision scalex, double precision scaley, double precision gridx, double precision gridy, text pixeltype, double precision value=1, double precision nodataval=0, double precision skewx=0, double precision skewy=0) |
| 164 | }}} |
152 | | ST_EuclideanDistance(text dbschema, text sourcetable, text sourcegeomcolumn, double precision scalex, double precision scaley, double precision gridx, double precision gridy, text pixeltype, double precision value=1, double precision nodataval=0, double precision skewx=0, double precision skewy=0) |
| 166 | * Fix the dimensions of the raster by providing the dimensions of the raster (width & height). The parameters of the pixel size (scalex & scaley and skewx & skewy) of the resulting raster will be adjusted to fit the extent of the source geometry |
| 167 | {{{ |
| 168 | #!c |
| 169 | ST_EuclideanDistance(text dbschema, text sourcetable, text sourcegeomcolumn, geometry geom, integer width, integer height, double precision gridx, double precision gridy, text pixeltype, double precision value=1, double precision nodataval=0, double precision skewx=0, double precision skewy=0) |
| 170 | }}} |
154 | | ● Fix the dimensions of the raster by providing the dimensions of the raster (width & height). The parameters of the pixel size (scalex & scaley and skewx & skewy) of the resulting raster will be adjusted to fit the extent of the source geometry |
155 | | |
156 | | ST_EuclideanDistance(text dbschema, text sourcetable, text sourcegeomcolumn, geometry geom, integer width, integer height, double precision gridx, double precision gridy, text pixeltype, double precision value=1, double precision nodataval=0, double precision skewx=0, double precision skewy=0) |
157 | | |
158 | | |
159 | | For Constraint 6: (just write down the function that takes a reference raster for example) |
| 172 | * For Constraint 6: (just write down the function that takes a reference raster for example) |
| 173 | {{{ |
| 174 | #!c |