I can transform maps to float or DCELL with both the Brovey and PCA methods. 
However, this doesn't seem possible with the IHS method. i.rgb.ihs outputs CELL 
maps even if the inputs are float. Any suggestions?

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice:  480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu











On Jan 31, 2013, at 1:31 PM, Eric Goddard 
<[email protected]<mailto:[email protected]>> wrote:

I don't think that is the issue. I wasn't using serial processing, and I was 
using the IHS method. The only place division occurs in the IHS method is in 
the histmatch function, but that explicitly casts to float.


On Thu, Jan 31, 2013 at 1:52 PM, Markus Metz 
<[email protected]<mailto:[email protected]>> wrote:
On Thu, Jan 31, 2013 at 7:06 PM, Michael Barton 
<[email protected]<mailto:[email protected]>> wrote:
>
> i.pansharpen uses Python, not Bash. So it is not an integer math problem.

But it calls r.mapcalc, e.g. in lines 151-153. If k is integer and not
float, r.mapcalc will do integer division. Equivalent for lines 159,
162, 165. This could be fixed by casting the numerator to double with
double().

Markus M

>
> However, you might try changing your input maps to float or DCELL. See if 
> that changes things.
>
> Michael
> ______________________________
> C. Michael Barton
> Director, Center for Social Dynamics & Complexity
> Professor of Anthropology, School of Human Evolution & Social Change
> Arizona State University
> Tempe, AZ  85287-2402
> USA
>
> voice:  480-965-6262<tel:480-965-6262> (SHESC), 
> 480-727-9746<tel:480-727-9746> (CSDC)
> fax:          480-965-7671<tel:480-965-7671>(SHESC), 
> 480-727-0709<tel:480-727-0709> (CSDC)
> www:  http://csdc.asu.edu<http://csdc.asu.edu/>, 
> http://shesc.asu.edu<http://shesc.asu.edu/>
> http://www.public.asu.edu/~cmbarton
>
> On Jan 31, 2013, at 2:11 AM, 
> <[email protected]<mailto:[email protected]>>
>  wrote:
>
> From: Yann Chemin <[email protected]<mailto:[email protected]>>
> Subject: Re: [GRASS-user] unexpected i.pansharpen results
> Date: January 31, 2013 2:11:33 AM MST
> To: Hamish <[email protected]<mailto:[email protected]>>
> Cc: GRASS user list 
> <[email protected]<mailto:[email protected]>>
>
>
> hmmm, yes that looks like an old friend to check...
>
>
> On 31 January 2013 14:06, Hamish 
> <[email protected]<mailto:[email protected]>> wrote:
>>
>> (sorry for the html,top posting)
>>
>> I wonder if the script is doing integer division when it should be doing 
>> floating point division?
>>
>> http://trac.osgeo.org/grass/browser/grass/trunk/scripts/i.pansharpen/i.pansharpen.py
>>
>>
>> Hamish
>>
>> --- On Wed, 1/30/13, Eric Goddard 
>> <[email protected]<mailto:[email protected]>> wrote:
>>
>>
>> From: Eric Goddard <[email protected]<mailto:[email protected]>>
>> Subject: [GRASS-user] unexpected i.pansharpen results
>> To: [email protected]<mailto:[email protected]>
>> Date: Wednesday, January 30, 2013, 8:30 AM
>>
>>
>> Hi all,
>>
>> I'm attempting to pansharpen some ikonos imagery using the i.pansharpen tool 
>> in Grass7 on windows 7 installed via OSGeo4W (r54756-478).  The range for 
>> the sharpened red, green, and blue outputs are 0-30, which seems suspicious 
>> given the 16bit range of the input bands. The command I used was:
>>
>> i.pansharpen.py<http://i.pansharpen.py/> "sharpen=ihs" "ms3=ik_mss.4@eric" 
>> "ms2=ik_mss.3@eric" "ms1=ik_mss.2@eric" "pan=ik_pan@eric" 
>> "output_prefix=ik_ihs"
>>
>> The input bands are linked via r.external, would that matter?
>>
>> The output from my test area is below. Any assistance would be greatly 
>> appreciated.<image.png>
>>
>>
>> Thanks,
>> Eric
>>
>> -----Inline Attachment Follows-----
>>
>> _______________________________________________
>> grass-user mailing list
>> [email protected]<mailto:[email protected]>
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
> _______________________________________________
> grass-user mailing list
> [email protected]<mailto:[email protected]>
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
_______________________________________________
grass-user mailing list
[email protected]<mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/grass-user


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

Reply via email to