[postgis-devel] ST_MapAlgebraExpr: Wrong output for Y-data with 'UNION'

Paragon Corporation lr at pcorp.us
Tue Nov 22 12:20:48 PST 2011


Tom -- in case you didn't notice -- we put out a new build this morning.

http://www.postgis.org/download/windows/experimental.php#PostGIS_2_0_0  

-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of Tom van
Tilburg
Sent: Tuesday, November 22, 2011 4:01 AM
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] ST_MapAlgebraExpr: Wrong output for Y-data with
'UNION'

Would be great to have a windows build for r8215.
Is that possible?

TIA,
  Tom

On 21-11-2011 20:20, dustymugs wrote:
> On 11/21/2011 04:00 AM, Tom van Tilburg wrote:
>> Hi List,
>>
>> Can someone confirm wether I'm doing this wrong or the 
>> ST_MapAlgebraExpr is doing it wrong:
>> I have two overlapping rasters that I want to add to eachother. The 
>> non-overlapping parts should be included as well and therefore I use 
>> 'UNION' in the ST_MapalgebraExpr function.
>>
>> This is my code:
>> ====================
>> WITH sub as(
>> SELECT
>> raster1.rast As rast1,
>> raster2.rast As rast2,
>> ST_MapAlgebraExpr(
>> raster1.rast, 1,
>> raster2.rast, 1,
>> 'rast1 + rast2'::text, NULL::text, 'UNION'::text, 'rast2'::text, 
>> 'rast1'::text, NULL::Double precision
>> ) As rast3
>> FROM
>> raster1 ,raster2
>> )
>>
>> SELECT
>> ST_Ymin(St_Envelope(rast1)),
>> ST_Ymax(St_Envelope(rast1)),
>> ST_Ymin(St_Envelope(rast2)),
>> ST_Ymax(St_Envelope(rast2)),
>> ST_Ymin(St_Envelope(rast3)),
>> ST_Ymax(St_Envelope(rast3))
>> FROM sub
>> ;
>> =========================
>> Result:
>> Rast1 Ymin/Ymax
>> 443752.035; 456237.035;
>> Rast2 Ymin/Ymax
>> 446707.035; 456242.035;
>> Union Ymin/Ymax
>> 443747.035; 456237.035
>>
>> Whereas the expected output would be:
>> Union Ymin/Ymax
>> 443752.035;456242.035
>>
>> (The X-data is outputting correctly).
>>
>> Regards,
>> Tom
>
> Tom,
>
> Can you try r8215.  I believe it has been resolved.  The calculation 
> for the upper-left corner in the UNION case was invalid.
>
> -bborie
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel

_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel





More information about the postgis-devel mailing list