Revision 40034 trunk/extensions/extJDBC/src/com/iver/cit/gvsig/fmap/drivers/jdbc/postgis/PostGisDriver.java

View differences:

PostGisDriver.java
327 327
			try {
328 328
				Statement s = ((ConnectionJDBC) conn).getConnection()
329 329
						.createStatement();
330
				String query = "SELECT extent(\""
330
				String query = "SELECT ST_extent(\""
331 331
				    + getLyrDef().getFieldGeometry()
332 332
				    + "\") AS FullExtent FROM " + getLyrDef().getComposedTableName()
333 333
				    + " " + getCompleteWhere();
......
440 440
		double yMin = r.getMinY();
441 441
		double xMax = r.getMaxX();
442 442
		double yMax = r.getMaxY();
443
		String wktBox = "GeometryFromText('LINESTRING(" + xMin + " " + yMin
443
		String wktBox = "ST_GeometryFromText('LINESTRING(" + xMin + " " + yMin
444 444
		+ ", " + xMax + " " + yMin + ", " + xMax + " " + yMax + ", "
445 445
		+ xMin + " " + yMax + ")', " + strEPSG + ")";
446 446
		String sqlAux;
......
756 756
	 * @see com.iver.cit.gvsig.fmap.drivers.IVectorialDatabaseDriver#getGeometryField(java.lang.String)
757 757
	 */
758 758
	public String getGeometryField(String fieldName) {
759
	    return "AsEWKB(\"" + fieldName + "\", 'XDR')";
759
	    return "ST_AsEWKB(\"" + fieldName + "\", 'XDR')";
760 760
	}
761 761

  
762 762
	/**

Also available in: Unified diff