Hello, On Wed, Apr 7, 2010 at 5:09 AM, weixj2003ld <weixj200...@163.com> wrote: > Thk u for your reply. > I read the tuorail.but I think that will not satisfy my need. > I want to create a .png file,and it only contains height data and not > contains metadata, a coordinate system, a georeferencing transform, size of > raster and various other information,I find that the Create() and > CreateCopy(). is will create a file that contains all the things. > Kind regards. >
A PNG file itself can't store metadata, like a GeoTiff file. You'll need to create an external world file to store it. Please take a read at this, from http://www.gdal.org/frmt_various.html "PNG files can be created with a type of PNG, using the CreateCopy() method, requiring a prototype to read from. Writing includes support for the various image types, and will preserve transparency/nodata values. Georeferencing .wld files are written if option WORLDFILE setted. All pixel types other than 16bit unsigned will be written as eight bit. Creation Options: WORLDFILE=YES: Force the generation of an associated ESRI world file (with the extension .wld). See World File section for details." Best regards, Jorge > > > Please refer to http://www.gdal.org/gdal_tutorial.html > > 2010/4/6 weixj2003ld <weixj200...@163.com> >> >> I read data from a DEM file, and want to create a .png .Now I have read >> data, but I do not know how to create a png file that contains the height >> map value of each point from the DEM file. >> Thk u. >> >> >> _______________________________________________ >> gdal-dev mailing list >> gdal-dev@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/gdal-dev > > > > -- > Best regards, > Chaitanya kumar CH. > /tʃaɪθənjə/ /kʊmɑr/ > +91-9848167848 > 17.2416N 80.1426E > > > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev > _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev