Index: experimental/TerrainTest/ModificationVisitor.cpp
===================================================================
--- experimental/TerrainTest/ModificationVisitor.cpp	(revision 257)
+++ experimental/TerrainTest/ModificationVisitor.cpp	(revision 258)
@@ -6,4 +6,5 @@
 {
 	setTraversalMode( osg::NodeVisitor::TRAVERSE_ALL_CHILDREN );
+	technique = new ellipsoidTechnique();
 }
 
@@ -43,5 +44,5 @@
 void ModificationVisitor::modifyTile(osgTerrain::TerrainTile* tile)
 {
-	//OSG_NOTIFY( osg::ALWAYS ) << "ModificationVisitor::modifyTile()" << std::endl;
+	//OSG_NOTIFY( osg::ALWAYS ) << "ModificationVisitor::modifyTile() : Checking if tile is affected.." << std::endl;
 	HeightFieldLayer* hfl = dynamic_cast<HeightFieldLayer*>(tile->getElevationLayer());
 	osg::HeightField* h = hfl->getHeightField();
@@ -54,10 +55,8 @@
 
 	// Determine extend of the tile.
-	int rows = h->getNumRows();
-	int cols = h->getNumColumns();
 	double lat_min = h->getOrigin()[1];
-	double lat_max = lat_min + rows * h->getYInterval();
+	double lat_max = lat_min + h->getNumRows() * h->getYInterval();
 	double lon_min = h->getOrigin()[0];
-	double lon_max = lon_min + cols * h->getXInterval();
+	double lon_max = lon_min + h->getNumColumns() * h->getXInterval();
 
 	// Check if tile is fully or partially inside ROI:
@@ -65,35 +64,5 @@
 		&& lon_max>dest_lon_min && lon_min<dest_lon_max )	// lon inside ROI
 	{
-		OSG_NOTIFY( osg::ALWAYS ) << "ModificationVisitor::modifyTile() :: affected Tile" << std::endl;
-		OSG_NOTIFY( osg::ALWAYS ) << "LAT: " << lat_min << " | " << lat_max << std::endl;
-		OSG_NOTIFY( osg::ALWAYS ) << "LON: " << lon_min << " | " << lon_max << std::endl;
-
-
-		// calculate colum start/end and row start/end of affected vertices
-		int startX=0,startY=0,endX=cols,endY=rows;
-
-
-		// modify height value of affected vertices
-		h->setHeight( 0,0, 600);
-
+		technique->modifyHeightfield(h, lat_min, lat_max, lon_min, lon_max);
 	}
-
-
-
-
-
-
-
-	//OSG_NOTIFY( osg::ALWAYS ) << "Origin: " << h->getOrigin()[0] << " | " << h->getOrigin()[1] << std::endl;
-	//OSG_NOTIFY( osg::ALWAYS ) << "X-Intervall: " << h->getXInterval() << std::endl;
-	//OSG_NOTIFY( osg::ALWAYS ) << "Y-Intervall: " << h->getYInterval() << std::endl;
-	//if(dest_lat_min<=lat_min && lat_max<=dest_lat_max && dest_lon_min<=lon_min && lon_max<=dest_lon_max)
-	//{
-	//	OSG_NOTIFY( osg::ALWAYS ) << "ModificationVisitor::modifyTile() :: affected Tile" << std::endl;
-	//	OSG_NOTIFY( osg::ALWAYS ) << "LAT: " << lat_min << " | " << lat_max << std::endl;
-	//	OSG_NOTIFY( osg::ALWAYS ) << "LON: " << lon_min << " | " << lon_max << std::endl;
-
-	//	h->setHeight( 0,0, 1000);
-	//}
-	//OpenThreads::Thread::microSleep( 50000 );
 }
Index: experimental/TerrainTest/ModificationVisitor.h
===================================================================
--- experimental/TerrainTest/ModificationVisitor.h	(revision 257)
+++ experimental/TerrainTest/ModificationVisitor.h	(revision 258)
@@ -6,4 +6,6 @@
 #include <osgTerrain/TerrainTile>
 #include <osgTerrain/Layer>
