test_class.declarator: DELTA = 1e-20
test_class.modifier: private static final
test_class.original_string: private static final double DELTA = 1e-20;
test_class.type: double
test_class.var_name: DELTA
test_class.declarator: geoService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private GeoService geoService;
test_class.type: GeoService
test_class.var_name: geoService
test_class.declarator: geocoderUtilService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private GeocoderUtilService geocoderUtilService;
test_class.type: GeocoderUtilService
test_class.var_name: geocoderUtilService
test_class.file: plugin/geocoder/geocoder/src/test/java/org/geomajas/plugin/geocoder/service/GeocoderUtilServiceTest.java
test_class.identifier: GeocoderUtilServiceTest
test_case.body: @Test
  	public void extendPointTest() throws Exception {
  		CoordinateReferenceSystem crs;
  		Coordinate coordinate;
  		Envelope envelope;
  
  		crs = geoService.getCrs("EPSG:900913");
  		coordinate = new Coordinate(0, 0);
  		envelope = geocoderUtilService.extendPoint(coordinate, crs, 200, 100);
  		Assert.assertEquals(-100.00000376900834, envelope.getMinX(), DELTA);
  		Assert.assertEquals(-50.33697512339748, envelope.getMinY(), DELTA);
  		Assert.assertEquals(100.00000376900834, envelope.getMaxX(), DELTA);
  		Assert.assertEquals(50.33697512339748, envelope.getMaxY(), DELTA);
  
  		coordinate = new Coordinate(10000, 10000);
  		envelope = geocoderUtilService.extendPoint(coordinate, crs, 200, 100);
  		Assert.assertEquals(9899.999874146251, envelope.getMinX(), DELTA);
  		Assert.assertEquals(9949.6629648107, envelope.getMinY(), DELTA);
  		Assert.assertEquals(10100.000125853749, envelope.getMaxX(), DELTA);
  		Assert.assertEquals(10050.3370351893, envelope.getMaxY(), DELTA);
  
  		crs = geoService.getCrs("EPSG:4326");
  		coordinate = new Coordinate(0, 0);
  		envelope = geocoderUtilService.extendPoint(coordinate, crs, 200, 100);
  		Assert.assertEquals(-8.983152841199021E-4, envelope.getMinX(), DELTA);
  		Assert.assertEquals(-4.5218473391466234E-4, envelope.getMinY(), DELTA);
  		Assert.assertEquals(8.983152841199021E-4, envelope.getMaxX(), DELTA);
  		Assert.assertEquals(4.5218473391466234E-4, envelope.getMaxY(), DELTA);
  
  		coordinate = new Coordinate(100, 50);
  		envelope = geocoderUtilService.extendPoint(coordinate, crs, 200, 100);
  		Assert.assertEquals(99.99860521715158, envelope.getMinX(), DELTA);
  		Assert.assertEquals(49.99955048109636, envelope.getMinY(), DELTA);
  		Assert.assertEquals(100.00139478284842, envelope.getMaxX(), DELTA);
  		Assert.assertEquals(50.00044951890364, envelope.getMaxY(), DELTA);
  	}
