private List createSiteVertices(Collection coords) { List verts = new ArrayList(); for (Iterator i = coords.iterator(); i.hasNext(); ) { Coordinate coord = (Coordinate) i.next(); if (constraintVertexMap.containsKey(coord)) continue; verts.add(new ConstraintVertex(coord)); } return verts; }
private void createVertices(Geometry geom) { Coordinate[] coords = geom.getCoordinates(); for (int i = 0; i < coords.length; i++) { Vertex v = new ConstraintVertex(coords[i]); constraintVertexMap.put(coords[i], v); } }
private ConstraintVertex createVertex(Coordinate p) { ConstraintVertex v = null; if (vertexFactory != null) v = vertexFactory.createVertex(p, null); else v = new ConstraintVertex(p); return v; }
/** * Creates a vertex on a constraint segment * * @param p the location of the vertex to create * @param seg the constraint segment it lies on * @return the new constraint vertex */ private ConstraintVertex createVertex(Coordinate p, Segment seg) { ConstraintVertex v = null; if (vertexFactory != null) v = vertexFactory.createVertex(p, seg); else v = new ConstraintVertex(p); v.setOnConstraint(true); return v; }
private List createSiteVertices(Collection coords) { List verts = new ArrayList(); for (Iterator i = coords.iterator(); i.hasNext(); ) { Coordinate coord = (Coordinate) i.next(); if (constraintVertexMap.containsKey(coord)) continue; verts.add(new ConstraintVertex(coord)); } return verts; }
private void createVertices(Geometry geom) { Coordinate[] coords = geom.getCoordinates(); for (int i = 0; i < coords.length; i++) { Vertex v = new ConstraintVertex(coords[i]); constraintVertexMap.put(coords[i], v); } }
private ConstraintVertex createVertex(Coordinate p) { ConstraintVertex v = null; if (vertexFactory != null) v = vertexFactory.createVertex(p, null); else v = new ConstraintVertex(p); return v; }
/** * Creates a vertex on a constraint segment * * @param p the location of the vertex to create * @param seg the constraint segment it lies on * @return the new constraint vertex */ private ConstraintVertex createVertex(Coordinate p, Segment seg) { ConstraintVertex v = null; if (vertexFactory != null) v = vertexFactory.createVertex(p, seg); else v = new ConstraintVertex(p); v.setOnConstraint(true); return v; }