@Override public String getDescription() { return s.getDescription(); }
public void setStations(List<StationFeature> stns) throws IOException { this.stnList = stns; // see if there's altitude, wmoId for any stations for (StationFeature stn : stnList) { if (!Double.isNaN(stn.getAltitude())) useAlt = true; if ((stn.getWmoId() != null) && (stn.getWmoId().trim().length() > 0)) useWmoId = true; if ((stn.getDescription() != null) && (stn.getDescription().trim().length() > 0)) useDesc = true; // find string lengths id_strlen = Math.max(id_strlen, stn.getName().length()); if (stn.getDescription() != null) desc_strlen = Math.max(desc_strlen, stn.getDescription().length()); if (stn.getWmoId() != null) wmo_strlen = Math.max(wmo_strlen, stn.getWmoId().length()); } llbb = CFPointWriterUtils.getBoundingBox(stnList); // gets written in super.finish(); }
public void setStations(List<StationFeature> stns) throws IOException { this.stnList = stns; // see if there's altitude, wmoId for any stations for (StationFeature stn : stnList) { if (!Double.isNaN(stn.getAltitude())) useAlt = true; if ((stn.getWmoId() != null) && (stn.getWmoId().trim().length() > 0)) useWmoId = true; if ((stn.getDescription() != null) && (stn.getDescription().trim().length() > 0)) useDesc = true; // find string lengths id_strlen = Math.max(id_strlen, stn.getName().length()); if (stn.getDescription() != null) desc_strlen = Math.max(desc_strlen, stn.getDescription().length()); if (stn.getWmoId() != null) wmo_strlen = Math.max(wmo_strlen, stn.getWmoId().length()); } llbb = CFPointWriterUtils.getBoundingBox(stnList); // gets written in super.finish(); }
private void writeStationData(StationFeature stn) throws IOException { StructureDataScalar stnCoords = new StructureDataScalar("Coords"); stnCoords.addMember(latName, null, null, DataType.DOUBLE, stn.getLatLon().getLatitude()); stnCoords.addMember(lonName, null, null, DataType.DOUBLE, stn.getLatLon().getLongitude()); if (useAlt) stnCoords.addMember(stationAltName, null, null, DataType.DOUBLE, stn.getAltitude()); stnCoords.addMemberString(stationIdName, null, null, stn.getName().trim(), id_strlen); if (useDesc) stnCoords.addMemberString(descName, null, null, stn.getDescription().trim(), desc_strlen); if (useWmoId) stnCoords.addMemberString(wmoName, null, null, stn.getWmoId().trim(), wmo_strlen); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(stnCoords); // coords first so it takes precedence sdall.add(stn.getFeatureData()); stnRecno = super.writeStructureData(stnRecno, stationStruct, sdall, stationVarMap); }
private void writeStationData(StationFeature stn) throws IOException { StructureDataScalar stnCoords = new StructureDataScalar("Coords"); stnCoords.addMember(latName, null, null, DataType.DOUBLE, false, stn.getLatLon().getLatitude()); stnCoords.addMember(lonName, null, null, DataType.DOUBLE, false, stn.getLatLon().getLongitude()); stnCoords.addMember(stationAltName, null, null, DataType.DOUBLE, false, stn.getAltitude()); stnCoords.addMemberString(stationIdName, null, null, stn.getName().trim(), id_strlen); if (useDesc) stnCoords.addMemberString(descName, null, null, stn.getDescription().trim(), desc_strlen); if (useWmoId) stnCoords.addMemberString(wmoName, null, null, stn.getWmoId().trim(), wmo_strlen); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(stnCoords); // coords first so it takes precedence sdall.add(stn.getFeatureData()); stnRecno = super.writeStructureData(stnRecno, stationStruct, sdall, featureVarMap); }
private void writeStationData(StationFeature stn) throws IOException { StructureDataScalar stnCoords = new StructureDataScalar("Coords"); stnCoords.addMember(latName, null, null, DataType.DOUBLE, false, stn.getLatLon().getLatitude()); stnCoords.addMember(lonName, null, null, DataType.DOUBLE, false, stn.getLatLon().getLongitude()); if (useAlt) stnCoords.addMember(stationAltName, null, null, DataType.DOUBLE, false, stn.getAltitude()); stnCoords.addMemberString(stationIdName, null, null, stn.getName().trim(), id_strlen); if (useDesc) stnCoords.addMemberString(descName, null, null, stn.getDescription().trim(), desc_strlen); if (useWmoId) stnCoords.addMemberString(wmoName, null, null, stn.getWmoId().trim(), wmo_strlen); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(stnCoords); // coords first so it takes precedence sdall.add(stn.getFeatureData()); stnRecno = super.writeStructureData(stnRecno, stationStruct, sdall, stationVarMap); }
private void writeStationData(StationFeature stn) throws IOException { StructureDataScalar stnCoords = new StructureDataScalar("Coords"); stnCoords.addMember(latName, null, null, DataType.DOUBLE, stn.getLatLon().getLatitude()); stnCoords.addMember(lonName, null, null, DataType.DOUBLE, stn.getLatLon().getLongitude()); stnCoords.addMember(stationAltName, null, null, DataType.DOUBLE, stn.getAltitude()); stnCoords.addMemberString(stationIdName, null, null, stn.getName().trim(), id_strlen); if (useDesc) stnCoords.addMemberString(descName, null, null, stn.getDescription().trim(), desc_strlen); if (useWmoId) stnCoords.addMemberString(wmoName, null, null, stn.getWmoId().trim(), wmo_strlen); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(stnCoords); // coords first so it takes precedence sdall.add(stn.getFeatureData()); stnRecno = super.writeStructureData(stnRecno, stationStruct, sdall, featureVarMap); }