Beispiel #1
0
		test_wktreader_data()
			:
			pm(1.0),
			gf(&pm),
			wktreader(&gf)
		{
            wktwriter.setOutputDimension( 3 );
        }
Beispiel #2
0
		test_wktreader_data()
			:
			pm(1.0),
			gf(geos::geom::GeometryFactory::create(&pm)),
			wktreader(gf.get())
		{
            wktwriter.setOutputDimension( 3 );
        }
Beispiel #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;
 }
Beispiel #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;
        
        }
Beispiel #6
0
 test_polygonizetest_data()
   : wktreader()
 {
   wktwriter.setTrim(true);
 }
 test_shpathop_data()
   : gf(), wktreader(&gf), wktwriter()
 {
   wktwriter.setTrim(true);
 }
Beispiel #8
0
 test_polygonizetest_data()
   : gf(),
     wktreader(&gf)
 {
   wktwriter.setTrim(true);
 }
 test_linesequencer_data()
   : gf(), wktreader(&gf), wktwriter()
 {
   wktwriter.setTrim(true);
 }
 test_rectangleintersectiontest_data()
     : wktreader()
 {
     wktwriter.setTrim(true);
 }
Beispiel #11
0
 test_unaryuniontest_data()
   : gf(),
     wktreader(&gf)
 {
   wktwriter.setTrim(true);
 }
 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);
 }
Beispiel #13
0
 test_unaryuniontest_data()
   : gf(GeometryFactory::create()),
     wktreader(gf.get())
 {
   wktwriter.setTrim(true);
 }