// Path: src/main/java/org/openstreetmap/osmaxil/model/ElevationImport.java
// public class ElevationImport extends AbstractImport {
// 
// 	// private Coordinates coordinates;
// 
// 	public float x, y, z;
// 
// 	public ElevationImport(float x, float y, float z) {
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 		this.setId(Math.round(z));
// 	}
// 
// 	@Override
// 	public String getValueByTagName(String tagName) {
// 		return "Sorry, there is no tag for that type of import";
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "Elevation import with x=" + x + " y=" + y + " z=" + z;
// 	}
// 
// }
// 
// Path: src/main/java/org/openstreetmap/osmaxil/model/misc/Coordinates.java
// public class Coordinates {
// 
// 	public String x;
// 
// 	public String y;
// 
// 	public String z;
// 
// 	public Coordinates(String x, String y, String z) {
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 	}
// 
// }


import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import org.openstreetmap.osmaxil.model.ElevationImport;
import org.openstreetmap.osmaxil.model.misc.Coordinates;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;

package org.openstreetmap.osmaxil.dao;



//@Service("ElevationDatabase") @Scope("prototype") @Lazy
public class ElevationDatabase implements ElevationDataSource {

	// @Autowired @Qualifier("elevationPostgisJdbcTemplate")
	private JdbcTemplate jdbcTemplate;

	public int srid;

	private String tableName;

	public ElevationDatabase(String tableName, int srid, JdbcTemplate jdbcTemplate) {
		this.init(tableName, srid);
		this.jdbcTemplate = jdbcTemplate;
	}

	////////////////////////////////////////////////////////////////////////////////
	// Public overrided methods
	////////////////////////////////////////////////////////////////////////////////

	@Override
	public void init(String tableName, int srid) {
		this.tableName = tableName;
		this.srid = srid;
	}

	@Override

// Path: src/main/java/org/openstreetmap/osmaxil/model/ElevationImport.java
// public class ElevationImport extends AbstractImport {
// 
// 	// private Coordinates coordinates;
// 
// 	public float x, y, z;
// 
// 	public ElevationImport(float x, float y, float z) {
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 		this.setId(Math.round(z));
// 	}
// 
// 	@Override
// 	public String getValueByTagName(String tagName) {
// 		return "Sorry, there is no tag for that type of import";
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "Elevation import with x=" + x + " y=" + y + " z=" + z;
// 	}
// 
// }
// 
// Path: src/main/java/org/openstreetmap/osmaxil/model/misc/Coordinates.java
// public class Coordinates {
// 
// 	public String x;
// 
// 	public String y;
// 
// 	public String z;
// 
// 	public Coordinates(String x, String y, String z) {
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 	}
// 
// }


// Path: src/main/java/org/openstreetmap/osmaxil/dao/ElevationDatabase.java
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import org.openstreetmap.osmaxil.model.ElevationImport;
import org.openstreetmap.osmaxil.model.misc.Coordinates;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;

package org.openstreetmap.osmaxil.dao;



//@Service("ElevationDatabase") @Scope("prototype") @Lazy
public class ElevationDatabase implements ElevationDataSource {

	// @Autowired @Qualifier("elevationPostgisJdbcTemplate")
	private JdbcTemplate jdbcTemplate;

	public int srid;

	private String tableName;

	public ElevationDatabase(String tableName, int srid, JdbcTemplate jdbcTemplate) {
		this.init(tableName, srid);
		this.jdbcTemplate = jdbcTemplate;
	}

	////////////////////////////////////////////////////////////////////////////////
	// Public overrided methods
	////////////////////////////////////////////////////////////////////////////////

	@Override
	public void init(String tableName, int srid) {
		this.tableName = tableName;
		this.srid = srid;
	}

	@Override

	public ElevationImport findElevationByCoordinates(float x, float y, float valueScale, int srid) {
