[postgis-tickets] [PostGIS] #2912: rt_raster_gdal_polygonize: Couldn't create a OGR Datasource to store pols
PostGIS
trac at osgeo.org
Fri Aug 29 00:49:14 PDT 2014
#2912: rt_raster_gdal_polygonize: Couldn't create a OGR Datasource to store pols
----------------------+-----------------------------------------------------
Reporter: strk | Owner: dustymugs
Type: defect | Status: closed
Priority: medium | Milestone:
Component: raster | Version: trunk
Resolution: invalid | Keywords:
----------------------+-----------------------------------------------------
Comment(by strk):
So I found that these errors were due to setting skew to the requested
output skew in gdal_warp for so called "default georeferenced" rasters.
Similarly to what was done for scale by r12928
Here's the patch:
{{{
diff --git a/raster/rt_core/rt_warp.c b/raster/rt_core/rt_warp.c
index 10964c4..369eaf4 100644
--- a/raster/rt_core/rt_warp.c
+++ b/raster/rt_core/rt_warp.c
@@ -999,6 +999,8 @@ rt_raster rt_raster_gdal_warp(
* I'm not sure the above division was needed */
gt[1] = _scale[0] * 10;
gt[5] = -1 * _scale[1] * 10;
+ gt[2] = _skew[0]; /* skew_x */
+ gt[4] = _skew[1]; /* skew_y */
rt_raster_set_geotransform_matrix(rast, gt);
rt_raster_set_srid(rast, SRID_UNKNOWN);
}}}
Without the patch, calling _st_gdalwarp with a skew results in the wrong
skew being set to the output raster if the raster has the default
georeference (like #2911 was for scale). I'm not sure if there's a public
API to affect skew.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2912#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list