[GRASS-dev] Re: [GRASS GIS] #328: Add "-e" switch (=extend location extents based on reprojected map) in r.proj

GRASS GIS trac at osgeo.org
Fri Oct 10 01:40:11 EDT 2008


#328: Add "-e" switch  (=extend location extents based on reprojected map) in
r.proj
--------------------------+-------------------------------------------------
  Reporter:  nikos        |       Owner:  grass-dev at lists.osgeo.org
      Type:  enhancement  |      Status:  new                      
  Priority:  minor        |   Milestone:  6.4.0                    
 Component:  default      |     Version:  unspecified              
Resolution:               |    Keywords:                           
  Platform:  Unspecified  |         Cpu:  Unspecified              
--------------------------+-------------------------------------------------
Comment (by glynn):

 Replying to [comment:1 hamish]:
 > > Well, the title speaks itself :-) Would it hurt to have this
 > > when reprojecting for example simple study area boundaries or
 > > similar? What speaks against it?
 >
 > It violates the axiom of "do one thing well".
 > The purpose of the module is to reproject maps, not to mess with
 > the region. g.region should always be used for that.

 FWIW, I took the request as meaning setting the map's bounds (not the
 current region) to contain the entire projected map.

 This isn't something that can readily be done with g.region, as r.proj is
 the only place where the relevant information is available (from the
 bordwalk() calculation).

 Currently, r.proj reverse-projects the current region borders into the
 source projection, and only reads the needed portion of the source map
 into memory (for 6.4 r.proj) or into the temporary file (for 6.4
 r.proj.seg and 7.0 r.proj). It then forward-projects that region into the
 target projection, and sets the map's bounds accordingly (so the map's
 bounds may be smaller than the current region).

 It wouldn't be that hard to skip the first step and perform the second, so
 that the (internal) region, and thus the output map's bounds, was expanded
 to cover the projected boundary of the source map. You would still need to
 use "g.region rast=outmap" to see all of the new map.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/328#comment:4>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list