Opened 8 years ago

Closed 8 years ago

#3431 closed defect (worksforme)

Problems buffering the output of ST_Segmentize

Reported by: johnjcz Owned by: pramsey
Priority: medium Milestone: PostGIS 2.2.2
Component: postgis Version: 2.1.x
Keywords: Cc:

Description

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);

Change History (2)

comment:1 by robe, 8 years ago

johnjcz, I'm not getting an error and I'm running:

POSTGIS="2.2.1 r14555" GEOS="3.5.0-CAPI-1.9.0 r4090" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.0.1, released 2015/09/15" LIBXML="2.7.8" LIBJSON="0.12" RASTER

Can you run:

SELECT postgis_full_version();

and give us the output for that. There was a bug fix done on ST_Segmentize #3355 for 2.2.1 release which may have fixed this issue and explains why I'm not getting it.

comment:2 by robe, 8 years ago

Resolution: worksforme
Status: newclosed

Going to close this out since I can't replicated with latest micro.

Note: See TracTickets for help on using tickets.