mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-24 00:52:40 +00:00
#2145, ST_Segmentize(geography, dist) fails with redundant coordinates
git-svn-id: http://svn.osgeo.org/postgis/trunk@10820 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
b6117968e6
commit
4fee20abd3
|
@ -1540,7 +1540,13 @@ ptarray_segmentize_sphere(const POINTARRAY *pa_in, double max_seg_length)
|
|||
|
||||
/* Skip duplicate points (except in case of 2-point lines!) */
|
||||
if ( (pa_in->npoints > 2) && p4d_same(&p1, &p2) )
|
||||
{
|
||||
/* Move one offset forward */
|
||||
p1 = p2;
|
||||
g1 = g2;
|
||||
pa_in_offset++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* How long is this edge? */
|
||||
d = sphere_distance(&g1, &g2);
|
||||
|
|
|
@ -804,5 +804,9 @@ SELECT '#2117', ST_AsEWKT(ST_PointOnSurface('SRID=3395;MULTIPOLYGON M EMPTY'::ge
|
|||
|
||||
SELECT '#2130', ST_NPoints(ST_GeomFromGeoJSON('{"type":"MultiPolygon","coordinates":[[[[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,32],[-117,32],[-117,32],[-117,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-117,32],[-117,32],[-117,32],[-117,32]],[[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,32],[-117,33]]]]}'));
|
||||
|
||||
SELECT '#2145',
|
||||
round(ST_Length(St_Segmentize(ST_GeographyFromText('LINESTRING(-89.3000030518 28.2000007629,-89.1999969482 89.1999969482,-89.1999969482 89.1999969482)'), 10000))::numeric,0);
|
||||
|
||||
|
||||
-- Clean up
|
||||
DELETE FROM spatial_ref_sys;
|
||||
|
|
|
@ -236,3 +236,4 @@ ERROR: invalid GML representation
|
|||
#2108|SRID=3395;POINTM EMPTY
|
||||
#2117|SRID=3395;POINTM EMPTY
|
||||
#2130|8
|
||||
#2145|6792004
|
||||
|
|
Loading…
Reference in a new issue