All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vividsolutions.jtstest.testbuilder.geom.GeometryUtil Maven / Gradle / Ivy

The newest version!
package com.vividsolutions.jtstest.testbuilder.geom;

import com.vividsolutions.jts.geom.*;

public class GeometryUtil {

  public static String structureSummary(Geometry g)
  {
    String structure = "";
    if (g instanceof Polygon) {
      structure = ((Polygon) g).getNumInteriorRing() + " holes" ;
    }
    else if (g instanceof GeometryCollection)
      structure = g.getNumGeometries() + " elements";

    return
    g.getGeometryType().toUpperCase() 
    +  " - " + structure
    + (structure.length() > 0 ? ", " : "")
    + g.getNumPoints() + " pts";
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy