com.vividsolutions.jts.io.ParseException.getLocalizedMessage()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中com.vividsolutions.jts.io.ParseException.getLocalizedMessage()方法的一些代码示例,展示了ParseException.getLocalizedMessage()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ParseException.getLocalizedMessage()方法的具体详情如下:
包路径:com.vividsolutions.jts.io.ParseException
类名称:ParseException
方法名:getLocalizedMessage

ParseException.getLocalizedMessage介绍

暂无

代码示例

代码示例来源:origin: org.geotools/gt-imagemosaic

LOGGER.log(Level.FINE, e.getLocalizedMessage(), e);

代码示例来源:origin: deegree/deegree3

} catch ( ParseException e ) {
  LOG.info( "WKB from the DB could not be parsed: '{}'.",
       e.getLocalizedMessage() );
  LOG.info( "For PostGIS users: you have to select the geometry field 'asbinary(geometry)'." );
  LOG.trace( "Stack trace:", e );

代码示例来源:origin: deegree/deegree3

return null;
} catch ( ParseException e ) {
  LOG.info( "BBox could not be read: '{}'.", e.getLocalizedMessage() );
  LOG.trace( "Stack trace:", e );
  available = false;

代码示例来源:origin: deegree/deegree3

@Override
  public <T> TypedObjectNode[] evaluate( T obj, XPathEvaluator<T> xpathEvaluator )
              throws FilterEvaluationException {
    TypedObjectNode[] crs = getParams()[0].evaluate( obj, xpathEvaluator );
    TypedObjectNode[] geom = getParams()[1].evaluate( obj, xpathEvaluator );
    if ( crs.length != 1 ) {
      throw new FilterEvaluationException( "The GeometryFromWKT function's first argument must "
                         + "evaluate to exactly one value." );
    }
    if ( geom.length != 1 ) {
      throw new FilterEvaluationException( "The GeometryFromWKT function's second argument must "
                         + "evaluate to exactly one value." );
    }
    ICRS srs = CRSManager.getCRSRef( crs[0].toString() );
    String wkt = geom[0].toString();
    WKTReader reader = new WKTReader( srs );
    try {
      return new TypedObjectNode[] { reader.read( wkt ) };
    } catch ( ParseException e ) {
      LOG.trace( "Stack trace:", e );
      throw new FilterEvaluationException( "GeometryFromWKT error while parsing WKT: "
                         + e.getLocalizedMessage() );
    }
  }
};

相关文章