<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Monaco;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.apple-tab-span
{mso-style-name:apple-tab-span;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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 <a href="http://postgis.net/docs/RT_ST_Transform.html">http://postgis.net/docs/RT_ST_Transform.html</a>)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hugues.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De :</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> postgis-users-bounces@lists.osgeo.org [mailto:postgis-users-bounces@lists.osgeo.org] <b>De la part de</b> Jason Mathis<br><b>Envoyé :</b> jeudi 29 mai 2014 20:45<br><b>À :</b> postgis-users@lists.osgeo.org<br><b>Objet :</b> [postgis-users] ERROR: rt_raster_from_two_rasters:<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>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. <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>thanks,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>jason<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>query>>><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><div><p class=MsoNormal><span class=apple-tab-span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>SELECT<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <span class=apple-tab-span> </span>report_id, incident_id, <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <span class=apple-tab-span> </span>ST_SummaryStats(<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <span class=apple-tab-span> </span>ST_UNION(<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <span class=apple-tab-span> </span>ST_Clip(c.rast, 1, <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <span class=apple-tab-span> </span>ST_Transform(w.geom, 5070), true)<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <span class=apple-tab-span> </span>),<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <span class=apple-tab-span> </span>1<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <span class=apple-tab-span> </span>) as hdesc<o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>FROM rasters c<o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>JOIN w_reports w <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <span class=apple-tab-span> </span>ON ST_Intersects(c.rast, ST_Transform(w.geom, 5070)) <o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>where w.incident_id = 5443 <o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>group by incident_id, report_id<o:p></o:p></span></p></div></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>error>>><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p style='margin:0cm;margin-bottom:.0001pt'><span class=apple-tab-span><span style='font-size:9.0pt;font-family:"Monaco","serif"'> </span></span><span style='font-size:9.0pt;font-family:"Monaco","serif"'>ERROR: rt_raster_from_two_rasters: The two rasters provided do not have the same alignment<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;min-height: 16px'><span style='font-size:9.0pt;font-family:"Monaco","serif"'><o:p> </o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span class=apple-tab-span><span style='font-size:9.0pt;font-family:"Monaco","serif"'> </span></span><span style='font-size:9.0pt;font-family:"Monaco","serif"'>********** Error **********<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;min-height: 16px'><span style='font-size:9.0pt;font-family:"Monaco","serif"'><o:p> </o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span class=apple-tab-span><span style='font-size:9.0pt;font-family:"Monaco","serif"'> </span></span><span style='font-size:9.0pt;font-family:"Monaco","serif"'>ERROR: rt_raster_from_two_rasters: The two rasters provided do not have the same alignment<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span class=apple-tab-span><span style='font-size:9.0pt;font-family:"Monaco","serif"'> </span></span><span style='font-size:9.0pt;font-family:"Monaco","serif"'>SQL state: XX000<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'><o:p> </o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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.</span><o:p></o:p></p></div></body></html>