/** Returns the Well Known Text of the geometry. */ public static String AsWKT(byte[] wkb) { if (wkb == null) { return null; } return fromWKB(wkb).toText(); }
/** * Returns the type of the geometry as a string. Eg: 'LINESTRING', 'POLYGON', 'MULTIPOINT', etc. * * <p>This method returns <code>null</code> when <tt>wkb</tt> is <code>null</code>. * * @param wkb The geometry. */ public static String GeometryType(byte[] wkb) { if (wkb == null) { return null; } Geometry g = fromWKB(wkb); return g != null ? g.getGeometryType().toUpperCase() : null; }
/** * Returns the spatial reference identifier for the geometry. * * <p>This method will return -1 if <tt>wkb</tt> is <code>null</code>. * * @param wkb The geometry. * @return The srid. */ public static int GetSRID(byte[] wkb) { if (wkb == null) { return -1; } return fromWKB(wkb).getSRID(); }
/** * Returns the envelope for a geometry. * * <p>This method will return an "null" envelope ({@link Envelope#setToNull()}) if <tt>wkb</tt> * is <code>null</code>. * * @param wkb The geometry. * @return The envelope of the geometry. */ public static Envelope Envelope(byte[] wkb) { if (wkb == null) { Envelope e = new Envelope(); e.setToNull(); return e; } return fromWKB(wkb).getEnvelopeInternal(); }
/** * Returns the Well Known Text of the geometry. */ public static String AsWKT( byte[] wkb ) { if ( wkb == null ) { return null; } return fromWKB(wkb).toText(); }
/** * Returns the spatial reference identifier for the geometry. * <p> * This method will return -1 if <tt>wkb</tt> is <code>null</code>. * </p> * @param wkb The geometry. * * @return The srid. */ public static int GetSRID( byte[] wkb ) { if ( wkb == null ) { return -1; } return fromWKB(wkb).getSRID(); }
/** * Returns the type of the geometry as a string. Eg: 'LINESTRING', 'POLYGON', * 'MULTIPOINT', etc. * <p> * This method returns <code>null</code> when <tt>wkb</tt> is <code>null</code>. * </p> * @param wkb The geometry. */ public static String GeometryType( byte[] wkb ) { if ( wkb == null ) { return null; } Geometry g = fromWKB( wkb ); return g != null ? g.getGeometryType().toUpperCase() : null; }
/** * Returns the envelope for a geometry. * <p> * This method will return an "null" envelope ({@link Envelope#setToNull()}) * if <tt>wkb</tt> is <code>null</code>. * </p> * @param wkb The geometry. * @return The envelope of the geometry. */ public static Envelope Envelope( byte[] wkb ) { if ( wkb == null ) { Envelope e = new Envelope(); e.setToNull(); return e; } return fromWKB(wkb).getEnvelopeInternal(); }