Re: [GRASS-dev] [GRASS GIS] #3828: pygrass.gis.Region.from_* should raise a ValueError if the specified map does not exist.

2019-05-05 Thread GRASS GIS
#3828: pygrass.gis.Region.from_* should raise a ValueError if the specified map
does not exist.
--+-
  Reporter:  pmav99   |  Owner:  grass-dev@…
  Type:  enhancement  | Status:  new
  Priority:  normal   |  Milestone:
 Component:  PyGRASS  |Version:  svn-trunk
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by neteler):

 A patch would be appreciated.

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] [GRASS GIS] #3828: pygrass.gis.Region.from_* should raise a ValueError if the specified map does not exist.

2019-04-27 Thread GRASS GIS
#3828: pygrass.gis.Region.from_* should raise a ValueError if the specified map
does not exist.
-+-
 Reporter:  pmav99   |  Owner:  grass-dev@…
 Type:  enhancement  | Status:  new
 Priority:  normal   |  Milestone:
Component:  PyGRASS  |Version:  svn-trunk
 Keywords:   |CPU:  Unspecified
 Platform:  Unspecified  |
-+-
 I think it would be better if
 {{{
 pygrass.gis.Region.from_rast(raster_name)
 pygrass.gis.Region.from_vect(vector_name)
 }}}

 would raise a {{{ValueError}}} if the specified map name cannot be found.
 With the current implementation, the region remains unchanged and you have
 no clue about that:
 
https://grass.osgeo.org/grass77/manuals/libpython/_modules/pygrass/gis/region.html#Region.from_rast

 Note, it might make sense to raise the Exception from within
 {{{get_mapset_raster()}}} but that function is used in more places and I
 haven't checked if this will break anything.

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev