[postgis-users] Equality operator for type box2d

Kuien Liu kliu at pivotal.io
Tue Apr 21 02:54:07 PDT 2015


Another case:
gis=# SELECT pg_typeof(ST_Extent(the_geom))='box2d'::regtype FROM test
WHERE num < 10;
 ?column?
----------
 t
(1 row)

Cheers,
Kuien Liu

On Tue, Apr 21, 2015 at 5:50 PM, Kuien Liu <kliu at pivotal.io> wrote:

> I'm not sure I understand what your query really looks like, but I can run
> query below.
>
> gis=# SELECT ST_GeometryType(ST_Extent(the_geom))='ST_Polygon' FROM test
> WHERE num < 10;
>  ?column?
> ----------
>  true
> (1 row)
>
> where the table 'test' contains 50,000 points.
>
> Wish this helps to you.
>
> Cheers,
> Kuien Liu
>
> On Tue, Apr 21, 2015 at 4:58 PM, Nick Ves <vesnikos at gmail.com> wrote:
>
>> I was playing with the ST_Extent today and I wanted to try a query like
>> this:
>>
>> select distinct ST_Extent(geom)  over () box from parcels_test
>>
>> where the geom is Type ST_Polygon but I got this error instead:
>>
>>   ERROR:  could not identify an equality operator for type box2d
>>
>> The aim was to get the BBox from a set of polygons that might or might
>> not be adjutant. Ofc you can get the same results by limit the result
>> to 1 but, it hitted me strange box2d type not having an equal operator
>>
>> using "POSTGIS="2.1.4 r12966" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel.
>> 4.8.0, 6 March 2012" GDAL="GDAL 1.11.1, released 2014/09/24"
>> LIBXML="2.9.1" LIBJSON="UNKNOWN" RASTER"
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150421/e80c095e/attachment.html>


More information about the postgis-users mailing list