Well I appreciate your response I don’t think this is what I am clocking for. 
Correct me if I am wrong. 

I am reprojecting the vectors (4326) to match the raster (5070). So I am still 
confused why i sometimes get the error and other times I do not. 

Thanks!   


On May 30, 2014 at 2:12:35 AM, Hugues François ([email protected]) 
wrote:

Hi,

 

When you reproject rasters, pixels from different tiles may not have the same 
alignment and union is not possible. Since version 2.1 you may give a reference 
raster to get the right alignment (see variant 3 here 
http://postgis.net/docs/RT_ST_Transform.html)

 

Hugues.

 

De : [email protected] 
[mailto:[email protected]] De la part de Jason Mathis
Envoyé : jeudi 29 mai 2014 20:45
À : [email protected]
Objet : [postgis-users] ERROR: rt_raster_from_two_rasters:

 

I loaded a bunch raster data into separate tables. One for each us western 
state. I thought it maybe handy to query a view instead of the individual 
tables. Anyways everything seemed ok but I started to get errors on a few ids I 
was testing. I knew what table it should be pulling from so I queried the table 
and no issues. So i must assume the error is because of the “union all” in the 
view. Can anyone confirm this and why? I am on postgres 9.2.8 and postgis 
2.1.2. 

 

thanks,

jason

 

query>>>

 

            SELECT

            report_id, incident_id, 

            ST_SummaryStats(

            ST_UNION(

                        ST_Clip(c.rast, 1, 

                        ST_Transform(w.geom, 5070), true)

            ),

            1

            ) as hdesc

            FROM rasters c

            JOIN w_reports w 

            ON ST_Intersects(c.rast, ST_Transform(w.geom, 5070))  

            where w.incident_id = 5443 

            group by incident_id, report_id

 

error>>>

 

       ERROR:  rt_raster_from_two_rasters: The two rasters provided do not have 
the same alignment
 
       ********** Error **********
 
       ERROR: rt_raster_from_two_rasters: The two rasters provided do not have 
the same alignment
       SQL state: XX000
 

 

 

 

 

 

 

 

This transmission contains confidential and privileged information intended 
solely for the party identified above. If you receive this message in error, 
you must not use it or convey it to others. Please destroy it immediately and 
contact the sender at (303) 386-3955 or by return e-mail to the sender.

_______________________________________________  
postgis-users mailing list  
[email protected]  
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
-- 
 

This transmission contains confidential and privileged information intended 
solely for the party identified above. If you receive this message in 
error, you must not use it or convey it to others. Please destroy it 
immediately and contact the sender at (303) 386-3955 or by return e-mail to 
the sender.
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to