[postgis-devel] [PostGIS] #263: Casting from geography to geometry Huh?
PostGIS
trac at osgeo.org
Sat Oct 10 11:07:17 PDT 2009
#263: Casting from geography to geometry Huh?
----------------------+-----------------------------------------------------
Reporter: robe | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: postgis 1.5.0
Component: postgis | Version:
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by robe):
Its a bounding box bug. Observe. I knew that ST_DropBBOx would come in
handy some day :).
{{{
SELECT ST_AsEWKT(geometry(geography(pt.the_geom))) As wkt,
ST_Covers(
ST_Transform(poly.the_geom,32611),
ST_Transform(pt.the_geom,32611)) As utm,
ST_Covers(
poly.the_geom,
pt.the_geom)
As pca,
_ST_Covers(ST_DropBBOX(geometry(geography(poly.the_geom))),
ST_DropBBOx(geometry(geography(pt.the_geom)))) As
gm_to_gg_gm_pca
FROM (SELECT ST_GeomFromEWKT('SRID=4326;POLYGON((-119.5434
34.9438,-119.5437 34.9445,-119.5452 34.9442,-119.5434 34.9438))') As
the_geom)
As poly
CROSS JOIN
(VALUES
( ST_GeomFromEWKT('SRID=4326;POINT(-119.5434 34.9438)') )
,
( ST_GeomFromEWKT('SRID=4326;POINT(-119.5452 34.9442)') )
,
( ST_GeomFromEWKT('SRID=4326;POINT(-119.5434 34.9438)') ),
( ST_GeomFromEWKT('SRID=4326;POINT(-119.5438 34.9443)') )
)
As pt(the_geom);
}}}
Results in:
{{{
wkt | utm | pca | gm_to_gg_gm_pca
-----------------------------------+-----+-----+-----------------
SRID=4326;POINT(-119.5434 34.9438) | t | t | t
SRID=4326;POINT(-119.5452 34.9442) | t | t | t
SRID=4326;POINT(-119.5434 34.9438) | t | t | t
SRID=4326;POINT(-119.5438 34.9443) | t | t | t
}}}
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/263#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS
More information about the postgis-devel
mailing list