cdm/src/main/java/ucar/nc2/ft2/coverage/remote/CdmrfWriter.java
public CdmrFeatureProto.CoverageDataResponse encodeDataResponse(Iterable<CoverageCoordAxis> axes,
        Iterable<CoverageCoordSys> coordSys, Iterable<CoverageTransform> transforms, List<GeoReferencedArray> arrays, boolean deflate) {

    CdmrFeatureProto.CoverageDataResponse.Builder builder = CdmrFeatureProto.CoverageDataResponse.newBuilder();
    for (CoverageCoordAxis axis : axes)
      builder.addCoordAxes( encodeCoordAxis(axis));
    for (CoverageCoordSys cs : coordSys)
      builder.addCoordSys(encodeCoordSys(cs));
    for (CoverageTransform t : transforms)
      builder.addCoordTransforms(encodeCoordTransform(t));
    for (GeoReferencedArray array : arrays)
      builder.addGeoArray(encodeGeoReferencedArray(array, deflate));

    return builder.build();
  }
public CdmrFeatureProto.CoverageDataResponse encodeDataResponse(Iterable<CoverageCoordAxis> axes,
        Iterable<CoverageCoordSys> coordSys, Iterable<CoverageTransform> transforms, List<GeoReferencedArray> arrays, boolean deflate) {

    CdmrFeatureProto.CoverageDataResponse.Builder builder = CdmrFeatureProto.CoverageDataResponse.newBuilder();
    for (CoverageCoordAxis axis : axes)
      builder.addCoordAxes( encodeCoordAxis(axis));
    for (CoverageCoordSys cs : coordSys)
      builder.addCoordSys(encodeCoordSys(cs));
    for (CoverageTransform t : transforms)
      builder.addCoordTransforms(encodeCoordTransform(t));
    for (GeoReferencedArray array : arrays)
      builder.addGeoArray(encodeGeoReferencedArray(array, deflate));

    return builder.build();
  }
public CdmrFeatureProto . CoverageDataResponse encodeDataResponse ( Iterable < CoverageCoordAxis > axes , Iterable < CoverageCoordSys > coordSys , Iterable < CoverageTransform > transforms , List < GeoReferencedArray > arrays , boolean deflate ) { CdmrFeatureProto . CoverageDataResponse . Builder builder = CdmrFeatureProto . CoverageDataResponse . newBuilder ( ) ; for ( CoverageCoordAxis axis : axes ) builder . addCoordAxes ( encodeCoordAxis ( axis ) ) ; for ( CoverageCoordSys cs : coordSys ) builder . addCoordSys ( encodeCoordSys ( cs ) ) ; for ( CoverageTransform t : transforms ) builder . addCoordTransforms ( encodeCoordTransform ( t ) ) ; for ( GeoReferencedArray array : arrays ) builder . addGeoArray ( encodeGeoReferencedArray ( array , deflate ) ) ; return builder . build ( ) ; }
/*
message GeoReferencedArray {
required string gridName = 1;          // full escaped name.
required DataType dataType = 2;
optional bool bigend = 3 [default = true];
optional uint32 version = 4 [default = 0];
optional Compress compress = 5 [default = NONE];
optional uint32 uncompressedSize = 6;

repeated uint32 shape = 7;            // the shape of the returned array
repeated string axisName = 8;         // each dimension corresponds to this axis
required string coordSysName = 9;     // must have coordAxis corresponding to shape
}

message DataResponse {
repeated CoordAxis coordAxes = 1;              // may be shared if asking for multiple grids
repeated CoordSys coordSys = 2;                // may be shared if asking for multiple grids

repeated GeoReferencedArray data = 4;
}
/ * message GeoReferencedArray { required string gridName = 1 ; // full escaped name . required DataType dataType = 2 ; optional bool bigend = 3 [ default = true ] ; optional uint32 version = 4 [ default = 0 ] ; optional Compress compress = 5 [ default = NONE ] ; optional uint32 uncompressedSize = 6 ;