In particular, these ones are used by the casts.

-- Availability: 1.2.2
CREATEFUNCTION ST_geometry(box2d)
        RETURNS geometry
        AS '@MODULE_FILENAME@','BOX2DFLOAT4_to_LWGEOM'
        LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);

-- Availability: 1.2.2
CREATEFUNCTION ST_geometry(box3d)
        RETURNS geometry
        AS '@MODULE_FILENAME@','BOX3D_to_LWGEOM'
        LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);

Paul Ramsey wrote:
Charlie Savage wrote:

As an aside, its not obvious to me how to actually fix this bug. Somehow the conversion from Box2D/Box3D to geometry needs to figure out if the bbox has 0 width and/or 0 height and if so create a Point instead of a Polygon.

The problem will live in the function that casts from Box* to GEOMETRY. PostgreSQL does automatic casting, so

Extent(GEOMETRY) return BOX*
Centroid(GEOMETRY) returns GEOMETRY

PostgreSQL will rewrite Centroid(Extent()) to Centroid(Box2Geom(Extent())

P.




--

  Paul Ramsey
  Refractions Research
  http://www.refractions.net
  [EMAIL PROTECTED]
  Phone: 250-383-3022
  Cell: 250-885-0632
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to