private static String getFirstGeometryField ( String tableName , Connection connection ) throws SQLException { // Find first geometry column List < String > geomFields = SFSUtilities . getGeometryFields ( connection , TableLocation . parse ( tableName , JDBCUtilities . isH2DataBase ( connection . getMetaData ( ) ) ) ) ; if ( ! geomFields . isEmpty ( ) ) { return geomFields . get ( 0 ) ; } else { throw new SQLException ( "The table " + tableName + " does not contain a geometry field" ) ; } }
Return the first spatial geometry field name