Le vendredi 14 août 2015 19:15:44, Ivan Castellucci Vidal a écrit : > Thanks Even! > > That's exactly what I was looking for and I just have one question about > it. GDAL documentation states: "Due to imprecision in the calculations the > fit algorithm will often return non-zero rotational coefficients even if > given perfectly non-rotated inputs" > > Is there a way to use a more precise algorithm?
The algorithm is mostly a least square regression. There are also a few heuristics to force the rotational coefficients to 0 in a few situations, like when there are 4 GCPs that form a rectangle. But since you mentionned that your images would have rotation, that shouldn't be much of a concern I think. Anyway in cases where the theory should be perfect 0, the values got in practice should be sufficiently close to zero for most practical purposes. > It's not a requirement by > now since this program is in development but at some point I'll need to > count with the maximum possible precision to make it work in a production > release. > > > On Fri, Aug 14, 2015 at 1:22 PM, Even Rouault <even.roua...@spatialys.com> > > wrote: > > > Instead of warping the image, you could compute a geotransformation > > > > matrix > > > > > that would include rotational terms with GDALGCPsToGeoTransform() > > > > > > http://www.gdal.org/gdal_8h.html#ae44b32f08d61072dddbdd30ac8ca962b > > > > > > and set it to your geotiff with GDALSetGCPs() > > > > > > http://www.gdal.org/gdal_8h.html#acd47aa85ca5751fbe9ea09c1a2341ef8 > > > > Arg, sorry I meant with GDALSetGeoTransform() of course : > > http://www.gdal.org/gdal_8h.html#ae93448112c1a7e69f2764c1aa3c6c8b5() > > > > GDALSetGCPs() is to set the "raw" GCPs. > > > > -- > > Spatialys - Geospatial professional services > > http://www.spatialys.com > > _______________________________________________ > > gdal-dev mailing list > > gdal-dev@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev