[GRASS-dev] [GRASS GIS] #842: wx location wizard: spincontrol busted for UTM zone

GRASS GIS trac at osgeo.org
Mon Dec 21 05:32:26 EST 2009


#842: wx location wizard: spincontrol busted for UTM zone
----------------------------------+-----------------------------------------
 Reporter:  hamish                |       Owner:  grass-dev at lists.osgeo.org
     Type:  defect                |      Status:  new                      
 Priority:  major                 |   Milestone:  6.4.0                    
Component:  wxGUI                 |     Version:  svn-develbranch6         
 Keywords:  location wizard, utm  |    Platform:  Linux                    
      Cpu:  x86-64                |  
----------------------------------+-----------------------------------------
 Hi,

 the spin control for selecting the UTM zone in the new wx Location
 creation wizard is busted on multiple Debian/Lennies for me but works on
 Michael's Mac.

 For me it locks on zone "1" as soon as you try and change it.
 The only way we've found to unstick it is to comment out the first place
 the default value of 30 is set on line 710 ({{{ self.pval[num] = '30'
 }}}), but then I get errors in the terminal because it is uninitialized
 and if I continue past the resulting PROJ_INFO +lon_0 comes in at -183
 degrees regardless of zone.


 we tried changing the following with no luck:
 {{{
 - self.pval[num] = '30'
 + self.pval[num] = 30
 }}}
  * remove value=
  * remove initial=
  * remove style=


 spin controls work ok for me in module dialogs, such as r.composite.

 any ideas? anyone else see this?


 ----
 also the wizard does not create UTM zones as GRASS's type PROJECTION_UTM
 (1) but rather as expanded +proj4 terms as PROJECTION_OTHER (99). Lat/lon
 correctly sets itself as PROJECTION_LL (3).

 in the g.proj C code I have followed it as far as lib/proj/
 convert.c's GPJ_osr_to_grass(), which has some code to
 specifically find the UTM zone from the +proj string, but then
 it trails off a bit.

 Here is where it decides to use GRASS's lat/lon mode instead of
 go on using an "other" custom +proj string:

 {{{
 if (G_strcasecmp(pszToken, "proj") == 0) {
      /* The ll projection is known as longlat in PROJ.4 */
      if (G_strcasecmp(pszValue, "longlat") == 0)
          pszValue = "ll";

      pszProj = pszValue;
      continue;
 }
 }}}

 but there is no similar short-circuit for UTM zones or state
 plane. see also the GPJ_osr_to_grass() function header comments
 about return value.


 State Plane (PROJECTION_SP: 2) is less of a priority for now as the wx
 wizard end of that hasn't been written yet, but some basic placeholder
 code could go in.



 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/842>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list