That's what I usually do.  I just convert my file to AAIGrid and use sed
to replace the nodata to a value I like J

 

Bob

 

Bob Moskovitz

Seismic Hazards Mapping Program

California Geological Survey

 

CONFIDENTIALITY NOTICE: This communication is intended only for the use
of the individual or entity to which it is addressed. This message
contains information from the State of California, California Geological
Survey, which may be privileged, confidential and exempt from disclosure
under applicable law, including the Electronic Communications Privacy
Act. If the reader of this communication is not the intended recipient,
you are hereby notified that any dissemination, distribution, or copying
of this communication is strictly prohibited.

 

 

 

From: G. Allegri [mailto:[email protected]] 
Sent: Monday, October 31, 2011 11:34 AM
To: Moskovitz, Bob
Cc: [email protected]
Subject: Re: [gdal-dev] problems with calculations with very small
numbers (nearzero)

 

Ops, you're right Bob. So the problem is the huge negative value... So
the problem is how to substitute it, maybe with a more treatable value
outside my raster range...

 

giovanni

 

 

 

2011/10/31 Moskovitz, Bob <[email protected]>

Hi Giovanni,

 

I've seen -3.4028234663852886e+038 (which is a huge negative value.
Your minds eye probably saw a "-" instead of "+")  as a nodata value.

 

Regards,

Bob

 

Bob Moskovitz

Seismic Hazards Mapping Program

California Geological Survey

 

CONFIDENTIALITY NOTICE: This communication is intended only for the use
of the individual or entity to which it is addressed. This message
contains information from the State of California, California Geological
Survey, which may be privileged, confidential and exempt from disclosure
under applicable law, including the Electronic Communications Privacy
Act. If the reader of this communication is not the intended recipient,
you are hereby notified that any dissemination, distribution, or copying
of this communication is strictly prohibited.

 

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of G. Allegri
Sent: Monday, October 31, 2011 11:19 AM
To: [email protected]
Subject: [gdal-dev] problems with calculations with very small numbers
(nearzero)

 

Hi, 

I'm having some troubles with raster algebra on a raster with very small
(near zero, but not).

I'm using numpy (through python gdal) to do a multiplication, eg
numpy.multiply(rasterarr,2), but I obtain the following raster stats:
http://pastebin.com/hHiUrWwD.

 

I suppose that -3.4028234663852886e+038 values are causing the problems,
and I wonder wha'ts the best way to deal with these kind of values...
Maybe rounding them to zeros?

I've tried to do it using the LUT tag inside a VRT dataset, but it
doesn't seem to do the job.

 

giovanni

 

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to