Esempio n. 1
0
		test_wktreader_data()
			:
			pm(1.0),
			gf(&pm),
			wktreader(&gf)
		{
            wktwriter.setOutputDimension( 3 );
        }
Esempio n. 2
0
		test_wktreader_data()
			:
			pm(1.0),
			gf(geos::geom::GeometryFactory::create(&pm)),
			wktreader(gf.get())
		{
            wktwriter.setOutputDimension( 3 );
        }
Esempio n. 3
0
 bool isEqual(const Geom& a, const Geom& b)
 {
   using std::cout;
   using std::endl;
   GeomPtr a2 = normalize(a);
   GeomPtr b2 = normalize(b);
   bool eq = a2->equalsExact(b2.get());
   if  ( ! eq ) {
     cout << "OBTAINED: " << wktwriter.write(b2.get()) << endl;
   }
   return eq;
 }
 bool isEqual(const Geom& a, const Geom& b, double tolerance=0)
 {
   using std::cout;
   using std::endl;
   bool eq;
   // TODO: use HausdorffDistance ?
   GeomPtr a2 = normalize(a);
   GeomPtr b2 = normalize(b);
   eq = a2->equalsExact(b2.get(), tolerance);
   if  ( ! eq ) {
     cout << "OBTAINED: " << wktwriter.write(b2.get()) << endl;
   }
   return eq;
 }
Esempio n. 5
0
        bool compare( T& ex, S& ob) 
        {
          using std::cout;
          using std::endl;

          if ( ex.size() != ob.size() ) {
            cout << "Expected " << ex.size() << " polygons, obtained " 
                 << ob.size() << endl;
            return false;
          }
          for (typename T::iterator i=ex.begin(), e=ex.end(); i!=e; ++i) {
            if ( ! contains(ob, *i) ) {
              cout << "Expected " << wktwriter.write(*i)
                   << " not found" << endl;
              return false;
            }
          }

          return true;
        
        }
Esempio n. 6
0
 test_polygonizetest_data()
   : wktreader()
 {
   wktwriter.setTrim(true);
 }
Esempio n. 7
0
 test_shpathop_data()
   : gf(), wktreader(&gf), wktwriter()
 {
   wktwriter.setTrim(true);
 }
Esempio n. 8
0
 test_polygonizetest_data()
   : gf(),
     wktreader(&gf)
 {
   wktwriter.setTrim(true);
 }
Esempio n. 9
0
 test_linesequencer_data()
   : gf(), wktreader(&gf), wktwriter()
 {
   wktwriter.setTrim(true);
 }
 test_rectangleintersectiontest_data()
     : wktreader()
 {
     wktwriter.setTrim(true);
 }
Esempio n. 11
0
 test_unaryuniontest_data()
   : gf(),
     wktreader(&gf)
 {
   wktwriter.setTrim(true);
 }
Esempio n. 12
0
 void checkExpected(Geometry* result, const Geometry* expected)
 {
   bool isEqual = result->equalsExact(expected, 1.0e-5);
   ensure_equals("Expect: "+writer.write(expected)+" Obtained: "+writer.write(result), isEqual, true);
 }
Esempio n. 13
0
 test_unaryuniontest_data()
   : gf(GeometryFactory::create()),
     wktreader(gf.get())
 {
   wktwriter.setTrim(true);
 }