<div dir="ltr">thanks, got it. Surely you may meet this issue, distinct cannot find the 'OPERATOR =' for data type 'box2d'.<div><br></div><div>PostGIS only supports 3 kinds of OPERATOR =, i.e.,</div><div><div><ol><li>OPERATOR =  (geometry,geometry)<br></li><li>OPERATOR =  (geography,geography)<br></li><li>OPERATOR =  (raster,raster)<br></li></ol></div><div>Maybe we can try these ways:</div><div><ol><li>cast box2d to geometry: <span style="font-size:12.8000001907349px">select distinct st_extent(the_geom)::geometry from test;</span><br></li><li><span style="font-size:12.8000001907349px">create ordering operator for box2d.</span></li></ol></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Cheers,<div>Kuien Liu</div></div></div></div>
<br><div class="gmail_quote">On Tue, Apr 21, 2015 at 6:06 PM, Nick Ves <span dir="ltr"><<a href="mailto:vesnikos@gmail.com" target="_blank">vesnikos@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Apr 21, 2015 at 12:50 PM, Kuien Liu <<a href="mailto:kliu@pivotal.io">kliu@pivotal.io</a>> wrote:<br>
> I'm not sure I understand what your query really looks like, but I can run<br>
> query below.<br>
<br>
</span>try this one:<br>
<br>
select distinct st_extent(the_geom) over () from test;<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> gis=# SELECT ST_GeometryType(ST_Extent(the_geom))='ST_Polygon' FROM test<br>
> WHERE num < 10;<br>
>  ?column?<br>
> ----------<br>
>  true<br>
> (1 row)<br>
><br>
> where the table 'test' contains 50,000 points.<br>
><br>
> Wish this helps to you.<br>
><br>
> Cheers,<br>
> Kuien Liu<br>
><br>
> On Tue, Apr 21, 2015 at 4:58 PM, Nick Ves <<a href="mailto:vesnikos@gmail.com">vesnikos@gmail.com</a>> wrote:<br>
>><br>
>> I was playing with the ST_Extent today and I wanted to try a query like<br>
>> this:<br>
>><br>
>> select distinct ST_Extent(geom)  over () box from parcels_test<br>
>><br>
>> where the geom is Type ST_Polygon but I got this error instead:<br>
>><br>
>>   ERROR:  could not identify an equality operator for type box2d<br>
>><br>
>> The aim was to get the BBox from a set of polygons that might or might<br>
>> not be adjutant. Ofc you can get the same results by limit the result<br>
>> to 1 but, it hitted me strange box2d type not having an equal operator<br>
>><br>
>> using "POSTGIS="2.1.4 r12966" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel.<br>
>> 4.8.0, 6 March 2012" GDAL="GDAL 1.11.1, released 2014/09/24"<br>
>> LIBXML="2.9.1" LIBJSON="UNKNOWN" RASTER"<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>
><br>
><br>
><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>
_______________________________________________<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>
</div></div></blockquote></div><br></div>