test_case.class_method_signature: GeocoderUtilServiceTest.extendPointTest()
test_case.full_signature: @Test public void extendPointTest()
test_case.identifier: extendPointTest
test_case.invocations: getCrs extendPoint assertEquals getMinX assertEquals getMinY assertEquals getMaxX assertEquals getMaxY extendPoint assertEquals getMinX assertEquals getMinY assertEquals getMaxX assertEquals getMaxY getCrs extendPoint assertEquals getMinX assertEquals getMinY assertEquals getMaxX assertEquals getMaxY extendPoint assertEquals getMinX assertEquals getMinY assertEquals getMaxX assertEquals getMaxY
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void extendPointTest()
focal_class.declarator: EXTEND_MAPUNIT_TEST_LENGTH = .1
focal_class.modifier: private static final
focal_class.original_string: private static final double EXTEND_MAPUNIT_TEST_LENGTH = .1;
focal_class.type: double
focal_class.var_name: EXTEND_MAPUNIT_TEST_LENGTH
focal_class.declarator: DISTANCE_PRECISION = .001
focal_class.modifier: private static final
focal_class.original_string: private static final double DISTANCE_PRECISION = .001;
focal_class.type: double
focal_class.var_name: DISTANCE_PRECISION
focal_class.declarator: EXTEND_MAX_ITERATIONS = 5
focal_class.modifier: private static final
focal_class.original_string: private static final int EXTEND_MAX_ITERATIONS = 5;
focal_class.type: int
focal_class.var_name: EXTEND_MAX_ITERATIONS
focal_class.declarator: geoService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private GeoService geoService;
focal_class.type: GeoService
focal_class.var_name: geoService
focal_class.file: plugin/geocoder/geocoder/src/main/java/org/geomajas/plugin/geocoder/service/GeocoderUtilService.java
focal_class.identifier: GeocoderUtilService
focal_class.class_method_signature: GeocoderUtilService.transform(Envelope source, CoordinateReferenceSystem sourceCrs, CoordinateReferenceSystem targetCrs)
focal_class.full_signature: public Envelope transform(Envelope source, CoordinateReferenceSystem sourceCrs, CoordinateReferenceSystem targetCrs)
focal_class.identifier: transform
focal_class.modifiers: public
focal_class.parameters: (Envelope source, CoordinateReferenceSystem sourceCrs, CoordinateReferenceSystem targetCrs)
focal_class.return: Envelope
focal_class.signature: Envelope transform(Envelope source, CoordinateReferenceSystem sourceCrs, CoordinateReferenceSystem targetCrs)
focal_class.class_method_signature: GeocoderUtilService.extendPoint(Coordinate coordinate, CoordinateReferenceSystem crs,
  								double width, double height)
focal_class.full_signature: public Envelope extendPoint(Coordinate coordinate, CoordinateReferenceSystem crs,
  								double width, double height)
focal_class.identifier: extendPoint
focal_class.modifiers: public
focal_class.parameters: (Coordinate coordinate, CoordinateReferenceSystem crs,
  								double width, double height)
focal_class.return: Envelope
focal_class.signature: Envelope extendPoint(Coordinate coordinate, CoordinateReferenceSystem crs,
  								double width, double height)
focal_method.body: public Envelope extendPoint(Coordinate coordinate, CoordinateReferenceSystem crs,
  								double width, double height) throws GeomajasException {
  		double halfCrsWidth = EXTEND_MAPUNIT_TEST_LENGTH;
  		double halfCrsHeight = EXTEND_MAPUNIT_TEST_LENGTH;
  		double x = coordinate.x;
  		double y = coordinate.y;
  		for (int i = EXTEND_MAX_ITERATIONS; i > 0; i--) {
  			try {
  				Coordinate test;
  				test = new Coordinate(x + halfCrsWidth, y);
  				double deltaX = JTS.orthodromicDistance(coordinate, test, crs);
  				test = new Coordinate(x, y + halfCrsHeight);
  				double deltaY = JTS.orthodromicDistance(coordinate, test, crs);
  				if (Math.abs(deltaX - width / 2) < DISTANCE_PRECISION &&
  						Math.abs(deltaY - height / 2) < DISTANCE_PRECISION) {
  					break;
  				}
  				halfCrsWidth = halfCrsWidth / deltaX * width / 2;
  				halfCrsHeight = halfCrsHeight / deltaY * height / 2;
  			} catch (TransformException te) {
  				throw new GeomajasException(te, ExceptionCode.GEOMETRY_TRANSFORMATION_FAILED, crs);
  			}
  		}
  		return new Envelope(x - halfCrsWidth, x + halfCrsWidth, y - halfCrsHeight, y + halfCrsHeight);
  	}
focal_method.class_method_signature: GeocoderUtilService.extendPoint(Coordinate coordinate, CoordinateReferenceSystem crs,
  								double width, double height)
focal_method.full_signature: public Envelope extendPoint(Coordinate coordinate, CoordinateReferenceSystem crs,
  								double width, double height)
focal_method.identifier: extendPoint
focal_method.invocations: orthodromicDistance orthodromicDistance abs abs
focal_method.modifiers: public
focal_method.parameters: (Coordinate coordinate, CoordinateReferenceSystem crs,
  								double width, double height)
focal_method.return: Envelope
focal_method.signature: Envelope extendPoint(Coordinate coordinate, CoordinateReferenceSystem crs,
  								double width, double height)