/** * Maybe we could add more error checking here? * * @param value String representing the geometry * @param bp BinaryParser to use whe parsing * @return Geometry object parsed from the specified string value * @throws SQLException when a SQLException occurs */ public static Geometry geomFromString(String value, BinaryParser bp) throws SQLException { return geomFromString(value, bp, false); }
/** * Maybe we could add more error checking here? * * @param value String representing the geometry * @param bp BinaryParser to use whe parsing * @return Geometry object parsed from the specified string value * @throws SQLException when a SQLException occurs */ public static Geometry geomFromString(String value, BinaryParser bp) throws SQLException { return geomFromString(value, bp, false); }
public static Geometry geomFromString(String value) throws SQLException { return geomFromString(value, false); }
protected Geometry createSubGeomInstance(String token, boolean haveM) throws SQLException { return PGgeometry.geomFromString(token, haveM); }
protected Geometry createSubGeomInstance(String token, boolean haveM) throws SQLException { return PGgeometry.geomFromString(token, haveM); }
public static Geometry geomFromString(String value) throws SQLException { return geomFromString(value, false); }
public static Geometry geomFromString(String value, boolean haveM) throws SQLException { BinaryParser bp = new BinaryParser(); return geomFromString(value, bp, haveM); }
public static Geometry geomFromString(String value, boolean haveM) throws SQLException { BinaryParser bp = new BinaryParser(); return geomFromString(value, bp, haveM); }
public void setValue(String value) throws SQLException { geom = geomFromString(value, new BinaryParser()); }
public void setValue(String value) throws SQLException { geom = geomFromString(value, new BinaryParser()); }
public Geometry read( String wkt ) throws ParseException { try { org.postgis.Geometry g = org.postgis.PGgeometry.geomFromString( wkt ); byte[] bs = new BinaryWriter().writeBinary( g ); return WKBReader.read( bs, crs ); } catch ( SQLException e ) { e.printStackTrace(); // wrap the exception nicely as to not break 172643521 API calls throw new ParseException( e ); } }