[geos-devel] [GEOS] #236: the project crash
GEOS
geos-trac at osgeo.org
Tue Mar 10 22:27:50 EDT 2009
#236: the project crash
-----------------------------+----------------------------------------------
Reporter: aya | Owner: geos-devel at lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 3.1.0
Component: Default | Version: 3.0.3
Severity: Feature Request | Keywords: GEOS,Distance,DistanceOp
-----------------------------+----------------------------------------------
I have built two polygons named PG1 and PG2. One is
(0,0),(1,0),(1,1),(0,1), the other is
(0.25,0.25),(0.75,0.25),(0.75,0.75),(0.25,0.75). At this time the distance
returned is 0.25 and closestPoints() returns successfully. However, if I
move PG2 out of PG1 and run it aggin. The project crashed in
closestPoints(). The package I use is geos-3.1.0rc2. Now I need to find
the nearest points of two polygons and the related distance. If there is
something wrong in my codes or other solution, please tell me in time.
Thanks.
CoordinateSequence *cs;
cout<<PG1->distance(PG2)<<endl;
cout<<PG2->distance(PG1)<<endl;
typedef geos::operation::distance::DistanceOp DOP;
DOP *Dis = new DOP(PG1, PG2);
cout<<"in"<<endl;
cs=Dis->closestPoints();
cout<<"out"<<endl;
--
Ticket URL: <http://trac.osgeo.org/geos/ticket/236>
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