[geos-devel] [GEOS] #649: ST_Snap crashes on some inputs
GEOS
geos-trac at osgeo.org
Fri Aug 16 05:22:06 PDT 2013
#649: ST_Snap crashes on some inputs
------------------------+---------------------------------------------------
Reporter: robe | Owner: geos-devel@…
Type: defect | Status: new
Priority: major | Milestone: 3.4.1
Component: Default | Version: 3.4.0
Severity: Unassigned | Keywords:
------------------------+---------------------------------------------------
This was logged as an issue in PostGIS at:
http://trac.osgeo.org/postgis/ticket/2426
Doesn't seem to be an issue in 3.3
{{{
SELECT ST_Snap('POLYGON Z ((-71.1319 42.2512 0,-71.1318 42.2511
20,-71.1317 42.2511 -20,-71.1317 42.251 5,-71.1317 42.2509 4,-71.132
42.2511 6,-71.1319 42.2512 30))'::geometry, 'GEOMETRYCOLLECTION Z
(MULTIPOLYGON Z (((-71.0821 42.3036 2,-71.0822 42.3036 2,-71.082 42.3038
2,-71.0819 42.3037 2,-71.0821 42.3036 2))),POLYGON Z ((-71.1261 42.2703
1,-71.1257 42.2703 1,-71.1257 42.2701 1,-71.126 42.2701 1,-71.1261 42.2702
1,-71.1261 42.2703 1)))'::geometry, 0.5)
}}}
Just in case that doesn't crash for you, the original I was trying it from
was a statement generated by the PostGIS garden monkey script.
{{{SELECT ST_Snap(foo1.the_geom, foo2.the_geom, 0.5) As result,
ST_AsText(foo1.the_geom) As ref1_geom, ST_AsText(foo2.the_geom) As
ref2_geom
FROM ((SELECT geom As the_geom
FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2503
1,-71.132 42.2502 3,-71.1323 42.2504 -2,-71.1322 42.2505 1,-71.1319
42.2503 0))') ),
( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2512 0,-71.1318
42.2511 20,-71.1317 42.2511 -20,-71.1317 42.251 5,-71.1317 42.2509
4,-71.132 42.2511 6,-71.1319 42.2512 30))') )
) As g(geom))) As foo1 CROSS JOIN ((SELECT
ST_Collect(geom) As the_geom
FROM (VALUES (
ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-71.0821 42.3036 2,-71.0822
42.3036 2,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036 2)))') ),
( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.1261 42.2703 1,-71.1257
42.2703 1,-71.1257 42.2701 1,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261
42.2703 1))') ) ) As g(geom) CROSS JOIN generate_series(1,3) As i GROUP BY
i )) As foo2 LIMIT 2;
}}}
--
Ticket URL: <http://trac.osgeo.org/geos/ticket/649>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
More information about the geos-devel
mailing list