本文整理了Java中org.geotools.referencing.CRS.getTemporalCRS()
方法的一些代码示例,展示了CRS.getTemporalCRS()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CRS.getTemporalCRS()
方法的具体详情如下:
包路径:org.geotools.referencing.CRS
类名称:CRS
方法名:getTemporalCRS
[英]Returns the first temporal coordinate reference system found in the given CRS, or null if there is none.
[中]返回给定CRS中找到的第一个时间坐标系,如果没有,则返回null。
代码示例来源:origin: geotools/geotools
/**
* Returns the first temporal coordinate reference system found in the given CRS, or {@code
* null} if there is none.
*
* @param crs The coordinate reference system, or {@code null}.
* @return The temporal CRS, or {@code null} if none.
* @since 2.4
*/
public static TemporalCRS getTemporalCRS(final CoordinateReferenceSystem crs) {
if (crs instanceof TemporalCRS) {
return (TemporalCRS) crs;
}
if (crs instanceof CompoundCRS) {
final CompoundCRS cp = (CompoundCRS) crs;
for (final CoordinateReferenceSystem c : cp.getCoordinateReferenceSystems()) {
final TemporalCRS candidate = getTemporalCRS(c);
if (candidate != null) {
return candidate;
}
}
}
return null;
}
代码示例来源:origin: org.geotools/gt2-coverage
} else {
this.coverage = coverage;
temporalCRS = DefaultTemporalCRS.wrap(CRS.getTemporalCRS(crs));
if (temporalCRS == null) {
throw new IllegalArgumentException(
内容来源于网络,如有侵权,请联系作者删除!