@Test public void testCentroidPolygon() throws ParseException { System.out.println(GeoUtil.centroidWKT(COLUMBIA_WKT)); }
public static String centroidWKT(String geometryWKT) { String pointWKT = ""; try { Geometry geometry = reader.read(geometryWKT); Point point = geometry.getCentroid(); pointWKT = writer.write(point); } catch (ParseException e) { throw new RuntimeException(e.getMessage()); } return pointWKT; }
GeoUtil { public static String centroidWKT(String geometryWKT) { String pointWKT = ""; try { Geometry geometry = reader.read(geometryWKT); Point point = geometry.getCentroid(); pointWKT = writer.write(point); } catch (ParseException e) { throw new RuntimeException(e.getMessage()); } return pointWKT; } }
GeoUtil { public static String centroidWKT(String geometryWKT) { String pointWKT = ""; try { Geometry geometry = reader.read(geometryWKT); Point point = geometry.getCentroid(); pointWKT = writer.write(point); } catch (ParseException e) { throw new RuntimeException(e.getMessage()); } return pointWKT; }  }
GeoUtil { public static String centroidWKT(String geometryWKT) { String pointWKT = ""; try { Geometry geometry = reader.read(geometryWKT); Point point = geometry.getCentroid(); pointWKT = writer.write(point); } catch (ParseException e) { throw new RuntimeException(e.getMessage()); } return pointWKT; }  static String centroidWKT(String geometryWKT); }
GeoUtil { public static String centroidWKT(String geometryWKT) { String pointWKT = ""; try { Geometry geometry = reader.read(geometryWKT); Point point = geometry.getCentroid(); pointWKT = writer.write(point); } catch (ParseException e) { throw new RuntimeException(e.getMessage()); } return pointWKT; }  static String centroidWKT(String geometryWKT);  }