public static Document genCoordRefSysAsGML(ucar.nc2.dataset.CoordinateSystem coordSys) { if (coordSys == null) throw new IllegalArgumentException("CoordinateSystem must be non-null."); if (!coordSys.isGeoReferencing()) throw new IllegalArgumentException("CoordinateSystem must be a georeferencing CS."); /*Element xyCrsElem; if ( coordSys.isGeoXY()) { xyCrsElem = genProjectedCRS( coordSys.getProjection()); } */ /* if (!coordSys.isGeoXY()) { coordSys.getLatAxis(); coordSys.getLonAxis(); } */ Element rootElem = new Element("CompoundCRS", gmlNS); rootElem.addContent(""); rootElem.addNamespaceDeclaration(gmlNS); rootElem.addNamespaceDeclaration(xlinkNS); // rootElem.setAttribute( "version", this.getVersion() ); return new Document(rootElem); }
public static Document genCoordRefSysAsGML( ucar.nc2.dataset.CoordinateSystem coordSys ) { if ( coordSys == null ) throw new IllegalArgumentException( "CoordinateSystem must be non-null."); if ( ! coordSys.isGeoReferencing()) throw new IllegalArgumentException( "CoordinateSystem must be a georeferencing CS."); /*Element xyCrsElem; if ( coordSys.isGeoXY()) { xyCrsElem = genProjectedCRS( coordSys.getProjection()); } */ if ( !coordSys.isGeoXY()) { coordSys.getLatAxis(); coordSys.getLonAxis(); } Element rootElem = new Element( "CompoundCRS", gmlNS ); rootElem.addContent( "" ); rootElem.addNamespaceDeclaration( gmlNS ); rootElem.addNamespaceDeclaration( xlinkNS ); // rootElem.setAttribute( "version", this.getVersion() ); return new Document( rootElem ); }
public static Document genCoordRefSysAsGML( ucar.nc2.dataset.CoordinateSystem coordSys ) { if ( coordSys == null ) throw new IllegalArgumentException( "CoordinateSystem must be non-null."); if ( ! coordSys.isGeoReferencing()) throw new IllegalArgumentException( "CoordinateSystem must be a georeferencing CS."); Element xyCrsElem; if ( coordSys.isGeoXY()) { xyCrsElem = genProjectedCRS( coordSys.getProjection()); } else { coordSys.getLatAxis(); coordSys.getLonAxis(); } Element rootElem = new Element( "CompoundCRS", gmlNS ); rootElem.addContent( "" ); rootElem.addNamespaceDeclaration( gmlNS ); rootElem.addNamespaceDeclaration( xlinkNS ); // rootElem.setAttribute( "version", this.getVersion() ); return new Document( rootElem ); }