r.proj[.seg]: new flag to show reprojected bounds and exit
|Reported by:||hamish||Owned by:|
the current v.in.region + v.proj method for finding/setting the output region prior to running r.proj successfully is a time wasting pain in the neck. the attached patch adds two flags to r.proj (-p and -g) to display the bounds of the input map reprojected into the present location's projection. if it gets rotated along the way I'm not sure if these numbers will be at the far corners or in the middle of the source box.
patch is vs. 6.5svn's raster/r.proj.seg/main.c but applies to trunk's r.proj ok.
another idea is to have another new flag to automatically adjust the output map's region like the r.in.* modules would. But then resolution will typically be broken and you still have to fix that by hand, so I'm not sure how much that gains you. IIRC i.rectify has some code for figuring out the output resolution based on the input, but IIRC that is simplistic based on number of rows and columns and so it's buggy if there is much north-rotation between the two locations. IIRC the ticket for that bug is in the old RT bug tracking system, and a possible solution is to multiply ew,ns resolution by the cosine of the convergence angle. So for now I prefer to set the output resolution by hand.