public static void add(Object tag, Geometry geom, String msg) { if (!Debug.isDebugging()) return; FeatureDataset fd = getDebugFeatureDataset(tag); Feature feature = new BasicFeature(fd.getFeatureSchema()); feature.setGeometry(geom); feature.setAttribute(MESG_ATTR_NAME, msg); fd.add(feature); }
public static Feature createLineSegmentFeature( FeatureSchema fs, Coordinate p0, Coordinate p1, String msg) { Feature feature = new BasicFeature(fs); LineString lineSeg = fact.createLineString(new Coordinate[] {p0, p1}); feature.setGeometry(lineSeg); feature.setAttribute(MESG_ATTR_NAME, msg); return feature; }