<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I hope this is the right place and approach to get support for my issue. Apologies if it isn’t.<o:p></o:p></p>
<p class="MsoNormal">Question also posted to the Gis reddit if I’m more likely to get help as replies on there (<a href="https://www.reddit.com/r/gis/comments/8dnsr2/could_a_more_experienced_giser_tell_me_why_i_get/">https://www.reddit.com/r/gis/comments/8dnsr2/could_a_more_experienced_giser_tell_me_why_i_get/</a>)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In PostGis I run the following query:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">    SELECT<o:p></o:p></p>
<p class="MsoNormal">      (ST_MetaData(ST_AddBand(ST_MakeEmptyRaster(1, 1, 2, 2, 10::FLOAT, 10::FLOAT, 0, 0), '1BB'))).*<o:p></o:p></p>
<p class="MsoNormal">    UNION ALL<o:p></o:p></p>
<p class="MsoNormal">    SELECT<o:p></o:p></p>
<p class="MsoNormal">      (ST_MetaData(ST_AsRaster(<o:p></o:p></p>
<p class="MsoNormal">          ST_MakeEnvelope(2, 2, 3, 3),<o:p></o:p></p>
<p class="MsoNormal">          0.5 :: FLOAT, 0.5 :: FLOAT,<o:p></o:p></p>
<p class="MsoNormal">          0, 0, '1BB', 1, 0, 0, 0, true<o:p></o:p></p>
<p class="MsoNormal">      ))).*<o:p></o:p></p>
<p class="MsoNormal">    UNION ALL<o:p></o:p></p>
<p class="MsoNormal">    SELECT<o:p></o:p></p>
<p class="MsoNormal">      (ST_MetaData(ST_AsRaster(<o:p></o:p></p>
<p class="MsoNormal">          ST_MakeEnvelope(2, 2, 3, 3),<o:p></o:p></p>
<p class="MsoNormal">          1 :: FLOAT, 1 :: FLOAT,<o:p></o:p></p>
<p class="MsoNormal">          0, 0, '1BB', 1, 0, 0, 0, true<o:p></o:p></p>
<p class="MsoNormal">      ))).*<o:p></o:p></p>
<p class="MsoNormal">    UNION ALL<o:p></o:p></p>
<p class="MsoNormal">    SELECT<o:p></o:p></p>
<p class="MsoNormal">      (ST_MetaData(ST_AsRaster(<o:p></o:p></p>
<p class="MsoNormal">          ST_MakeEnvelope(2, 2, 3, 3),<o:p></o:p></p>
<p class="MsoNormal">          10 :: FLOAT, 10 :: FLOAT,<o:p></o:p></p>
<p class="MsoNormal">          0, 0, '1BB', 1, 0, 0, 0, true<o:p></o:p></p>
<p class="MsoNormal">      ))).*<o:p></o:p></p>
<p class="MsoNormal">    ;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That gives me results:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">    upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy | srid | numbands<o:p></o:p></p>
<p class="MsoNormal">    -----------+------------+-------+--------+--------+--------+-------+-------+------+----------<o:p></o:p></p>
<p class="MsoNormal">             2 |          2 |     1 |      1 |     10 |     10 |     0 |     0 |    0 |        1<o:p></o:p></p>
<p class="MsoNormal">             2 |          2 |     2 |      2 |    0.5 |    0.5 |     0 |     0 |    0 |        1<o:p></o:p></p>
<p class="MsoNormal">             2 |          2 |     1 |      1 |      1 |      1 |     0 |     0 |    0 |        1<o:p></o:p></p>
<p class="MsoNormal">             0 |        -10 |     2 |      2 |     10 |     10 |     0 |     0 |    0 |        1<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What gets me is the final row. Why would the biggest pixel scale give a 2x2 raster?<o:p></o:p></p>
<p class="MsoNormal">If I dump the points I see<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">    {{NULL,NULL},{1,NULL}}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So it's created some null pixels for no reason that I understand.<o:p></o:p></p>
<p class="MsoNormal">Is this a bug? Could someone explain this behaviour for me?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><b><span style="font-size:12.0pt;line-height:106%;font-family:"Trebuchet MS",sans-serif;color:#004B8D">David Swain<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:10.0pt;line-height:106%;font-family:"Trebuchet MS",sans-serif;color:#6FABDD"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><a href="http://www.maruedr.com"><span style="font-size:16.0pt;line-height:106%;font-family:"Trebuchet MS",sans-serif;color:#6FABDD;text-decoration:none">maru</span><span style="font-size:16.0pt;line-height:106%;font-family:"Trebuchet MS",sans-serif;color:#A6A6A6;text-decoration:none">/</span><span style="font-size:16.0pt;line-height:106%;font-family:"Trebuchet MS",sans-serif;color:#646563;text-decoration:none">edr</span></a><span style="font-size:16.0pt;line-height:106%;font-family:"Trebuchet MS",sans-serif;color:#646563"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><b><span style="font-size:10.0pt;line-height:106%;font-family:"Trebuchet MS",sans-serif;color:#1899D6"><a href="https://www.linkedin.com/company-beta/202826/"><span style="color:#1899D6;font-weight:normal;text-decoration:none">Follow
 us on LinkedIn</span></a></span></b><span style="font-size:10.0pt;line-height:106%;color:#1899D6"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:gray">Direct Dial:  +44 (0) 1489779830<br>
Switchboard: +44 (0)1489 772920<br>
<br>
</span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:gray"><br>
The HUB | Berrywood Business Village | Southampton | SO30 2UN</span><o:p></o:p></p>
</div>
<p style="font-family:'Trebuchet MS',sans-serif;font-size:12px;color:#004b8d;line-height:1.2em">
<br>
<a href="http://www.maruedr.com">We give ambitious businesses like yours the confidence to put the Voice of the Customer at the heart of important business decisions, driving sustainable growth.</a><br>
</p>
<p></p>
<p style="font-family:'Trebuchet MS',sans-serif;font-size:10px;color:gray;line-height:1.2em">
*Email Confidentiality notice*. This email is private and confidential. If you have received this message in error, please notify us and remove it from your system. Any attachment(s) to this message have been checked for viruses, but please rely on your own
 virus checker and procedures.  Please note that email is not a secure communications medium. We advise that you understand and observe this when emailing us.
</p>
<p style="font-family:'Trebuchet MS',sans-serif;font-size: 10px; color:gray;line-height:1.2em">
Maru/edr is a private limited company registered at the Registrar Of Companies for England and Wales. Company registration number: 5424597
<br>
Registered Office: The HUB, Hedge End, Hampshire, SO30 2UN</p>
</body>
</html>