[gdal-dev] Re: Handling nodata values

Chaitanya kumar CH chaitanya.ch at gmail.com
Sat Jun 26 06:48:51 EDT 2010


Nop,

I didn't see the extent val_repl.py does the conversion. That is a problem.

Since you said that gdalwarp did not work, try gdal_merge.py with the
options "-n -332768 -init 0".

On Sat, Jun 26, 2010 at 3:58 PM, NopMap <ekkehart at gmx.de> wrote:

>
>
> Chaitanya kumar CH wrote:
> >
> >
> > In line 93 in val_repl.py, the default value is taken as of type Byte.
> For
> > a
> > quick fix, mention the data type of the raster reported by gdalinfo with
> > the
> > option -ot to the script. Refer to (
> >
> http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/python/samples/val_repl.py#L61
> )
> >
>
> Thanks, that was the reason. Now I got one step further, but it still does
> not work.
>
> The resulting TIF is now the same size as the original, but it appears that
> the georeferencing is lost in the process.
>
> The original file shows the folling information
> Size is 6001, 6001
> Coordinate System is:
> GEOGCS["WGS 84",
>    DATUM["WGS_1984",
>        SPHEROID["WGS 84",6378137,298.2572235630016,
>            AUTHORITY["EPSG","7030"]],
>        AUTHORITY["EPSG","6326"]],
>    PRIMEM["Greenwich",0],
>    UNIT["degree",0.0174532925199433],
>    AUTHORITY["EPSG","4326"]]
> Origin = (14.999583744947651,40.000416787708332)
> Pixel Size = (0.000833333333333,-0.000833333333333)
> Metadata:
>  AREA_OR_POINT=Area
> Image Structure Metadata:
>  INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (  14.9995837,  40.0004168) ( 14d59'58.50"E, 40d 0'1.50"N)
> Lower Left  (  14.9995837,  34.9995835) ( 14d59'58.50"E, 34d59'58.50"N)
> Upper Right (  20.0004171,  40.0004168) ( 20d 0'1.50"E, 40d 0'1.50"N)
> Lower Right (  20.0004171,  34.9995835) ( 20d 0'1.50"E, 34d59'58.50"N)
> Center      (  17.5000004,  37.5000001) ( 17d30'0.00"E, 37d30'0.00"N)
> Band 1 Block=6001x1 Type=Int16, ColorInterp=Gray
>  NoData Value=-32768
>
> After processing with val_rpl.py, gdalmerge quits with an error and
> gdalinfo
> reports:
> Size is 6001, 6001
> Coordinate System is `'
> Image Structure Metadata:
>  INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (    0.0,    0.0)
> Lower Left  (    0.0, 6001.0)
> Upper Right ( 6001.0,    0.0)
> Lower Right ( 6001.0, 6001.0)
> Center      ( 3000.5, 3000.5)
> Band 1 Block=6001x1 Type=Int16, ColorInterp=Gray
>
> What did I miss this time?
>
> Nop
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Handling-nodata-values-tp5222453p5224918.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100626/fb8492cd/attachment.html


More information about the gdal-dev mailing list