コード例 #1
0
ファイル: DebugFeature.java プロジェクト: ssinger/roadmatcher
 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);
 }
コード例 #2
0
ファイル: DebugFeature.java プロジェクト: ssinger/roadmatcher
 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;
 }