public static String relate(Geometry arg0, Geometry arg1) { if (arg0 == null || arg1 == null) return null; Geometry _this = arg0; return _this.relate(arg1).toString(); }
@DescribeProcess( title = "Relate Matrix String", description = "Returns the DE-9IM intersection matrix string for the spatial relationship between the input geometries. The matrix string is in the form [II][IB][IE][BI][BB][BE][EI][EB][EE] where I=interior, B=boundary, and E=exterior. Matrix symbols are 2, 1, 0 or F." ) @DescribeResult(description = "Intersection matrix string") public static String relate( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.relate(b).toString(); }
public static String relate(Geometry a, Geometry b) { return a.relate(b).toString(); } public static boolean intersects(Geometry a, Geometry b) { return a.intersects(b); }
/** * @param a Geometry Geometry. * @param b Geometry instance * @return 9-character String representation of the 2 geometries IntersectionMatrix */ public static String relate(Geometry a,Geometry b) { if(a==null || b==null) { return null; } return a.relate(b).toString(); }
public static String ST_Relate(byte[] wkb1, byte[] wkb2) { Geometry geometry1 = gFromWKB(wkb1); Geometry geometry2 = gFromWKB(wkb1); if (geometry1 != null && geometry2 != null) { IntersectionMatrix result = geometry1.relate(geometry2); return result.toString(); } return null; }
public static String ST_Relate(byte[] wkb1, byte[] wkb2) { Geometry geometry1 = gFromWKB(wkb1); Geometry geometry2 = gFromWKB(wkb1); if (geometry1 != null && geometry2 != null) { IntersectionMatrix result = geometry1.relate(geometry2); return result.toString(); } return null; }
private String htmlForRelateTest(TestCaseEdit testCaseEdit, int caseSkey) { String actualValue; try { actualValue = insertParagraphs(testCaseEdit.getGeometry(0).relate(testCaseEdit.getGeometry(1)).toString()); } catch (Exception e) { actualValue = StringUtil.replace(StringUtil.getStackTrace(e, STACK_TRACE_DEPTH), "\n", "<BR>", true); e.printStackTrace(System.out); } String html = " <TR>" + StringUtil.newLine + " <TD class=methodTitle rowspan=9>relate</TD>" + StringUtil.newLine + " <TD rowspan=9>" + actualValue + "</TD>" + StringUtil.newLine + " </TR>" + StringUtil.newLine; return html; }
void runRelateTest(String wkt1, String wkt2, String expectedIM) throws ParseException { Geometry g1 = rdr.read(wkt1); Geometry g2 = rdr.read(wkt2); IntersectionMatrix im = RelateOp.relate(g1, g2); String imStr = im.toString(); //System.out.println(imStr); assertTrue(im.matches(expectedIM)); } }
void runRelateTest(String wkt1, String wkt2, BoundaryNodeRule bnRule, String expectedIM) throws ParseException { Geometry g1 = rdr.read(wkt1); Geometry g2 = rdr.read(wkt2); IntersectionMatrix im = RelateOp.relate(g1, g2, bnRule); String imStr = im.toString(); //System.out.println(imStr); assertTrue(im.matches(expectedIM)); } }
String msg = " expected " + expectedIM + ", found " + im.toString(); assertTrue(im.matches(expectedIM), msg);