@Override
public void handle(OsmWay way) throws IOException
{
Geometry osmGeometry = null;
try {
osmGeometry = builder.build(way, dataSet);
if (osmGeometry instanceof LinearRing) {
osmGeometry = new Polygon((LinearRing) osmGeometry, null, GEOMETRY_FACTORY);
}
} catch (IllegalArgumentException e) {
log.warn("Could not build way (illegal argument): {}", e.getMessage());
} catch (EntityNotFoundException e) {
log.warn("Could not build way (entity not found): {}", e.getMessage());
}
ways.put(way.getId(), way);
handleEntity(way, osmGeometry);
}