*
*/
+#include "../../postgis_config.h"
+//#define POSTGIS_DEBUG_LEVEL 4
+
#include "librtcore.h"
#include "librtcore_internal.h"
/* substitute spatial, reset back to default */
if (subspatial) {
double gt[6] = {0, 1, 0, 0, 0, -1};
+ /* See http://trac.osgeo.org/postgis/ticket/2911 */
+ /* We should proably also tweak rotation here */
+ /* NOTE: the times 10 is because it was divided by 10 in a section above,
+ * I'm not sure the above division was needed */
+ gt[1] = _scale[0] * 10;
+ gt[5] = -1 * _scale[1] * 10;
rt_raster_set_geotransform_matrix(rast, gt);
rt_raster_set_srid(rast, SRID_UNKNOWN);
ST_MakeEmptyRaster(1000, 1000, 0, 0, 1, -1, 0, 0, 0)
, 1, '8BUI', 255, 0
)
- , 0.25, 0.9
+ , 0.25, 0.8
) AS rast
UNION ALL
SELECT -- ticket #2188
4 AS rid,
ST_Resize(
ST_AddBand(
- ST_MakeEmptyRaster(1024, 768, 0, 0, 1, -1, 0, 0, 0)
+ ST_MakeEmptyRaster(1000, 1000, 0, 0, 1, -1, 0, 0, 0)
, 1, '8BUI', 255, 0
)
, 0.5, 0.5
0.22|993310|26|26|1|500.000|500.000|0.000|6.000|950452.000|1396632.000|t|t|t
0.23|984269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t
0.24|974269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t
-0.25|0|5|5|1|1.000|-1.000|0.000|0.000|0.000|0.000|t|t|t
-0.26|0|2|2|1|1.000|-1.000|0.000|0.000|0.000|0.000|t|t|t
-0.27|0|100|100|1|1.000|-1.000|0.000|0.000|0.000|0.000|t|t|t
+0.25|0|5|5|1|2.000|-2.000|0.000|0.000|0.000|0.000|t|t|t
+0.26|0|2|2|1|5.000|-5.000|0.000|0.000|0.000|0.000|t|t|t
+0.27|0|100|100|1|0.100|-0.100|0.000|0.000|0.000|0.000|t|t|t
0.3|994269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t
0.4|993310|24|24|1|500.000|500.000|0.000|0.000|950732.188|1397281.783|t|t|t
0.5|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t
NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API
NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API
NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API
-1|0|0|500|500|1|-1|0|0|0|1|250000|63750000|255|0|255|255
-2|0|0|500|100|1|-1|0|0|0|1|50000|12750000|255|0|255|255
-3|0|0|250|900|1|-1|0|0|0|1|225000|57375000|255|0|255|255
-4|0|0|512|384|1|-1|0|0|0|1|196608|50135040|255|0|255|255
+1|0|0|500|500|2|-2|0|0|0|1|250000|63750000|255|0|255|255
+2|0|0|500|100|2|-10|0|0|0|1|50000|12750000|255|0|255|255
+3|0|0|250|800|4|-1.25|0|0|0|1|200000|51000000|255|0|255|255
+4|0|0|500|500|2|-2|0|0|0|1|250000|63750000|255|0|255|255
NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API
NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API
-(0,0,5,5,1,-1,0,0,0,1)|(0,0,5,5,1,-1,0,0,0,1)
+(0,0,5,5,2,-2,0,0,0,1)|(0,0,5,5,2,-2,0,0,0,1)
WHERE f_table_name = 'raster_columns';
-- #2532
-SELECT NULL::raster @ null::geometry;
-SELECT NULL::geometry @ null::raster;
+SELECT '#2532.1', NULL::raster @ null::geometry;
+SELECT '#2532.2', NULL::geometry @ null::raster;
+
+-- #2911
+WITH data AS ( SELECT '#2911' l, ST_Metadata(ST_Rescale(
+ ST_AddBand(
+ ST_MakeEmptyRaster(10, 10, 0, 0, 1, -1, 0, 0, 0),
+ 1, '8BUI', 0, 0
+ ),
+ 2.0,
+ -2.0
+ )) m
+) SELECT l, (m).* FROM data;