本文整理了Java中com.vividsolutions.jts.io.ParseException.printStackTrace()
方法的一些代码示例,展示了ParseException.printStackTrace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ParseException.printStackTrace()
方法的具体详情如下:
包路径:com.vividsolutions.jts.io.ParseException
类名称:ParseException
方法名:printStackTrace
暂无
代码示例来源:origin: aseldawy/spatialhadoop2
@Override
public void readFields(DataInput in) throws IOException {
try {
byte[] wkb = new byte[in.readInt()];
in.readFully(wkb);
geom = wkbReader.read(wkb);
} catch (ParseException e) {
e.printStackTrace();
throw new IOException(e);
}
}
代码示例来源:origin: osmlab/atlas
public static Geometry createJtsGeometryFromWKT(final String wktString)
{
Geometry geometry = null;
try
{
geometry = reader.read(wktString);
}
catch (final ParseException e)
{
e.printStackTrace();
}
return geometry;
};
代码示例来源:origin: FutureCitiesCatapult/TomboloDigitalConnector
public Geometry getShape(String wtk) throws FactoryException, TransformException {
GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(), Subject.SRID);
WKTReader reader = new WKTReader(geometryFactory);
MathTransform crsTransform = GeotoolsDataStoreUtils.makeCrsTransform("EPSG:27700");
try {
LineString line = (LineString) reader.read(wtk);
Geometry transformedGeom = JTS.transform(line, crsTransform);
return transformedGeom;
} catch (ParseException e) {
e.printStackTrace();
log.error("Not a valid geometry");
return null;
}
}
代码示例来源:origin: bcdev/beam
@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
if (placemark != null) {
final AttributeDescriptor attributeDescriptor
= placemark.getFeature().getFeatureType().getAttributeDescriptors().get(rowIndex);
final Class<?> binding = attributeDescriptor.getType().getBinding();
if (String.class.isAssignableFrom(binding)) {
placemark.setAttributeValue(attributeDescriptor.getLocalName(), aValue);
} else if (Geometry.class.isAssignableFrom(binding)) {
WKTReader reader = new WKTReader();
try {
final Geometry geometry = reader.read((String) aValue);
placemark.setAttributeValue(attributeDescriptor.getLocalName(), geometry);
} catch (ParseException e) {
// No way to handle this any further :(
e.printStackTrace();
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!