Hello Markus,<br>many thanks for your response.<br>I guess the behavior of r.out.gdal in case of a raster map in UTM projection and DTED export seems to be correct.<br>So i removed the DTED test from the GRASS testsuite, based on your suggestions and the gdal documentation.<br>
<br>soeren<br><br><div class="gmail_quote">2009/8/11 Markus Metz <span dir="ltr">&lt;<a href="mailto:markus.metz.giswork@googlemail.com">markus.metz.giswork@googlemail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">From the DTED specs:<br>
<br>
A data file of DTED Level 0, DTED Level 1 or<br>
DTED Level 2 is a 1° by 1° cell defined by whole degree latitude and<br>
longitude<br>
lines on WGS. A DTED file shall not cross whole degree latitude or longitude<br>
lines.<br>
<br>
Matrix intervals for DTED Level 0.<br>
ZONE LATITUDE latitude x longitude INTERVAL<br>
I 0° - 50° North-South 30 x 30 seconds<br>
II 50° - 70° North-South 30 x 60 seconds<br>
III 70° - 75° North-South 30 x 90 seconds<br>
IV 75° - 80° North-South 30 x 120 seconds<br>
V 80° - 90° North-South 30 x 180 seconds<br>
<br>
Matrix intervals for DTED Level 1.<br>
ZONE LATITUDE latitude x longitude INTERVAL<br>
I 0° - 50° North-South 3 x 3 seconds<br>
II 50° - 70° North-South 3 x 6 seconds<br>
III 70° - 75° North-South 3 x 9 seconds<br>
IV 75° - 80° North-South 3 x 12 seconds<br>
V 80° - 90° North-South 3 x 18 seconds<br>
<br>
Matrix intervals for DTED Level 2.<br>
ZONE LATITUDE latitude x longitude INTERVAL<br>
I 0° - 50° North-South 1 x 1 seconds<br>
II 50° - 70° North-South 1 x 2 seconds<br>
III 70° - 75° North-South 1 x 3 seconds<br>
IV 75° - 80° North-South 1 x 4 seconds<br>
V 80° - 90° North-South 1 x 6 seconds<br>
<br>
No idea how strict the gdal driver for DTED is, but it seems that it is<br>
very strict and won&#39;t work without reprojection, followed by setting<br>
region extends and resolution according to the desired DTED level.<br>
<br>
Markus M<br>
<br>
<br>
Soeren Gebbert wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Dear Devs,<br>
i found a strange behavior in r.out.gdal while updating the GRASS test suite.<br>
<br>
Im using the grass6.4svn snapshot: grass-6.4.svn_src_snapshot_2009_08_01.tar.gz.<br>
on openSuse 10.3 Linux 2.6.22.19-0.2-bigsmp<br>
gdal version 1.6.1<br>
<br>
The test i am implementing tries to export a DCELL raster map (named elevation ) to a DTED file with r.out.gdal.<br>
r.out.gdal reports plenty of errors (all of the same type) an exits with return code 0.<br>
A dted file is created, but im not sure if it is valid.<br>
Exporting the same file with r.out.gdal in ENVI and ELAS formats seems to work correctly.<br>
<br>
These steps are performed:<br>
<br>
GRASS 6.4.0svn &gt; g.region -p<br>
projection: 1 (UTM)<br>
zone:       32<br>
datum:      wgs84<br>
ellipsoid:  wgs84<br>
north:      5582000<br>
south:      5580000<br>
west:       400000<br>
east:       402000<br>
nsres:      20<br>
ewres:      20<br>
rows:       100<br>
cols:       100<br>
cells:      10000<br>
<br></div></div>
GRASS 6.4.0svn &gt; <a href="http://r.info" target="_blank">r.info</a> &lt;<a href="http://r.info" target="_blank">http://r.info</a>&gt; elevation<div><div></div><div class="h5"><br>
 +----------------------------------------------------------------------------+<br>
 | Layer:    elevation                      Date: Sun Apr 30 12:48:58 2006    |<br>
 | Mapset:   PERMANENT                      Login of Creator: soeren          |<br>
 | Location: TestLocation                                                     |<br>
 | DataBase: /1/gebbert/src/GRASS_Testsuite                                   |<br>
 | Title:     ( elevation )                                                   |<br>
 | Timestamp: none                                                            |<br>
 |----------------------------------------------------------------------------|<br>
 |                                                                            |<br>
 |   Type of Map:  raster               Number of Categories: 255             |<br>
 |   Data Type:    DCELL                                                      |<br>
 |   Rows:         100                                                        |<br>
 |   Columns:      100                                                        |<br>
 |   Total Cells:  10000                                                      |<br>
 |        Projection: UTM (zone 32)                                           |<br>
 |            N:    5582000    S:    5580000   Res:    20                     |<br>
 |            E:     402000    W:     400000   Res:    20                     |<br>
 |   Range of data:    min = 68.246322  max = 363.529491                      |<br>
 |                                                                            |<br>
 |   Data Description:                                                        |<br>
 |    generated by r.mapcalc                                                  |<br>
 |                                                                            |<br>
 |   Comments:                                                                |<br>
 |    sin(col() * 5) * col() + cos(row() * 5) * row() + 200                   |<br>
 |                                                                            |<br>
 +----------------------------------------------------------------------------+<br>
