[GRASS-dev] [GRASS GIS] #906: r.out.gdal (VRT) broken output
GRASS GIS
trac at osgeo.org
Thu Feb 4 09:59:31 EST 2010
#906: r.out.gdal (VRT) broken output
----------------------+-----------------------------------------------------
Reporter: epifanio | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.5.0
Component: default | Version: svn-develbranch6
Keywords: | Platform: MacOSX
Cpu: x86-64 |
----------------------+-----------------------------------------------------
tring to generate a VRT file using r.out.gdal i get a broken file (not
loadable in ossim and qgis)
using gdal_translate i get a different results.
using r.out.gdal
r.out.gdal input=geology at PERMANENT format=VRT type=Byte output=name.vrt
r.out.gdal input=geology at PERMANENT format=VRT type=Byte output=name.vrt
Exporting to GDAL data type: Byte
Checking GDAl data type and nodata value
Input raster map contains cells with NULL-value (no-data). The value 255
will be used to represent no-data values in the input map. You can specify
a nodata value with the nodata option.
Exporting to GDAL raster
ERROR 1: Writing through VRTSourcedRasterBand is not
supported.
Unable to write GDAL raster file
Unable to export raster map <geology at PERMANENT>
r.out.gdal complete.
(Thu Feb 4 00:53:22 2010) Command finished (0 sec)
i get this output :
#############################################
<VRTDataset rasterXSize="1899" rasterYSize="1398">
<SRS>PROJCS["UTM Zone 13, Northern
Hemisphere",GEOGCS["clark66",DATUM["North_American_Datum_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["meter",1]]</SRS>
<GeoTransform> 5.9001000000000000e+05, 1.0000000000000000e+01,
0.0000000000000000e+00, 4.9280000000000000e+06, 0.0000000000000000e+00,
-1.0000000000000000e+01</GeoTransform>
<VRTRasterBand dataType="Byte" band="1">
<NoDataValue>2.55000000000000E+02</NoDataValue>
<ColorInterp>Palette</ColorInterp>
<ColorTable>
<Entry c1="197" c2="129" c3="125" c4="255"/>
<Entry c1="107" c2="250" c3="75" c4="255"/>
<Entry c1="226" c2="83" c3="250" c4="255"/>
<Entry c1="246" c2="222" c3="188" c4="255"/>
<Entry c1="123" c2="225" c3="27" c4="255"/>
<Entry c1="134" c2="190" c3="1" c4="255"/>
<Entry c1="48" c2="86" c3="221" c4="255"/>
<Entry c1="113" c2="70" c3="15" c4="255"/>
<Entry c1="102" c2="134" c3="101" c4="255"/>
<Entry c1="89" c2="135" c3="169" c4="255"/>
</ColorTable>
</VRTRasterBand>
</VRTDataset>
#############################################
this output is different from the gdal output :
gdal_translate -of VRT
/Users/sasha/Downloads/spearfish60/PERMANENT/cellhd/geology
/Users/sasha/Desktop/geology.vrt
#############################################
<VRTDataset rasterXSize="190" rasterYSize="140">
<SRS>PROJCS["UTM Zone 13, Northern
Hemisphere",GEOGCS["clark66",DATUM["North_American_Datum_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["meter",1]]</SRS>
<GeoTransform> 5.9000000000000000e+05, 1.0000000000000000e+02,
0.0000000000000000e+00, 4.9280000000000000e+06, 0.0000000000000000e+00,
-1.0000000000000000e+02</GeoTransform>
<Metadata/>
<VRTRasterBand dataType="Byte" band="1">
<Metadata>
<MDI key="COLOR_TABLE_RULES_COUNT">0</MDI>
</Metadata>
<NoDataValue>0.00000000000000E+00</NoDataValue>
<ColorInterp>Palette</ColorInterp>
<ColorTable>
<Entry c1="197" c2="129" c3="125" c4="255"/>
<Entry c1="107" c2="250" c3="75" c4="255"/>
<Entry c1="226" c2="83" c3="250" c4="255"/>
<Entry c1="246" c2="222" c3="188" c4="255"/>
<Entry c1="123" c2="225" c3="27" c4="255"/>
<Entry c1="134" c2="190" c3="1" c4="255"/>
<Entry c1="48" c2="86" c3="221" c4="255"/>
<Entry c1="113" c2="70" c3="15" c4="255"/>
<Entry c1="102" c2="134" c3="101" c4="255"/>
<Entry c1="89" c2="135" c3="169" c4="255"/>
</ColorTable>
<SimpleSource>
<SourceFilename
relativeToVRT="0">/Users/sasha/Downloads/spearfish60/PERMANENT/cellhd/geology</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="190" RasterYSize="140"
DataType="Byte" BlockXSize="190" BlockYSize="1"/>
<SrcRect xOff="0" yOff="0" xSize="190" ySize="140"/>
<DstRect xOff="0" yOff="0" xSize="190" ySize="140"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
#############################################
the grass output doesn't include :
<SimpleSource>
...
</SimpleSource>
it is missed and tring to load the output in ossim or qgis it is not
displayed.
from a chat on #gdal seems the problem is related to the "create_copy()"
usage .. but i'm not able to debug it.
thanks!
Massimo.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/906>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list