[GRASS-dev] [GRASS GIS] #352: r.in.gdal region troubles in LL

GRASS GIS trac at osgeo.org
Wed Feb 22 09:09:10 PST 2017


#352: r.in.gdal region troubles in LL
--------------------------+-------------------------
  Reporter:  neteler      |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  major        |  Milestone:  6.4.6
 Component:  Raster       |    Version:  unspecified
Resolution:               |   Keywords:  r.in.gdal
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-------------------------

Comment (by mmetz):

 Replying to [comment:3 glynn]:
 > Replying to [comment:2 neteler]:
 >
 > > The user took this map
 >
 > > and passed it to R, and then redefined:
 >
 > > and then he wrote b as npp.tif using the QGIS plugin manageR.
 >
 > > Maybe there is a precision issue before, somwhere in the R or QGIS
 part?
 >
 > It appears so. The inaccuracy is present in the TIFF file; it isn't
 being introduced by libtiff, GDAL or GRASS.

 The example file npp.tif is no longer existing. The problem can be
 reproduced with

 {{{
 g.region n=85.000000000114397 \
          s=-58.000000000000007 \
          e=180.000000000288 \
          w=-180 rows=572 cols=1440 -p
 }}}

 In GRASS 7.2, this gives

 {{{
 projection: 3 (Latitude-Longitude)
 zone:       0
 datum:      wgs84
 ellipsoid:  wgs84
 north:      85N
 south:      58S
 west:       180W
 east:       179:59:59.999999W    <-- wrong EW extent of 0.000001 seconds
 nsres:      0:15
 ewres:      0                    <-- invalid because of wrong east
 rows:       572
 cols:       1440
 cells:      823680
 }}}

 A subsequent `g.region -p` gives

 {{{
 ERROR: Syntax error in cell header
 }}}

 In trunk, setting the region as above gives

 {{{
 projection: 3 (Latitude-Longitude)
 zone:       0
 datum:      wgs84
 ellipsoid:  wgs84
 north:      85N
 south:      58S
 west:       180W
 east:       180:00:00.000001E    <-- ok
 nsres:      0:15
 ewres:      0:15                 <-- ok
 rows:       572
 cols:       1440
 cells:      823680
 }}}

 The EW extent is now slightly (0.000001 seconds) larger than 360 degrees,
 but g.region does not complain and east is easy to fix.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/352#comment:6>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list