<br>
<br>
GRASS 6.4.0svn &gt; r.out.gdal --verbose format=DTED type=Float32 input=elevation output=/tmp/test.dted ....<br>
ERROR 5: Access window out of range in RasterIO().  Requested<br>
(0,994) of size 201x1 on raster of 100x100.<br>
ERROR 5: Access window out of range in RasterIO().  Requested<br>
(0,995) of size 201x1 on raster of 100x100.<br>
ERROR 5: Access window out of range in RasterIO().  Requested<br>
(0,996) of size 201x1 on raster of 100x100.<br>
More than 1000 errors or warnings have been reported. No more will be reported from now.<br>
r.out.gdal complete.<br>
<br>
<br>
GRASS 6.4.0svn &gt; gdalinfo -nomd -noct -stats /tmp/test.dted<br>
Driver: DTED/DTED Elevation Raster<br>
Files: /tmp/test.dted<br>
       /tmp/test.dted.aux.xml<br>
Size is 201, 1201<br>
Coordinate System is:<br>
GEOGCS[&quot;WGS 84&quot;,<br>
    DATUM[&quot;WGS_1984&quot;,<br>
        SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563]],<br>
    PRIMEM[&quot;Greenwich&quot;,0],<br>
    UNIT[&quot;degree&quot;,0.0174532925199433],<br>
    AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]<br>
Origin = (399.997500000000002,559.000416666666638)<br>
Pixel Size = (0.005000000000000,-0.000833333333333)<br>
Corner Coordinates:<br>
Upper Left  (     399.998,     559.000) (399d59&#39;51.00&quot;E,559d 0&#39;1.50&quot;N)<br>
Lower Left  (     399.998,     558.000) (399d59&#39;51.00&quot;E,557d59&#39;58.50&quot;N)<br>
Upper Right (     401.002,     559.000) (401d 0&#39;9.00&quot;E,559d 0&#39;1.50&quot;N)<br>
Lower Right (     401.002,     558.000) (401d 0&#39;9.00&quot;E,557d59&#39;58.50&quot;N)<br>
Center      (     400.500,     558.500) (400d30&#39;0.00&quot;E,558d30&#39;0.00&quot;N)<br>
Band 1 Block=1x1201 Type=Int16, ColorInterp=Palette<br>
  Min=0.000 Max=0.000<br>
  Minimum=0.000, Maximum=0.000, Mean=0.000, StdDev=0.000<br>
  NoData Value=-32767<br>
  Unit Type: m<br>
  Color Table (RGB with 365 entries)<br>
<br>
<br>
Any suggestions what i did wrong?<br>
Maybe the region settings are incompatible with the dted output coordinate system?<br>
Or is this a correct behavior of r.out.gdal?<br>
<br>
Thanks in advance<br>
best regards<br>
Soeren<br>
<br>
<br>
<br></div></div><div class="im">
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
</div></blockquote>
<br>
</blockquote></div><br>