~sharpie/geos/3.3.2

« back to all changes in this revision

Viewing changes to source/geom/Envelope.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2006-11-06 21:35:52 UTC
  • mfrom: (3.1.3 feisty)
  • Revision ID: james.westby@ubuntu.com-20061106213552-m03o92ggj1na737b
Tags: 2.2.3-3
debian/control: move doxygen from build-depends-indep to build-depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**********************************************************************
2
 
 * $Id: Envelope.cpp,v 1.17 2004/11/08 10:58:08 strk Exp $
 
2
 * $Id: Envelope.cpp,v 1.17.2.1.2.1 2005/11/30 11:18:07 strk Exp $
3
3
 *
4
4
 * GEOS - Geometry Engine Open Source
5
5
 * http://geos.refractions.net
13
13
 *
14
14
 **********************************************************************/
15
15
 
 
16
#include <sstream>
16
17
#include <geos/geom.h>
17
 
#include <stdio.h>
18
18
 
19
19
namespace geos {
20
20
 
417
417
}
418
418
 
419
419
/**
420
 
 * @deprecated Use #intersects instead.
 
420
 * @deprecated Use intersects instead.
421
421
 */
422
422
bool Envelope::overlaps(const Coordinate& p) const {
423
423
        return intersects(p);
438
438
}
439
439
 
440
440
/**
441
 
* @deprecated Use #intersects instead.
 
441
* @deprecated Use intersects instead.
442
442
*/
443
443
bool Envelope::overlaps(double x, double y) const {
444
444
        return intersects(x,y);
465
465
}
466
466
 
467
467
/**
468
 
* @deprecated Use #intersects instead. In the future, #overlaps may be
 
468
* @deprecated Use intersects instead. In the future, overlaps may be
469
469
* changed to be a true overlap check; that is, whether the intersection is
470
470
* two-dimensional.
471
471
*/
479
479
 *@return    a <code>string</code> of the form <I>Env[minx:maxx,miny:maxy]</I>
480
480
 */
481
481
string Envelope::toString() const {
482
 
        string result("");
483
 
        char buffer[255];
484
 
        sprintf(buffer,"Env[%g:%g,%g:%g]",minx,maxx,miny,maxy);
485
 
        result.append(buffer);
486
 
        result.append("");
487
 
        return result;
 
482
        ostringstream s;
 
483
        s<<"Env["<<minx<<":"<<maxx<<","<<miny<<":"<<maxy<<"]";
 
484
        return s.str();
488
485
}
489
486
 
490
487
/**
535
532
 
536
533
/**********************************************************************
537
534
 * $Log: Envelope.cpp,v $
 
535
 * Revision 1.17.2.1.2.1  2005/11/30 11:18:07  strk
 
536
 * Fixed doxygen warnings
 
537
 *
 
538
 * Revision 1.17.2.1  2005/05/23 18:41:51  strk
 
539
 * Replaced sprintf uses with ostringstream
 
540
 *
538
541
 * Revision 1.17  2004/11/08 10:58:08  strk
539
542
 * Optimized the ::intersect function to avoid nested function calls.
540
543
 *