<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 7, 2017, at 1:49 PM, Björn Harrtell <<a href="mailto:bjorn.harrtell@gmail.com" class="">bjorn.harrtell@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Most annoying agitation! Because it's backed with sound reasoning and clear improvement to current state.<div class=""><br class=""></div><div class="">So, I'm open to make these changes. It's now or never right.</div><div class=""><br class=""></div><div class="">However, one limiting factor is that I'm fairly certain aggregate functions do not support the DEFAULT keyword for parameters (affecting ST_AsMVT).</div></div></div></blockquote><div><br class=""></div><div>Damn.</div><div><br class=""></div><div>You seem to be right. The raster aggregates show the pattern of multiple agg definitions to support different parameter patterns, and extra transfns for each pattern. That’s probably required so that the back-end can match up the parameters of the aggregate to the parameters of the transfn to use the correct one. </div><div><br class=""></div><div>So the goal of having simpler userland signatures for the aggregates runs into causing a much uglier situation in the set-up scripts. The C code can probably remain simple, but it then looks much as it does now, with checks for NULL parameters and use of defaults in those cases.</div><div><br class=""></div><div>I’m still kind of in favour of it, since a clean userland is nice. On the other hand, folks using these kinds of functions are probably using them in software (mapnik, geoserver, etc), not by hand, so they’ll write one (ugly) query once, then never look at it again.</div><div><br class=""></div><div>Arguments pro and con?</div><div><br class=""></div><div>P</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">/Björn<br class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-09-07 22:39 GMT+02:00 Paul Ramsey <span dir="ltr" class=""><<a href="mailto:pramsey@cleverelephant.ca" target="_blank" class="">pramsey@cleverelephant.ca</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="">Actually, no, I’d like to see signature changes… in particular, <div class=""><br class=""></div><div class="">bytea ST_AsMVT(text layer_<wbr class="">name, anyelement row, int4 extent default 4096, text geom_name default NULL);</div><div class="">geometry ST_AsMVTGeom(<wbr class="">geometry geom, box2d bounds, int4 extent default 4096, int4 buffer default 0, bool clip_geom default true);<br class="">bytea ST_AsGeobuf(anyelement <wbr class="">row, text geom_name default NULL);</div><div class=""><br class="">Then the presence of (geom_name == NULL) implies “automagically use the first geometry you find”</div><div class="">And the null checks on extent, buffer, clip_geom can be dropped since PgSQL will automatically in-fill the defaults</div><div class=""><br class=""></div><div class="">You don’t have to do the above, I’m just agitating for it.</div><div class="">Agitate, agitate.</div><span class="gmail-HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">P.<br class=""><br class=""></div></font></span><div class=""><div class="gmail-h5"><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 7, 2017, at 1:34 PM, Björn Harrtell <<a href="mailto:bjorn.harrtell@gmail.com" target="_blank" class="">bjorn.harrtell@gmail.com</a>> wrote:</div><br class="gmail-m_-2507188723144682639Apple-interchange-newline"><div class=""><div dir="ltr" class="">So we are agreed that there will be no signature change? Instead I will work towards an implementation and documentation change for geom_name to the following:<div class=""><br class=""></div><div class="">"geom_name is the name of the geometry column in the row data. If NULL it will default to use the first geometry column in the row data."</div><div class=""><div class=""><div class=""><br class=""></div><div class="">/Björn<br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-09-07 21:08 GMT+02:00 Paul Ramsey <span dir="ltr" class=""><<a href="mailto:pramsey@cleverelephant.ca" target="_blank" class="">pramsey@cleverelephant.ca</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class="">Yes, take the first one unless the geom_name is provided. So geom_name would default to NULL and NULL would mean “the first one you find"</div><span class="gmail-m_-2507188723144682639gmail-HOEnZb"><font color="#888888" class=""><div class="">P</div></font></span><div class=""><div class="gmail-m_-2507188723144682639gmail-h5"><div class=""><br class=""></div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 7, 2017, at 12:06 PM, Regina Obe <<a href="mailto:lr@pcorp.us" target="_blank" class="">lr@pcorp.us</a>> wrote:</div><br class="gmail-m_-2507188723144682639gmail-m_-131321399945203073Apple-interchange-newline"><div class=""><div class="gmail-m_-2507188723144682639gmail-m_-131321399945203073WordSection1" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Just to add to this to make sure I'm following:<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">For this question:<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class="">> Also, a bit late in the day, but why the text parameter "geom_name" in these various signatures, instead of automagically finding it in the row?<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class="">> ?<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class="">> P<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class="">Is it ever possible that an MVT row could have more than one geometry column. I assume so. If so I think it might be good to keep the geom_name field though perhaps make it a default option and in that case it picks the first one it finds. Similar to how we do pgsql2shp where you can explicitly set the geometry column or have pgsql2shp do it's thing and just pick the first one it finds.<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class="">Thanks,<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class="">Regina<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div class=""><div style="border-style:solid none none;border-top-color:rgb(225,225,225);border-top-width:1pt;padding:3pt 0in 0in" class=""><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><b class=""><span style="font-size:11pt;font-family:Calibri,sans-serif" class="">From:</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif" class=""><span class="gmail-m_-2507188723144682639gmail-m_-131321399945203073Apple-converted-space"> </span>Regina Obe [<a href="mailto:lr@pcorp.us" style="color:purple;text-decoration:underline" target="_blank" class="">mailto:lr@pcorp.us</a>]<span class="gmail-m_-2507188723144682639gmail-m_-131321399945203073Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="gmail-m_-2507188723144682639gmail-m_-131321399945203073Apple-converted-space"> </span>Thursday, September 07, 2017 2:57 PM<br class=""><b class="">To:</b><span class="gmail-m_-2507188723144682639gmail-m_-131321399945203073Apple-converted-space"> </span>'PostGIS Development Discussion' <<a href="mailto:postgis-devel@lists.osgeo.org" style="color:purple;text-decoration:underline" target="_blank" class="">postgis-devel@lists.osgeo.org</a><wbr class="">>; 'Björn Harrtell' <<a href="mailto:bjorn@wololo.org" style="color:purple;text-decoration:underline" target="_blank" class="">bjorn@wololo.org</a>><br class=""><b class="">Cc:</b><span class="gmail-m_-2507188723144682639gmail-m_-131321399945203073Apple-converted-space"> </span>'Paul Ramsey' <<a href="mailto:pramsey@cleverelephant.ca" style="color:purple;text-decoration:underline" target="_blank" class="">pramsey@cleverelephant.ca</a>><br class=""><b class="">Subject:</b><span class="gmail-m_-2507188723144682639gmail-m_-131321399945203073Apple-converted-space"> </span>RE: [postgis-devel] geom_name<u class=""></u><u class=""></u></span></div></div></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div><div class=""><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(31,73,125)" class="">><span class="gmail-m_-2507188723144682639gmail-m_-131321399945203073Apple-converted-space"> </span></span>We should ask about API changing, I'm sure Regina would say we're done, which effectively means done-for-all-time, since changing public function signatures is basically impossible one they are done.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><br class=""><span style="color:rgb(31,73,125)" class="">><span class="gmail-m_-2507188723144682639gmail-m_-131321399945203073Apple-converted-space"> </span></span>P<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">I'm fine with you changing the API now before final 2.4.0 release. I promised no new functions, not no new API changes to new 2.4 functions.<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">I think it would be good to drop the old signature in the postgis_drop_before.sql since some people have already started using the MVT functions.<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">If it impacts existing code, we should also put in BREAKING CHANGE for postgis -2.4.0 the change so people are warned and know how to change their code if they were using an earlier postgis 2.4.0dev<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Thanks,<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Regina<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class="">On Thu, Sep 7, 2017 at 10:45 AM, Björn Harrtell <<a href="mailto:bjorn.harrtell@gmail.com" style="color:purple;text-decoration:underline" target="_blank" class="">bjorn.harrtell@gmail.com</a>> wrote:<u class=""></u><u class=""></u></div><blockquote style="border-style:none none none solid;border-left-color:rgb(204,204,204);border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt" type="cite" class=""><div class=""><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class="">Hi Paul,<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class="">No good reason except that I couldn't find out a deterministic way to find it and put it out of my mind after that. :(<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class="">With some guidance I'll be happy to revise the API if it's not too late at this point.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class=""><u class=""></u> <u class=""></u></span></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class="">/Björn<u class=""></u><u class=""></u></span></div></div><div class=""><div class=""><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class="">2017-09-07 19:41 GMT+02:00 Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca" style="color:purple;text-decoration:underline" target="_blank" class="">pramsey@cleverelephant.ca</a>>:<u class=""></u><u class=""></u></div><blockquote style="border-style:none none none solid;border-left-color:rgb(204,204,204);border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt" type="cite" class=""><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class="">Also, a bit late in the day, but why the text parameter "geom_name" in these various signatures, instead of automagically finding it in the row?<u class=""></u><u class=""></u></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class="">?<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt 1in;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="color:rgb(136,136,136)" class="">P</span></div></div></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></div></div>
</div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div></div></div></div>
</div></blockquote></div><br class=""></body></html>