Gianpaolo Coro 2013-04-23 12:37:50 +00:00
parent 5763fdd5b2
commit b360d9f717
3 changed files with 18 additions and 6 deletions

View File

@ -109,11 +109,22 @@ public class ThreddsFetcher {
metadataInserter.setAbstractField(generateAbstractField(gdt.getFullName(), filename, description, gdt.getUnitsString().trim(), hStartDate, hEndDate, duration, resolution, numberOfDimensions, gds.getTitle(), gds.getDescription()));
metadataInserter.setResolution(Math.max(resolutionX, resolutionY));
// set Bounding box
double minX = ThreddsDataExplorer.getMinX(gdt.getCoordinateSystem());
double maxX = ThreddsDataExplorer.getMaxX(gdt.getCoordinateSystem());
double minY = ThreddsDataExplorer.getMinY(gdt.getCoordinateSystem());
double maxY = ThreddsDataExplorer.getMaxY(gdt.getCoordinateSystem());
metadataInserter.setXLeftLow(ThreddsDataExplorer.getMinX(gdt.getCoordinateSystem()));
metadataInserter.setYLeftLow(ThreddsDataExplorer.getMinY(gdt.getCoordinateSystem()));
metadataInserter.setXRightUpper(ThreddsDataExplorer.getMaxX(gdt.getCoordinateSystem()));
metadataInserter.setYRightUpper(ThreddsDataExplorer.getMaxY(gdt.getCoordinateSystem()));
if (gds.getTitle().toUpperCase().contains("WORLD OCEAN ATLAS"))
{
AnalysisLogger.getLogger().debug("Managing WoA Layer");
minX = minX-180;
maxX = maxX-180;
}
metadataInserter.setXLeftLow(minX);
metadataInserter.setYLeftLow(minY);
metadataInserter.setXRightUpper(maxX);
metadataInserter.setYRightUpper(maxY);
//set keywords
metadataInserter.setCustomTopics(filename, description,numberOfDimensions+"D",gds.getTitle(),gds.getDescription());

View File

@ -405,8 +405,8 @@ public class NetCDFMetadata {
format1.setName(new DefaultInternationalString("WMS"));
format1.setVersion(new DefaultInternationalString("1.1.0"));
DefaultFormat format2 = new DefaultFormat();
format2.setName(new DefaultInternationalString("WFS"));
format2.setVersion(new DefaultInternationalString("1.1.0"));
format2.setName(new DefaultInternationalString("OPeNDAP"));
format2.setVersion(new DefaultInternationalString("2.0.0"));
DefaultFormat format3 = new DefaultFormat();
format3.setName(new DefaultInternationalString("WCS"));
format3.setVersion(new DefaultInternationalString("1.0.0"));

View File

@ -66,6 +66,7 @@ public final class CrsHelper {
for (Object codeObj : CRS.getSupportedCodes("urn:ogc:def")) {
SUPPORTED_CRS_CODES.add((String) codeObj);
}
System.out.println("Supported Codes:"+SUPPORTED_CRS_CODES);
}
/** Private constructor to prevent direct instantiation */