[GRASS-dev] [GRASS GIS] #2140: m.proj does not handle cs2cs failure

GRASS GIS trac at osgeo.org
Tue Dec 3 10:39:11 PST 2013


#2140: m.proj does not handle cs2cs failure
--------------------------------+-------------------------------------------
 Reporter:  wenzeslaus          |       Owner:  grass-dev@…              
     Type:  defect              |      Status:  new                      
 Priority:  normal              |   Milestone:  7.0.0                    
Component:  Projections/Datums  |     Version:  svn-trunk                
 Keywords:  m.proj, cs2cs       |    Platform:  All                      
      Cpu:  All                 |  
--------------------------------+-------------------------------------------
 When I input wrong proj strings to `m.proj` it calls `cs2cs` which fails
 and `m.proj` does not handle its error correctly.

 To test (you need to have `test.txt` with any content):

 {{{
 m.proj input=test.txt proj_out="bla bla bla" proj_in="another bla bla bla"
 }}}

 The error message is:

 {{{
 Rel. 4.8.0, 6 March 2012
 <cs2cs>:
 projection initialization failure
 cause: unknown projection id
 program abnormally terminated
 Traceback (most recent call last):
   File "/home/vasek/dev/grass/trunk_clang/dist.i686-pc-linux-
 gnu/scripts/m.proj", line 292, in <module>
     main()
   File "/home/vasek/dev/grass/trunk_clang/dist.i686-pc-linux-
 gnu/scripts/m.proj", line 271, in main
     x, y = xy.split('\t')
 ValueError: need more than 1 value to unpack
 }}}

 I haven't investigated that but checking return code is probably enough.

 ''What is the correct Trac component for this ticket?''

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



More information about the grass-dev mailing list