Jan,
I think what you want gdalwarp to do is [Delauney] image triangulation. Not
an uncommon (or unreasonable) request. I occasionally have a need for
triangulation when mosaicking several satellite images. Its visually pleasing
to have the roads match up precisely where the images overlap...
Brent Fraser
Even Rouault wrote:
Jan,
(I'm CC'ing the list)
I'm not sure what you mean with adapting the pixelsize, now that the output
has only GCPs and no more geotransform matrix.
As far as including this option in baseline gdal_translate.cpp, I'm currently
not really enthousiastic, as there are lots of way to get the result achieved
(what is done with that patch could be done similarly with GDAL python API
for instance) and the choice of corners is something rather arbitrary. Why
should you trust the georeferenced coordinates of the corner points as
reliable GCPs ? Why not some regularly discretized points along the edges ?
Or a regular grid over the whole raster ? etc. etc. So, I'd prefer hearing
from other GDAL developers or users that this patch is a sensical addition
before commiting it.
Even
Le Thursday 12 February 2009 11:47:00, vous avez écrit :
Hi Even,
Thanks a lo. Just one small addition: the pixelsize has also to be
adapted, else you get an image with false dimension. If it's not too
much to add that, I'm going to try it out and will let you know the
results. If it works, I have indeed a practical solution for my problem.
Even so, I am not convinced that this is an uncommon problem. Consider a
very basic GIS functionality: edge matching. You have digitized a map
from many sheets, and at the end the georeferenced images don't match
precisely at the edges. Edge-matching functions (ArcGIS has lots of
them) ensure that the edge of a feature on one map perfectly matches the
feature edge on the adjacent map. This is exactly the kind of thing you
can do with gdalwarp using control points on a georeferenced image. It
is also more or less the thing I want to do with my historical maps.
Would this be an argument to preserve the boundaries of a georeferenced
image, when adding control points?
Jan
Even Rouault wrote:
Jan,
I concur with Jukka's analysis. Your need is rather uncommon, and I also
thinks it shouldn't be a default behaviour. However, adding that
capability to gdal_translate is quite easy. I've attached a patch for
gdal_translate.cpp that adds the capability of adding the 4 corners as 4
additional GCPs with the "-add_corners_as_gcps" option. You might give it
at try (it applies cleanly on GDAL 1.6.0 and trunk). I'm not sure yet if
it is valuable enough to include it in baseline gdal_translate.cpp.
Best regards
Le Wednesday 11 February 2009 15:59:48 Jukka Rahkonen, vous avez écrit :
Jan Hartmann <j.l.h.hartmann <at> uva.nl> writes:
Sorry to keep moaning about this, but I need an indication what's going
on here. Mind, I don't need an immediate solution: for the time being I
have a workaround. Just an idea whether this a real problem, a dumb
question, something that can be handled in the foreseeable future (or
not), perhaps with adequate funding. Everything is better than talking
to a blind wall.
Sorry again Frank,
Jan
Hi,
I think that your need to keep the original extents but add more ground
control points inside the image frame is rather uncommon. Doesn't it
mean that you trust that the image corners are correctly warped to a new
projection, but there are local distortions in the middle of image which
should be corrected with a few extra ground control points? For my mind
it shoudn't be the default behaviour of gdal but it might be usable as
an user selectable option sometimes.
I know that missing gcp's at the image corners often leads to very odd
result with polynomial warping because the formula shoots over. Even
unaccurately placed gcp's could help a lot in preserving the original
shape of the map. I guess that you are perhaps playing with scanned
historical maps? I have a few old scanned parcel maps which are
covering just the area of the farm, and two of the map corners are just
white background. It is impossible to measure any real ground control
points from the corners because there is nothing on the map to compare
with, and warping with all gcp's on the middle area makes really funny
looking curves into the hand drawn rectangle framing the original map.
-Jukka-
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev