[postgis-devel] [PostGIS] #257: Ability to cast from geography to geometry

PostGIS trac at osgeo.org
Sun Oct 4 15:24:44 PDT 2009


#257: Ability to cast from geography to geometry
--------------------------+-------------------------------------------------
  Reporter:  robe         |       Owner:  pramsey      
      Type:  enhancement  |      Status:  new          
  Priority:  medium       |   Milestone:  postgis 1.5.0
 Component:  postgis      |     Version:               
Resolution:               |    Keywords:               
--------------------------+-------------------------------------------------
Old description:

> Perhaps I missed this -- but how does one CAST from geography to geometry
> without going thru ST_AsText
>
> I can do this  geography(somegeometry)
>
> but no equivalent geometry(somegeography)
>
> and when I do this:  a.the_geog::geometry
> I get this:
> cannot cast type geography to geometry
>
> Also by the way your tests are failing again.
> {{{
> Suite: Geodetic Suite
>   Test: test_signum() ... passed
>   Test: test_gbox_from_spherical_coordinates() ... passed
>   Test: test_gserialized_get_gbox_geocentric() ... passed
>   Test: test_clairaut() ... passed
>   Test: test_edge_intersection() ... FAILED
>     1. cu_geodetic.c:353  - CU_ASSERT_EQUAL(rv,LW_TRUE)
>     2. cu_geodetic.c:361  - CU_ASSERT_EQUAL(rv,LW_TRUE)
>   Test: test_edge_distance_to_point() ... passed
>   Test: test_edge_distance_to_edge() ... passed
>   Test: test_lwgeom_distance_sphere() ... passed
>

>
> }}}

New description:

 Perhaps I missed this -- but how does one CAST from geography to geometry
 without going thru ST_AsText

 I can do this  geography(somegeometry)

 but no equivalent geometry(somegeography)

 and when I do this:  a.the_geog::geometry
 I get this:
 cannot cast type geography to geometry

Comment (by pramsey):

 I've removed the unrelated info from the ticket.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/257#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS


More information about the postgis-devel mailing list