+
+#include "ellipsoidTechnique.h"
 
 
@@ -18,3 +20,5 @@
 	void modifyTile(osgTerrain::TerrainTile* tile);
 	std::string _extensionToSet;
+
+	ellipsoidTechnique* technique;
 };
Index: experimental/TerrainTest/Plugins terrainmod/Plugins terrainmod.vcproj
===================================================================
--- experimental/TerrainTest/Plugins terrainmod/Plugins terrainmod.vcproj	(revision 257)
+++ experimental/TerrainTest/Plugins terrainmod/Plugins terrainmod.vcproj	(revision 258)
@@ -180,4 +180,8 @@
 			>
 			<File
+				RelativePath="..\ellipsoidTechnique.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\ModificationVisitor.cpp"
 				>
@@ -194,4 +198,8 @@
 			>
 			<File
+				RelativePath="..\ellipsoidTechnique.h"
+				>
+			</File>
+			<File
 				RelativePath="..\ModificationVisitor.h"
 				>
Index: experimental/TerrainTest/ellipsoidTechnique.cpp
===================================================================
--- experimental/TerrainTest/ellipsoidTechnique.cpp	(revision 258)
+++ experimental/TerrainTest/ellipsoidTechnique.cpp	(revision 258)
@@ -0,0 +1,43 @@
+#include "ellipsoidTechnique.h"
+#include <osgTerrain/TerrainTile>
+
+
+ellipsoidTechnique::ellipsoidTechnique()
+{
+}
+
+ellipsoidTechnique::~ellipsoidTechnique()
+{
+}
+
+void ellipsoidTechnique::modifyHeightfield(osg::HeightField* h, double lat_min, double lat_max, double lon_min, double lon_max)
+{
+	OSG_NOTIFY( osg::ALWAYS ) << "ellipsoidTechnique::modifyHeightfield()" << std::endl;
+	OSG_NOTIFY( osg::ALWAYS ) << "LAT: " << lat_min << " | " << lat_max << std::endl;
+	OSG_NOTIFY( osg::ALWAYS ) << "LON: " << lon_min << " | " << lon_max << std::endl;
+
+	int rows = h->getNumRows();
+	int cols = h->getNumColumns();
+
+	// calculate colum start/end and row start/end of affected vertices
+	int startX=0,startY=0,endX=cols,endY=rows;
+
+
+	// modify height value of affected vertices
+	h->setHeight( 0,0, 600);
+
+
+	//OSG_NOTIFY( osg::ALWAYS ) << "Origin: " << h->getOrigin()[0] << " | " << h->getOrigin()[1] << std::endl;
+	//OSG_NOTIFY( osg::ALWAYS ) << "X-Intervall: " << h->getXInterval() << std::endl;
+	//OSG_NOTIFY( osg::ALWAYS ) << "Y-Intervall: " << h->getYInterval() << std::endl;
+	//if(dest_lat_min<=lat_min && lat_max<=dest_lat_max && dest_lon_min<=lon_min && lon_max<=dest_lon_max)
+	//{
+	//	OSG_NOTIFY( osg::ALWAYS ) << "ModificationVisitor::modifyTile() :: affected Tile" << std::endl;
+	//	OSG_NOTIFY( osg::ALWAYS ) << "LAT: " << lat_min << " | " << lat_max << std::endl;
+	//	OSG_NOTIFY( osg::ALWAYS ) << "LON: " << lon_min << " | " << lon_max << std::endl;
+
+	//	h->setHeight( 0,0, 1000);
+	//}
+	//OpenThreads::Thread::microSleep( 50000 );
+}
+
Index: experimental/TerrainTest/ellipsoidTechnique.h
===================================================================
--- experimental/TerrainTest/ellipsoidTechnique.h	(revision 258)
+++ experimental/TerrainTest/ellipsoidTechnique.h	(revision 258)
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <osgTerrain/GeometryTechnique>
+#include <osg/Image>
+
+class ellipsoidTechnique
+{
+public:
+	ellipsoidTechnique();
+	~ellipsoidTechnique();
+
+	void modifyHeightfield(osg::HeightField* h, double lat_min, double lat_max, double lon_min, double lon_max);
+};
+
+	
