public static double [ ] getGaussianLatitudes ( String type , int start , int num ) throws IllegalArgumentException { double [ ] baseArray = null ; start -- ; // it's one based if ( type . equalsIgnoreCase ( GAUST62 ) ) { baseArray = gltst62 ; } else if ( type . equalsIgnoreCase ( GAUSR15 ) ) { baseArray = glts15 ; } else if ( type . equalsIgnoreCase ( GAUSR20 ) ) { baseArray = glts20 ; } else if ( type . equalsIgnoreCase ( GAUSR30 ) ) { baseArray = glts30 ; } else if ( type . equalsIgnoreCase ( GAUSR40 ) ) { baseArray = glats ; } else { throw new IllegalArgumentException ( "Unsupported type: " + type ) ; } if ( start + num > baseArray . length ) { throw new IllegalArgumentException ( "Maximum " + baseArray . length + " latitudes exceeded" ) ; } double [ ] retVals = new double [ num ] ; for ( int i = 0 ; i < num ; i ++ ) { retVals [ i ] = baseArray [ start + i ] ; } return retVals ; }
Get the latitude values for the given type .