public static Grib1Gds factory(int template, byte[] data) {
    """
	/*
	Code table 6 – Data representation type
	Code figure Meaning
	0 Latitude/longitude grid – equidistant cylindrical or Plate Carrée projection
	1 Mercator projection
	2 Gnomonic projection
	3 Lambert conformal, secant or tangent, conic or bi-polar, projection
	4 Gaussian latitude/longitude grid
	5 Polar stereographic projection
	6 Universal Transverse Mercator (UTM) projection
	7 Simple polyconic projection
	8 Albers equal-area, secant or tangent, conic or bi-polar, projection
	9 Miller’s cylindrical projection
	10 Rotated latitude/longitude grid
	11–12 Reserved
	13 Oblique Lambert conformal, secant or tangent, conic or bi-polar, projection
	14 Rotated Gaussian latitude/longitude grid
	15–19 Reserved
	20 Stretched latitude/longitude grid
	21–23 Reserved
	24 Stretched Gaussian latitude/longitude grid
	25–29 Reserved
	30 Stretched and rotated latitude/longitude grids
	31–33 Reserved
	34 Stretched and rotated Gaussian latitude/longitude grids
	35–49 Reserved
	^  50 Spherical harmonic coefficients
	51–59 Reserved
	60 Rotated spherical harmonic coefficients
	61–69 Reserved
	70 Stretched spherical harmonics
	71–79 Reserved
	80 Stretched and rotated spherical harmonic coefficients
	81–89 Reserved
	90 Space view, perspective or orthographic
	91–191 Reserved
	192–254 Reserved for local use
    """
    switch (template) {
      case 0:
        return new LatLon(data, 0);
      case 1:
        return new Mercator(data, 1);
      case 3:
        return new LambertConformal(data, 3);
      case 4:
        return new GaussianLatLon(data, 4);
      case 5:
        return new PolarStereographic(data, 5);
      case 10:
        return new RotatedLatLon(data, 10);
      case 50:
        return new SphericalHarmonicCoefficients(data, 50);
      default:
        return new UnknownGds(data, template);
    }
  }
public static Grib1Gds factory(int template, byte[] data) {
    switch (template) {
      case 0:
        return new LatLon(data, 0);
      case 1:
        return new Mercator(data, 1);
      case 3:
        return new LambertConformal(data, 3);
      case 4:
        return new GaussianLatLon(data, 4);
      case 5:
        return new PolarStereographic(data, 5);
      case 10:
        return new RotatedLatLon(data, 10);
      case 50:
        return new SphericalHarmonicCoefficients(data, 50);
      default:
        return new UnknownGds(data, template);
    }
  }
public static Grib1Gds factory ( int template , byte [ ] data ) { switch ( template ) { case 0 : return new LatLon ( data , 0 ) ; case 1 : return new Mercator ( data , 1 ) ; case 3 : return new LambertConformal ( data , 3 ) ; case 4 : return new GaussianLatLon ( data , 4 ) ; case 5 : return new PolarStereographic ( data , 5 ) ; case 10 : return new RotatedLatLon ( data , 10 ) ; case 50 : return new SphericalHarmonicCoefficients ( data , 50 ) ; default : return new UnknownGds ( data , template ) ; } }
/*
Code table 6 – Data representation type
Code figure Meaning
0 Latitude/longitude grid – equidistant cylindrical or Plate Carrée projection
1 Mercator projection
2 Gnomonic projection
3 Lambert conformal, secant or tangent, conic or bi-polar, projection
4 Gaussian latitude/longitude grid
5 Polar stereographic projection
6 Universal Transverse Mercator (UTM) projection
7 Simple polyconic projection
8 Albers equal-area, secant or tangent, conic or bi-polar, projection
9 Miller’s cylindrical projection
10 Rotated latitude/longitude grid
11–12 Reserved
13 Oblique Lambert conformal, secant or tangent, conic or bi-polar, projection
14 Rotated Gaussian latitude/longitude grid
15–19 Reserved
20 Stretched latitude/longitude grid
21–23 Reserved
24 Stretched Gaussian latitude/longitude grid
25–29 Reserved
30 Stretched and rotated latitude/longitude grids
31–33 Reserved
34 Stretched and rotated Gaussian latitude/longitude grids
35–49 Reserved
^  50 Spherical harmonic coefficients
51–59 Reserved
60 Rotated spherical harmonic coefficients
61–69 Reserved
70 Stretched spherical harmonics
71–79 Reserved
80 Stretched and rotated spherical harmonic coefficients
81–89 Reserved
90 Space view, perspective or orthographic
91–191 Reserved
192–254 Reserved for local use
/ * Code table 6 – Data representation type Code figure Meaning 0 Latitude / longitude grid – equidistant cylindrical or Plate Carrée projection 1 Mercator projection 2 Gnomonic projection 3 Lambert conformal secant or tangent conic or bi - polar projection 4 Gaussian latitude / longitude grid 5 Polar stereographic projection 6 Universal Transverse Mercator ( UTM ) projection 7 Simple polyconic projection 8 Albers equal - area secant or tangent conic or bi - polar projection 9 Miller’s cylindrical projection 10 Rotated latitude / longitude grid 11–12 Reserved 13 Oblique Lambert conformal secant or tangent conic or bi - polar projection 14 Rotated Gaussian latitude / longitude grid 15–19 Reserved 20 Stretched latitude / longitude grid 21–23 Reserved 24 Stretched Gaussian latitude / longitude grid 25–29 Reserved 30 Stretched and rotated latitude / longitude grids 31–33 Reserved 34 Stretched and rotated Gaussian latitude / longitude grids 35–49 Reserved ^ 50 Spherical harmonic coefficients 51–59 Reserved 60 Rotated spherical harmonic coefficients 61–69 Reserved 70 Stretched spherical harmonics 71–79 Reserved 80 Stretched and rotated spherical harmonic coefficients 81–89 Reserved 90 Space view perspective or orthographic 91–191 Reserved 192–254 Reserved for local use