/** * Information about the named gridcoverage. * * @param subname Name indicing grid coverage to describe * @return ResourceInfo describing grid coverage indicated */ public synchronized ResourceInfo getInfo(String subname) { if (this.resourceInfo != null) return new DefaultResourceInfo(this.resourceInfo); DefaultResourceInfo localInfo = new DefaultResourceInfo(); resourceInfo = localInfo; localInfo.setName(subname); localInfo.setBounds(new ReferencedEnvelope(this.getOriginalEnvelope())); localInfo.setCRS(this.getCrs()); localInfo.setTitle(subname); return new DefaultResourceInfo(this.resourceInfo); }
/** @see org.geotools.data.FeatureSource#getInfo() */ @Override public ResourceInfo getInfo() { DefaultResourceInfo info = new DefaultResourceInfo(); ReferencedEnvelope bounds; try { bounds = getBounds(); if (bounds != null) { info.setBounds(bounds); info.setCRS(bounds.getCoordinateReferenceSystem()); } } catch (IOException e) { Throwables.propagate(e); } info.setName(getName().getLocalPart()); info.setDescription("GeoGit backed Feature Source"); return info; }