public void toString(Formatter f, Indent indent) { indent.incr(); f.format("%s CoordTransform '%s'", indent, name); f.format(" isHoriz: %s%n", isHoriz()); if (projection != null) f.format(" projection: %s%n", projection); for (Attribute att : attributes.getAttributes()) f.format("%s %s%n", indent, att); f.format("%n"); indent.decr(); }
public CoverageTransform getHorizTransform() { for (String name : getTransformNames()) { CoverageTransform ct = dataset.findCoordTransform(name); if (ct != null && ct.isHoriz()) return ct; } return null; }
public ProjectionImpl getProjection() { for (String ctName : getTransformNames()) { CoverageTransform ct = dataset.findCoordTransform(ctName); if (ct != null && ct.isHoriz()) return ct.getProjection(); } return new LatLonProjection(); }
CdmrFeatureProto.CoordTransform.Builder encodeCoordTransform(CoverageTransform gct) { CdmrFeatureProto.CoordTransform.Builder builder = CdmrFeatureProto.CoordTransform.newBuilder(); builder.setIsHoriz(gct.isHoriz()); builder.setName(gct.getName()); for (Attribute att : gct.getAttributes()) builder.addParams(NcStream.encodeAtt(att)); return builder; }
private Element writeCoordTransform(CoverageTransform ct) { Element ctElem = new Element("coordTransform"); ctElem.setAttribute("name", ct.getName()); ctElem.setAttribute("transformType", ct.isHoriz() ? "Projection" : "Vertical"); for (Attribute param : ct.getAttributes()) { Element pElem = ncmlWriter.makeAttributeElement(param); pElem.setName("parameter"); ctElem.addContent(pElem); } return ctElem; }
if (ct != null && ct.isHoriz()) newV.addAttribute(new Attribute(CF.GRID_MAPPING, ct.getName()));