[postgis-devel] [PostGIS] #210: segmentation faults in lwgeom_geos.c:pgis_union_geometry_array
PostGIS
trac at osgeo.org
Tue Jun 30 15:53:51 PDT 2009
#210: segmentation faults in lwgeom_geos.c:pgis_union_geometry_array
------------------------+---------------------------------------------------
Reporter: dfuhriman | Owner: robe
Type: defect | Status: assigned
Priority: medium | Milestone: postgis 1.3.7
Component: postgis | Version: trunk
Resolution: | Keywords:
------------------------+---------------------------------------------------
Comment (by robe):
Mark,
I'm happy with this one for at least an RC. I guess I misread your
message thank goodness. I get same results for old as I did before and my
all null make line no longer crashes.
There is one example that is different from the old - and the error is not
because of this patch, but of course because of the error checking we are
doing. I personally think both the 1.3 and the 1.4 answers are wrong in
this case, but as to whether the 1.4 answer is wrong is debatable.
If you call ST_MakeLine on a single point which could happen if you have a
1 row table.
In 1.3 -- you get a magical one pointed line:
SELECT ST_AsText(ST_MakeLine(ST_GeomFromTExt('POINT(1 1)'))) ;
LINESTRING(1 1)
yes I thought it was very cool too. Many budding geometry Frankensteins
will be unhappy they can no longer pull this off.
In 1.4 you get
ERROR: geometry requires more points
I personally think if you have one point in a make line -- it should just
return NULL, but I'm not strongly feeling about this except for the fact
it will break code in cases where only one record has been put in.
Cool I can still create a line with identical points which is same
behavior as 1.3.
SELECT ST_IsValid(ST_MakeLine(the_geom))
FROM (VALUES (ST_GeomFromTExt('POINT(1 1)')), (ST_GeomFromTExt('POINT(1
1)') ) ) As foo(the_geom) ;
I think this patch may be a winner so go ahead and commit it if Paul is
okay.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/210#comment:35>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS
More information about the postgis-devel
mailing list