Commit 5f19b55a authored by No Body's avatar No Body

This commit was manufactured by cvs2svn to create tag 'rel-2-1-3'.

git-svn-id: http://svn.osgeo.org/geos/tags/rel-2-1-3@809 5242fede-7e19-0410-aef8-94bd7d2200fb
parent f3da2387
......@@ -18,3 +18,4 @@ config.sub
config.guess
autom4te.cache
libtool
ltmain.sh
This source diff could not be displayed because it is too large. You can view the blob instead.
Compatibility notes
===================
GCC 2.95.2 seems to lack the 'sstream' header file required
to build GEOS. GCC 2.96 is known to work.
Quickstart
==================
==========
As root:
......
2.1.0
- Added Polygonizer and LineMerger classes.
Changes in 2.1.3
2.0.0
- win32/mingw build support
- Segfault fix in LinearRing and LineString constructors
- Segfault fix in Polygonizer
- XMLTester installed by default
- XMLTester code cleanup
- Fixed handling of collection input in GeometryFactory::buildGeometry
- Added shortcircuit test for Union operation
- Reduced useless Coordinate copies in CGAlgorithms::isPointInRing()
- Performance improvements in CGAlgorithms::isOnLine()
- Other minor performance improvements
- New Node::isIncidentEdgeInResult() method
- OverlayOp's PointBuilder performance improvement by reduction
of LineIntersector calls.
- Optimizations in Buffer operation
- Sever BUGFIX in DepthSegmentLT as suggested by Graeme Hiebert
- CoordinateList renamed to CoordinateSequence, BasicCoordinateList
renamed to DefaultCoordinateSequence to reflect JTS changes.
DefaultCoordinateSequenceFactory and CoordinateSequenceFactory
got same interface as JTS.
Changes in 2.1.2
- Added geos/version.h defining versioning infos
- Segfault fix in Point::isEmpty
- Mem Leak fix in OffsetCurveBuilder::getRingCurve
- Bugfix in LineSegment::reverse
- Added multipolygon buffering test in source/test/testLeaksBig
- Ported JTS robustness patch for RobustLineIntersector
- Removed useless Coordinate copies in OverlayOp::mergeZ()
- Avoided throws by IsValid on invalid input
- Stricter C++ syntax (math.h=>cmath, ieeefp.h in "C" block, ostringstream
instead of sprintf)
- Better support for older compilers (Polygonizer::LineStringAdder friendship)
- Removed useless Coordinate copies in CGAlgorithms::isOnLine()
- Added support for polygonize and parametrized buffer tests in XMLTester
- Fixed support for --includedir and --libdir
- Fixed Z interpolation in LineIntersector
- Handled NULL results from getCentroid() in XMLTester
- Segfault fix in (EMPTY)Geometry::getCentroid()
- Made polygon::getBoundary() always OGC-valid (no LinearRings)
- Input checking and promoting in GeometryFactory::createMultiLineString()
- Segfault fix in GeometryEditor::editPolygon()
- Added geos.h for quick inclusion. It will include geos/geom.h,
new geos/version.h, geos/util.h geos/io.h and geos/unload.h
(geometry input/output, exceptions, operations).
- Added a geos::version() function showing GEOS and equivalent
JTS versions as strings.
Changes in 2.1.1
- All geometry constructors take ownership of given arguments.
GeometryFactory provides pass-by-reference geometry creators
to take care of a deep-copy.
- Fixed uninitialized Coordinate in TopologyException
- Added install of version.h, platform.h and timeval.h
- Memleak fix in PolygonizeGraph
- Memleak fix in OverlayOp
- Compiler warnings removal
- Cleaner w32 build
- Z interpolation in overlay operations
- Debian package build scripts
- GeometryFactory::createMultiPoint(const CoordinateList *)
has been renamed to
GeometryFactory::createMultiPoint(const CoordinateList &)
to reflect copy semantic
- GeometryFactory: EMPTY geometry creation do now have their
own constructors taking no arguments.
Changes in 2.1.0
- Geometry constructors taking PrecisionModel and SRID have
been dropped. You have to use GeometryFactory instead.
- Added Polygonizer and LineMerger classes.
- python wrapper examples
- General cleanup / warnings removal
- cleaner win32 / older copilers builds
- Reduced heap allocations
- debian package builder scripts
- reduction of standard C lib headers dependency
- Z support in overlay operations.
- WKTWriter default constructor has been dropped. You need
to initialize it with an explicit GeometryFactory
Changes in 2.0.0
- CoordinateList renamed to CoordinateSequence, BasicCoordinateList
renamed to DefaultCoordinateSequence to reflect JTS changes.
DefaultCoordinateSequenceFactory and CoordinateSequenceFactory
got same interface as JTS.
- Added geos/version.h defining versioning infos
- Added geos.h for quick inclusion. It will include geos/geom.h,
new geos/version.h, geos/util.h geos/io.h and geos/unload.h
(geometry input/output, exceptions, operations).
- Added a geos::version() function showing GEOS and equivalent
JTS versions as strings.
- All geometry constructors take ownership of given arguments.
GeometryFactory provides pass-by-reference geometry creators
to take care of a deep-copy.
- GeometryFactory::createMultiPoint(const CoordinateList *)
has been renamed to
GeometryFactory::createMultiPoint(const CoordinateList &)
to reflect copy semantic
- GeometryFactory: EMPTY geometry creation do now have their
own constructors taking no arguments.
- Geometry constructors taking PrecisionModel and SRID have
been dropped. You have to use GeometryFactory instead.
- WKTWriter default constructor has been dropped. You need
to initialize it with an explicit GeometryFactory
......@@ -12,6 +12,8 @@ echo "Running autoheader"
autoheader
echo "Running aclocal"
aclocal
echo "Running libtoolize"
libtoolize --force --copy
echo "Running automake"
automake $AMFLAGS
echo "Running autoconf"
......
......@@ -9,7 +9,7 @@ dnl -- INTERFACE_CURRENT: current interface number
dnl -- INTERFACE_REVISION: revision of CURRENT interface
dnl -- INTERFACE_AGE: number of previous interfaces supported
INTERFACE_CURRENT=3
INTERFACE_REVISION=0
INTERFACE_REVISION=3
INTERFACE_AGE=1
dnl -- JTS_PORT: the version of JTS this release is bound to
......
This diff is collapsed.
......@@ -5,6 +5,7 @@
* http://geos.refractions.net
*
* Copyright (C) 2001-2002 Vivid Solutions Inc.
* Copyright (C) 2005 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
......@@ -15,7 +16,7 @@
#include <geos/geosAlgorithm.h>
#include <stdio.h>
#include <math.h>
#include <cmath>
namespace geos {
......@@ -44,18 +45,21 @@ int CGAlgorithms::orientationIndex(const Coordinate& p1,const Coordinate& p2,con
}
/**
* Test whether a point lies inside a ring.
* The ring may be oriented in either direction.
* If the point lies on the ring boundary the result of this method is unspecified.
* <p>
* This algorithm does not attempt to first check the point against the envelope
* of the ring.
*
* @param p point to check for ring inclusion
* @param ring assumed to have first point identical to last point
* @return <code>true</code> if p is inside ring
*/
bool CGAlgorithms::isPointInRing(const Coordinate& p, const CoordinateSequence* ring) {
* Test whether a point lies inside a ring.
* The ring may be oriented in either direction.
* If the point lies on the ring boundary the result of this method is
* unspecified.
*
* This algorithm does not attempt to first check the point against the envelope
* of the ring.
*
* @param p point to check for ring inclusion
* @param ring assumed to have first point identical to last point
* @return <code>true</code> if p is inside ring
*/
bool
CGAlgorithms::isPointInRing(const Coordinate& p, const CoordinateSequence* ring)
{
int i;
int i1; // point index; i1 = i-1
double xInt; // x intersection of segment with ray
......@@ -65,13 +69,15 @@ bool CGAlgorithms::isPointInRing(const Coordinate& p, const CoordinateSequence*
double x2;
double y2;
int nPts=ring->getSize();
/*
* For each segment l = (i-1, i), see if it crosses ray from test point in positive x direction.
*/
* For each segment l = (i-1, i), see if it crosses ray from test
* point in positive x direction.
*/
for(i=1;i<nPts;i++) {
i1 = i - 1;
Coordinate p1=ring->getAt(i);
Coordinate p2=ring->getAt(i1);
const Coordinate &p1=ring->getAt(i);
const Coordinate &p2=ring->getAt(i1);
x1 = p1.x - p.x;
y1 = p1.y - p.y;
x2 = p2.x - p.x;
......@@ -113,13 +119,17 @@ bool
CGAlgorithms::isOnLine(const Coordinate& p, const CoordinateSequence* pt)
{
RobustLineIntersector lineIntersector;
for(int i=1;i<pt->getSize();i++) {
Coordinate p0=pt->getAt(i-1);
Coordinate p1=pt->getAt(i);
lineIntersector.computeIntersection(p, p0, p1);
int ptsize = pt->getSize();
if ( ptsize == 0 ) return false;
const Coordinate *pp=&(pt->getAt(0));
for(int i=1; i<ptsize; i++) {
const Coordinate &p1=pt->getAt(i);
lineIntersector.computeIntersection(p, *pp, p1);
if (lineIntersector.hasIntersection()) {
return true;
}
pp=&p1;
}
return false;
}
......@@ -370,6 +380,18 @@ double CGAlgorithms::length(const CoordinateSequence* pts) {
/**********************************************************************
* $Log$
* Revision 1.19.2.4 2005/06/23 11:20:38 strk
* Minor performance improvements
*
* Revision 1.19.2.3 2005/06/23 10:53:14 strk
* Removed useless Coordinate copy in CGAlgorithms::isPointInRing()
*
* Revision 1.19.2.2 2005/05/23 17:29:11 strk
* Removed useless Coordinate copies in CGAlgorithms::isOnLine()
*
* Revision 1.19.2.1 2005/05/23 17:10:08 strk
* Stricter C++ syntax (math.h=>cmath, ieeefp.h in "C" block)
*
* Revision 1.19 2004/11/20 15:39:57 strk
* Reduced HEAP allocations.
*
......
......@@ -16,7 +16,7 @@
#include <geos/geosAlgorithm.h>
#include <geos/util.h>
#include <geos/geom.h>
#include <math.h>
#include <cmath>
#ifndef DEBUG_INTERSECT
#define DEBUG_INTERSECT 0
......@@ -88,18 +88,12 @@ LineIntersector::nonRobustComputeEdgeDistance(const Coordinate& p,const Coordina
return dist;
}
LineIntersector::LineIntersector()
LineIntersector::LineIntersector(): pa(intPt[0]), pb(intPt[1])
{
precisionModel=NULL;
Coordinate *c=new Coordinate();
intPt[0].setCoordinate(*c);
delete c;
c=new Coordinate();
intPt[1].setCoordinate(*c);
delete c;
// alias the intersection points for ease of reference
pa.setCoordinate(intPt[0]);
pb.setCoordinate(intPt[1]);
//pa=intPt[0];
//pb=intPt[1];
result=0;
}
......@@ -334,7 +328,9 @@ LineIntersector::computeIntLineIndex(int segmentIndex)
double
LineIntersector::getEdgeDistance(int segmentIndex,int intIndex) const
{
double dist=computeEdgeDistance(intPt[intIndex],inputLines[segmentIndex][0],inputLines[segmentIndex][1]);
double dist=computeEdgeDistance(intPt[intIndex],
inputLines[segmentIndex][0],
inputLines[segmentIndex][1]);
return dist;
}
......@@ -363,11 +359,13 @@ LineIntersector::isInteriorIntersection()
bool
LineIntersector::isInteriorIntersection(int inputLineIndex)
{
for (int i = 0; i < result; i++) {
for (int i=0; i<result; i++)
{
if (!(intPt[i].equals2D(inputLines[inputLineIndex][0])
|| intPt[i].equals2D(inputLines[inputLineIndex][1]) )) {
return true;
}
|| intPt[i].equals2D(inputLines[inputLineIndex][1])))
{
return true;
}
}
return false;
}
......@@ -411,6 +409,7 @@ LineIntersector::interpolateZ(const Coordinate &p,
return p2.z;
}
//double zgap = fabs(p2.z - p1.z);
double zgap = p2.z - p1.z;
if ( ! zgap )
{
......@@ -426,7 +425,9 @@ LineIntersector::interpolateZ(const Coordinate &p,
yoff = (p.y-p1.y);
double pdist = (xoff*xoff+yoff*yoff);
double fract = sqrt(pdist/seglen);
double interpolated = p1.z+(zgap*fract);
double zoff = zgap*fract;
//double interpolated = p1.z < p2.z ? p1.z+zoff : p1.z-zoff;
double interpolated = p1.z+zoff;
#if DEBUG
cerr<<" zgap:"<<zgap<<" seglen:"<<seglen<<" pdist:"<<pdist
<<" fract:"<<fract<<" z:"<<interpolated<<endl;
......@@ -440,6 +441,12 @@ LineIntersector::interpolateZ(const Coordinate &p,
/**********************************************************************
* $Log$
* Revision 1.19.2.2 2005/05/23 19:01:52 strk
* Back-ported fix in Z interpolation
*
* Revision 1.19.2.1 2005/05/23 17:10:08 strk
* Stricter C++ syntax (math.h=>cmath, ieeefp.h in "C" block)
*
* Revision 1.19 2004/11/29 16:05:33 strk
* Fixed a bug in LineIntersector::interpolateZ causing NaN values
* to come out.
......
......@@ -13,6 +13,9 @@
*
**********************************************************************
* $Log$
* Revision 1.9.2.1 2005/05/23 17:10:08 strk
* Stricter C++ syntax (math.h=>cmath, ieeefp.h in "C" block)
*
* Revision 1.9 2004/07/02 13:28:26 strk
* Fixed all #include lines to reflect headers layout change.
* Added client application build tips in README.
......@@ -28,7 +31,7 @@
#include <geos/geosAlgorithm.h>
#include <geos/util.h>
#include <stdio.h>
#include <math.h>
#include <cmath>
namespace geos {
......
......@@ -13,6 +13,9 @@
*
**********************************************************************
* $Log$
* Revision 1.6.2.1 2005/05/23 17:10:08 strk
* Stricter C++ syntax (math.h=>cmath, ieeefp.h in "C" block)
*
* Revision 1.6 2004/07/02 13:28:26 strk
* Fixed all #include lines to reflect headers layout change.
* Added client application build tips in README.
......@@ -26,7 +29,7 @@
#include <geos/geosAlgorithm.h>
#include <math.h>
#include <cmath>
namespace geos {
......
......@@ -5,6 +5,7 @@
* http://geos.refractions.net
*
* Copyright (C) 2001-2002 Vivid Solutions Inc.
* Copyright (C) 2005 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
......@@ -22,6 +23,58 @@
#define COMPUTE_Z 1
#endif // COMPUTE_Z
namespace { // module-statics
using namespace geos;
void
normalizeToEnvCentre(Coordinate &n00, Coordinate &n01,
Coordinate &n10, Coordinate &n11, Coordinate &normPt)
{
double minX0 = n00.x < n01.x ? n00.x : n01.x;
double minY0 = n00.y < n01.y ? n00.y : n01.y;
double maxX0 = n00.x > n01.x ? n00.x : n01.x;
double maxY0 = n00.y > n01.y ? n00.y : n01.y;
double minX1 = n10.x < n11.x ? n10.x : n11.x;
double minY1 = n10.y < n11.y ? n10.y : n11.y;
double maxX1 = n10.x > n11.x ? n10.x : n11.x;
double maxY1 = n10.y > n11.y ? n10.y : n11.y;
double intMinX = minX0 > minX1 ? minX0 : minX1;
double intMaxX = maxX0 < maxX1 ? maxX0 : maxX1;
double intMinY = minY0 > minY1 ? minY0 : minY1;
double intMaxY = maxY0 < maxY1 ? maxY0 : maxY1;
double intMidX = (intMinX + intMaxX) / 2.0;
double intMidY = (intMinY + intMaxY) / 2.0;
normPt.x = intMidX;
normPt.y = intMidY;
n00.x -= normPt.x; n00.y -= normPt.y;
n01.x -= normPt.x; n01.y -= normPt.y;
n10.x -= normPt.x; n10.y -= normPt.y;
n11.x -= normPt.x; n11.y -= normPt.y;
#if COMPUTE_Z
double minZ0 = n00.z < n01.z ? n00.z : n01.z;
double minZ1 = n10.z < n11.z ? n10.z : n11.z;
double maxZ0 = n00.z > n01.z ? n00.z : n01.z;
double maxZ1 = n10.z > n11.z ? n10.z : n11.z;
double intMinZ = minZ0 > minZ1 ? minZ0 : minZ1;
double intMaxZ = maxZ0 < maxZ1 ? maxZ0 : maxZ1;
double intMidZ = (intMinZ + intMaxZ) / 2.0;
normPt.z = intMidZ;
n00.z -= normPt.z;
n01.z -= normPt.z;
n10.z -= normPt.z;
n11.z -= normPt.z;
#endif
}
} // module-statics
namespace geos {
RobustLineIntersector::RobustLineIntersector(){}
......@@ -385,47 +438,52 @@ RobustLineIntersector::computeCollinearIntersection(const Coordinate& p1,const C
Coordinate*
RobustLineIntersector::intersection(const Coordinate& p1,const Coordinate& p2,const Coordinate& q1,const Coordinate& q2) const
{
Coordinate *n1=new Coordinate(p1);
Coordinate *n2=new Coordinate(p2);
Coordinate *n3=new Coordinate(q1);
Coordinate *n4=new Coordinate(q2);
Coordinate *normPt=new Coordinate();
normalize(n1, n2, n3, n4, normPt);
Coordinate intPt;
Coordinate n1=p1;
Coordinate n2=p2;
Coordinate n3=q1;
Coordinate n4=q2;
Coordinate normPt;
//normalize(n1, n2, n3, n4, normPt);
normalizeToEnvCentre(n1, n2, n3, n4, normPt);
Coordinate *intPt=NULL;
try {
Coordinate *h=HCoordinate::intersection(*n1,*n2,*n3,*n4);
intPt.setCoordinate(*h);
#if COMPUTE_Z
double ztot = 0;
double zvals = 0;
double zp = interpolateZ(intPt, p1, p2);
double zq = interpolateZ(intPt, q1, q2);
if ( !ISNAN(zp)) { ztot += zp; zvals++; }
if ( !ISNAN(zq)) { ztot += zq; zvals++; }
if ( zvals ) intPt.z = ztot/zvals;
#endif // COMPUTE_Z
delete h;
intPt=HCoordinate::intersection(n1,n2,n3,n4);
} catch (NotRepresentableException *e) {
delete intPt;
Assert::shouldNeverReachHere("Coordinate for intersection is not calculable"+e->toString());
}
intPt.x+=normPt->x;
intPt.y+=normPt->y;
if (precisionModel!=NULL) {
precisionModel->makePrecise(&intPt);
}
delete n1;
delete n2;
delete n3;
delete n4;
delete normPt;
/**
* MD - after fairly extensive testing
* it appears that the computed intPt always lies in the segment envelopes
*/
//if (! isInSegmentEnvelopes(intPt))
// System.out.println("outside segment envelopes: " + intPt);
return new Coordinate(intPt);
intPt->x += normPt.x;
intPt->y += normPt.y;
/**
*
* MD - May 4 2005 - This is still a problem. Here is a failure case:
*
* LINESTRING (2089426.5233462777 1180182.3877339689,
* 2085646.6891757075 1195618.7333999649)
* LINESTRING (1889281.8148903656 1997547.0560044837,
* 2259977.3672235999 483675.17050843034)
* int point = (2097408.2633752143,1144595.8008114607)
*/
if (precisionModel!=NULL) precisionModel->makePrecise(intPt);
#if COMPUTE_Z
double ztot = 0;
double zvals = 0;
double zp = interpolateZ(*intPt, p1, p2);
double zq = interpolateZ(*intPt, q1, q2);
if ( !ISNAN(zp)) { ztot += zp; zvals++; }
if ( !ISNAN(zq)) { ztot += zq; zvals++; }
if ( zvals ) intPt->z = ztot/zvals;
#endif // COMPUTE_Z
return intPt;
}
......@@ -494,6 +552,9 @@ RobustLineIntersector::isInSegmentEnvelopes(const Coordinate& intPt)
/**********************************************************************
* $Log$
* Revision 1.29.2.1 2005/05/23 16:39:37 strk
* Ported JTS robustness patch for RobustLineIntersector
*
* Revision 1.29 2004/12/08 13:54:43 strk
* gcc warnings checked and fixed, general cleanups.
*
......
......@@ -13,7 +13,7 @@
*
**********************************************************************/
#include <math.h>
#include <cmath>
#include <geos/geom.h>
#include "bigtest.h"
......@@ -126,6 +126,9 @@ Polygon* GeometryTestFactory::createSineStar(GeometryFactory *fact,double basex,
/**********************************************************************
* $Log$
* Revision 1.12.2.1 2005/05/23 17:10:08 strk
* Stricter C++ syntax (math.h=>cmath, ieeefp.h in "C" block)
*
* Revision 1.12 2004/12/08 13:54:43 strk
* gcc warnings checked and fixed, general cleanups.
*
......
......@@ -13,6 +13,9 @@
*
**********************************************************************
* $Log$
* Revision 1.1.2.1 2005/05/23 18:41:51 strk
* Replaced sprintf uses with ostringstream
*
* Revision 1.1 2004/07/08 19:41:27 strk
* renamed to reflect JTS API.
*
......@@ -29,7 +32,7 @@
#include "CustomCoordinateSequenceExample.h"
#include <stdio.h>
#include <sstream>
using namespace geos;
......@@ -135,14 +138,17 @@ void CustomPointCoordinateSequence::deleteAt(int pos){
}
string CustomPointCoordinateSequence::toString() {
string result("");
char buffer[100];
ostringstream s;
//string result("");
//char buffer[100];
for (int i=0;i<size;i++) {
point_3d c=pts[i];
sprintf(buffer,"(%g,%g,%g) ",c.x,c.y,c.z);
result.append(buffer);
//sprintf(buffer,"(%g,%g,%g) ",c.x,c.y,c.z);
s<<"("<<c.x<<","<<c.y<<","<<c.z<<") ";
//result.append(buffer);
}
result.append("");
return result;
//result.append("");
//return result;
return s.str();
}
......@@ -14,7 +14,7 @@
**********************************************************************/
#include <geos/geom.h>
#include <stdio.h>
#include <sstream>
namespace geos {
......@@ -26,18 +26,22 @@ namespace geos {
*@return a <code>string</code> of the form <I>(x,y,z)</I>
*/
string Coordinate::toString() const {
string result("");
char buffer[255];
ostringstream s;
//string result("");
//char buffer[255];
if (ISNAN(z)) {
sprintf(buffer,"(%g,%g)",x,y);
result.append(buffer);
result.append("");
s<<"("<<x<<","<<y<<")";
//sprintf(buffer,"(%g,%g)",x,y);
//result.append(buffer);
//result.append("");
} else {
sprintf(buffer,"(%g,%g,%g)",x,y,z);
result.append(buffer);
result.append("");
s<<"("<<x<<","<<y<<","<<z<<")";
//sprintf(buffer,"(%g,%g,%g)",x,y,z);
//result.append(buffer);
//result.append("");
}
return result;
//return result;
return s.str();
}
/*
......@@ -66,6 +70,9 @@ bool operator!=(const Coordinate& a, const Coordinate& b) {
/**********************************************************************
* $Log$
* Revision 1.19.2.1 2005/05/23 18:41:51 strk
* Replaced sprintf uses with ostringstream
*
* Revision 1.19 2004/11/29 16:05:33 strk
* Fixed a bug in LineIntersector::interpolateZ causing NaN values
* to come out.
......
......@@ -5,6 +5,7 @@
* http://geos.refractions.net
*
* Copyright (C) 2001-2002 Vivid Solutions Inc.
* Copyright (C) 2005 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
......@@ -125,12 +126,15 @@ bool CoordinateSequence::equals(CoordinateSequence *cl1,CoordinateSequence *cl2)
}
/** Add an array of coordinates
* @param vc The coordinates
* @param allowRepeated if set to false, repeated coordinates are collapsed
* @return true (as by general collection contract)
*/
void CoordinateSequence::add(const vector<Coordinate>* vc,bool allowRepeated) {
for(int i=0;i<(int)vc->size();i++) {
* @param vc The coordinates
* @param allowRepeated if set to false, repeated coordinates are collapsed
* @return true (as by general collection contract)
*/
void
CoordinateSequence::add(const vector<Coordinate>* vc,bool allowRepeated)
{
unsigned int size=vc->size();
for(unsigned int i=0; i<size; i++) {
add((*vc)[i],allowRepeated);
}
}
......@@ -140,7 +144,7 @@ void CoordinateSequence::add(const vector<Coordinate>* vc,bool allowRepeated) {
* @param allowRepeated if set to false, repeated coordinates are collapsed
* @return true (as by general collection contract)
*/
void CoordinateSequence::add(const Coordinate& c,bool allowRepeated) {
void CoordinateSequence::add(const Coordinate& c, bool allowRepeated) {
if (!allowRepeated) {
if (getSize()>=1) {
const Coordinate& last=getAt(getSize()-1);
......@@ -198,6 +202,9 @@ CoordinateSequence::removeRepeatedPoints(const CoordinateSequence *cl)
/**********************************************************************
* $Log$
* Revision 1.6.2.1 2005/06/23 11:20:38 strk
* Minor performance improvements