<div dir="ltr">It was from a post on the PostGIS User Discussion that I made last year from Pierre Racine:<div><br></div><div><a href="http://lists.osgeo.org/pipermail/postgis-users/2013-August/037514.html">http://lists.osgeo.org/pipermail/postgis-users/2013-August/037514.html</a><br>
</div><div><br></div><div>Is it possible to get this functionality working with PostGIS 2.1?</div><div><br></div><div>Thanks,</div><div>Hailey</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 9:33 AM, Bborie Park <span dir="ltr"><<a href="mailto:dustymugs@gmail.com" target="_blank">dustymugs@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">PostGIS 2.1 does not have the data type summarystats. Where did you get this function?</p>
<p dir="ltr">PostGIS 2.2 (in development now) does have that data type though for a built in ST_SummaryStatsAgg function.</p><span class="HOEnZb"><font color="#888888">
<p dir="ltr">-bborie</p></font></span><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Jan 31, 2014 9:23 AM, "Hailey Eckstrand" <<a href="mailto:haileyeckstrand@gmail.com" target="_blank">haileyeckstrand@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi bborie,<div><br><div>After changing it from 'SQL' to 'sql' this is the error: </div><div><br></div><div>$psql mydb -f ST_SummaryStatsAgg.sql</div><div><br></div><div>psql:ST_SummaryStatsAgg.sql:50: ERROR: type summarystats does not exist</div>
<div>psql:ST_SummaryStatsAgg.sql:56: ERROR: type summarystats does not exist</div><div>psql:ST_SummaryStatsAgg.sql:77: ERROR: type summarystats does not exist</div><div>psql:ST_SummaryStatsAgg.sql:86: ERROR: type "summarystats" does not exist</div>
<div>psql:ST_SummaryStatsAgg.sql:92: ERROR: type "summarystats" does not exist</div><div>CREATE FUNCTION</div><div>psql:ST_SummaryStatsAgg.sql:121: ERROR: function st_summarystatsagg(raster) does not exist</div>
<div>LINE 8: FROM (SELECT ST_SummaryStatsAgg(rast) as ss, id</div><div> ^</div><div>HINT: No function matches the given name and argument types. You might need to add explicit type casts.</div><div><br>
</div><div><br></div><div>Does PostgreSQL 9.3 still have the data type summarystats? Also, the function that ST_SummaryStatsAgg.sql relies on, ST_SummaryStats.sql, has it remained the same?</div><div><br></div><div>Thanks,</div>
<div>Hailey</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 6:53 AM, Bborie Park <span dir="ltr"><<a href="mailto:dustymugs@gmail.com" target="_blank">dustymugs@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Can you change line 56 of that code from ...<div>
<br></div>$$ LANGUAGE 'SQL';<div><br></div><div>to</div><div><br></div><div>$$ LANGUAGE 'sql';<br></div><div><br></div><div>I believe PostgreSQL 9.3 (maybe 9.2) became case-sensitive with regards to the language.</div>
<div><br></div><div>-bborie</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Thu, Jan 30, 2014 at 4:41 PM, Hailey Eckstrand <span dir="ltr"><<a href="mailto:haileyeckstrand@gmail.com" target="_blank">haileyeckstrand@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr">Hello,<div>
I've got a new sandbox (Ubuntu 12.04) with a fresh install on PostgreSQL 9.3 and the following for PostGIS version:</div>
<div><div> postgis_full_version</div>
<div>-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div> POSTGIS="2.1.1 r12113" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER</div>
<div>(1 row)</div></div><div><br></div><div><br></div><div>I just ran into a problem where I tried to run ST_SummaryStatsAgg on a raster for a polygon and ended up with an error. I thought it was b/c I did not have the function loaded, so when I tried to load the function ST_SummaryStatsAgg.sql, I got the following errors:</div>
<div><br></div><div><div>psql:ST_SummaryStatsAgg.sql:50: ERROR: type summarystats does not exist</div><div>psql:ST_SummaryStatsAgg.sql:56: ERROR: language "SQL" does not exist</div><div>psql:ST_SummaryStatsAgg.sql:77: ERROR: type summarystats does not exist</div>
<div>psql:ST_SummaryStatsAgg.sql:86: ERROR: type "summarystats" does not exist</div><div>psql:ST_SummaryStatsAgg.sql:92: ERROR: type "summarystats" does not exist</div><div>CREATE FUNCTION</div><div>
psql:ST_SummaryStatsAgg.sql:121: ERROR: function st_summarystatsagg(raster) does not exist</div><div>LINE 8: FROM (SELECT ST_SummaryStatsAgg(rast) as ss, id</div><div> ^</div><div>HINT: No function matches the given name and argument types. You might need to add explicit type casts.</div>
</div><div><br></div><div>Here is the current ST_SummaryStatsAgg that I am trying to load:</div><div><br></div><div><a href="http://hastebin.com/lujenosaro.pas" target="_blank">http://hastebin.com/lujenosaro.pas</a><br></div>
<div><br></div>
<div>Thanks!</div><span><font color="#888888"><div><br></div><div>Hailey</div></font></span></div>
<br></div></div>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div>
</div></div><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>