[postgis-tickets] [PostGIS] #3431: Problems buffering the output of ST_Segmentize

PostGIS trac at osgeo.org
Fri Jan 15 17:43:31 PST 2016


#3431: Problems buffering the output of ST_Segmentize
---------------------+---------------------------
 Reporter:  johnjcz  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 2.2.2
Component:  postgis  |    Version:  2.1.x
 Keywords:           |
---------------------+---------------------------
 I am running into an issue where I cannot buffer the output of
 {{{ST_Segmentize(geography)}}}. For example, this query...

 {{{
 SELECT ST_Buffer(ST_Segmentize('LINESTRING(-88 45,-90 43)'::geography,
 1000), 1);
 }}}

 Results in this error:

 {{{
 ERROR:  transform: couldn't project point (-88 45 0): latitude or
 longitude exceeded limits (-14)
 CONTEXT:  SQL function "st_buffer" statement 1
 Query failed
 PostgreSQL said: transform: couldn't project point (-88 45 0): latitude or
 longitude exceeded limits (-14)
 }}}

 However, if you explicitly case the output of ST_Segmentize to a geometry,
 and then back to a geography, it works as expected:

 {{{
 SELECT ST_Buffer((ST_Segmentize('LINESTRING(-88 45,-90 43)'::geography,
 1000)::geometry)::geography, 1);
 }}}


 Also, interestingly the first query works as expected when the first
 longitude <= -115:

 {{{
 SELECT ST_Buffer(ST_Segmentize('LINESTRING(-120 45,-90 43)'::geography,
 1000), 1);
 }}}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3431>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list