Examples of toText()


Examples of com.vividsolutions.jts.geom.Geometry.toText()

      this.splitResultList = new LinkedList<SimpleFeature>();
      boolean existSplit = false;
      for (SimpleFeature feature : this.featureList) {

        Geometry geomToSplit = (Geometry) feature.getDefaultGeometry();
        assert geomToSplit.isValid() : "No Valid Geometry: " + geomToSplit.toText(); //$NON-NLS-1$
        CoordinateReferenceSystem featureCrs = feature.getFeatureType()
            .getCoordinateReferenceSystem();
        geomToSplit = GeoToolsUtils.reproject(geomToSplit, featureCrs, this.desiredCRS);

        if (canSplit(geomToSplit)) {
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.toText()

                Geometry g = (Geometry) f.getDefaultGeometry();
                Point centroid = g.getCentroid();
               
                //robustness check for bad geometries
                if ( Double.isNaN( centroid.getX() ) || Double.isNaN( centroid.getY() ) ) {
                    LOGGER.warning( "Could not calculate centroid for feature " + f.getID() + "; g =  " + g.toText() );
                    continue;
                }
               
                coords[0] = centroid.getX();
                coords[1] = centroid.getY();
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.toText()

    .getResultSplitLine();
  AdaptedPolygon adaptedPolygon = this.usefulSplitLineBuilder
    .getAdaptedPolygon();

  LOGGER.fine("Adapted Polygon: " + adaptedPolygon.asPolygon().toText()); //$NON-NLS-1$
  LOGGER.fine("Util split line: " + utilSplitLine.toText()); //$NON-NLS-1$

  buildGraph(utilSplitLine, adaptedPolygon.asPolygon());

  return this;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.toText()

    } catch (TransformException e) {
      logger.error("Cannot perform the transformation!", e);
      return inGeomWKT;
    }

    return outGeom.toText();
  }
}
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.toText()

      sb.append("[");
      for (Iterator<Geometry> itr = geometries.iterator(); itr.hasNext();) {
        Geometry geometry = itr.next();
        sb.append("{");
        sb.append(geometry.toText());
        sb.append("}");
      }
      sb.append("]");

      return sb.toString();
View Full Code Here

Examples of com.vividsolutions.jts.geom.LineString.toText()

                    for( int i = 0; i < intersection.getNumGeometries(); i++ ) {
                        Point vertex = (Point) intersection.getGeometryN(i);
                        adaptedSegment = SplitUtil.insertVertexInLine(adaptedSegment, vertex.getCoordinate());
                    }
                }
                segmentMap.put(adaptedSegment.toText(), adaptedSegment );
            } else { // add the original segment
                segmentMap.put(segment.toText(), segment );
            }
        }
        return segmentMap;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Point.toText()

  public void testWriteLargeNumbers2() {
    PrecisionModel precisionModel = new PrecisionModel(1E9);
    GeometryFactory geometryFactory = new GeometryFactory(precisionModel, 0);
    Point point1 = geometryFactory.createPoint(new Coordinate(1234d, 10E9));
    assertEquals("POINT (1234 10000000000)", point1.toText());
  }

  public void testWriteLargeNumbers3() {
    PrecisionModel precisionModel = new PrecisionModel(1E9);
    GeometryFactory geometryFactory = new GeometryFactory(precisionModel, 0);
View Full Code Here

Examples of com.vividsolutions.jts.geom.Polygon.toText()

                Integer value = ((Number) feature.getAttribute("value")).intValue();
                System.out.println(value);
                assertTrue(expectedValues.remove(value));
               
                Polygon poly = (Polygon) feature.getDefaultGeometry();
                System.out.println(poly.toText());
                assertEquals(areas[value - 1], poly.getArea(), TOL);
            }
        } finally {
            iter.close();
        }
View Full Code Here

Examples of opennlp.tools.coref.mention.MentionContext.toText()

  @Override
  public String toString() {
    Iterator<MentionContext> ei = extents.iterator();
    MentionContext ex = ei.next();
    StringBuffer de = new StringBuffer();
    de.append("[ ").append(ex.toText());//.append("<").append(ex.getHeadText()).append(">");
    while (ei.hasNext()) {
      ex = ei.next();
      de.append(", ").append(ex.toText());//.append("<").append(ex.getHeadText()).append(">");
    }
    de.append(" ]");
View Full Code Here

Examples of opennlp.tools.coref.mention.MentionContext.toText()

    MentionContext ex = ei.next();
    StringBuffer de = new StringBuffer();
    de.append("[ ").append(ex.toText());//.append("<").append(ex.getHeadText()).append(">");
    while (ei.hasNext()) {
      ex = ei.next();
      de.append(", ").append(ex.toText());//.append("<").append(ex.getHeadText()).append(">");
    }
    de.append(" ]");
    return(de.toString());
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.