Envelope env = geometry.getEnvelopeInternal();
if(env.getWidth() > SOLR_DISTANCE_TOLERANCE){
if(LOGGER.isLoggable(Level.FINE)){
LOGGER.fine("Split segment exceeds the 180 degree longitude limit to conform to SOLR WKT manager specification");
}
Densifier densifier = new Densifier(geometry);
densifier.setDistanceTolerance(SOLR_DISTANCE_TOLERANCE);
if(LOGGER.isLoggable(Level.FINE)){
LOGGER.fine("Original geometry: " + geometry.toText());
}
geometry = densifier.getResultGeometry();
if(LOGGER.isLoggable(Level.FINE)){
LOGGER.fine("Densified geometry: " + geometry.toText());
}
}
WKTWriter writer = new WKTWriter();