~ubuntu-branches/ubuntu/natty/jts/natty

« back to all changes in this revision

Viewing changes to test/vivid/TestWithinDistance.xml

  • Committer: Bazaar Package Importer
  • Author(s): Wolfgang Baer
  • Date: 2005-08-07 14:12:35 UTC
  • Revision ID: james.westby@ubuntu.com-20050807141235-7hy3ll3xpq79djcb
Tags: upstream-1.6
ImportĀ upstreamĀ versionĀ 1.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<run>
 
2
  <precisionModel scale="1.0" offsetx="0.0" offsety="0.0"/>
 
3
 
 
4
<case>
 
5
  <desc>PP - disjoint points</desc>
 
6
  <a>    POINT(10 10)  </a>
 
7
  <b>    POINT(100 100)  </b>
 
8
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="200">    true   </op></test>
 
9
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="100">    false  </op></test>
 
10
</case>
 
11
 
 
12
<case>
 
13
  <desc>PP - overlapping points</desc>
 
14
  <a>    POINT(10 10)  </a>
 
15
  <b>    POINT(10 10)  </b>
 
16
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="200">  true   </op></test>
 
17
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0">    true  </op></test>
 
18
</case>
 
19
 
 
20
<case>
 
21
  <desc>PL - point on linestring</desc>
 
22
  <a>    POINT (340 200)  </a>
 
23
  <b>    LINESTRING (80 280, 340 200, 80 80)  </b>
 
24
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0">    true   </op></test>
 
25
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10">   true  </op></test>
 
26
</case>
 
27
 
 
28
<case>
 
29
  <desc>PL - point not on linestring</desc>
 
30
  <a>    LINESTRING (100 100, 200 100, 200 200, 100 200, 100 100)  </a>
 
31
  <b>    POINT (10 10)  </b>
 
32
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="128">    true   </op></test>
 
33
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="127">    false  </op></test>
 
34
</case>
 
35
 
 
36
<case>
 
37
  <desc>PA - point inside polygon</desc>
 
38
  <a>    POINT (240 160)  </a>
 
39
  <b>    POLYGON ((100 260, 340 180, 100 60, 180 160, 100 260))  </b>
 
40
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0">    true   </op></test>
 
41
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10">   true  </op></test>
 
42
</case>
 
43
 
 
44
<case>
 
45
  <desc>mPA - points outside polygon</desc>
 
46
  <a>    POLYGON ((200 180, 60 140, 60 260, 200 180))  </a>
 
47
  <b>    MULTIPOINT (140 280, 140 320)  </b>
 
48
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="60">    true   </op></test>
 
49
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="57">    false  </op></test>
 
50
</case>
 
51
 
 
52
<case>
 
53
  <desc>LL - disjoint linestrings</desc>
 
54
  <a>    LINESTRING (40 300, 240 260, 60 160, 140 60)  </a>
 
55
  <b>    LINESTRING (140 360, 260 280, 240 120, 120 160)  </b>
 
56
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="18">    true   </op></test>
 
57
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="17">    false  </op></test>
 
58
</case>
 
59
 
 
60
<case>
 
61
  <desc>LL - crossing linestrings</desc>
 
62
  <a>    LINESTRING (40 300, 280 220, 60 160, 140 60)  </a>
 
63
  <b>    LINESTRING (140 360, 260 280, 240 120, 120 160)  </b>
 
64
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0">     true   </op></test>
 
65
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10">    true  </op></test>
 
66
</case>
 
67
 
 
68
<case>
 
69
  <desc>AA - overlapping polygons</desc>
 
70
  <a>    POLYGON ((60 260, 260 180, 100 60, 60 160, 60 260))  </a>
 
71
  <b>    POLYGON ((220 280, 120 160, 300 60, 360 220, 220 280))  </b>
 
72
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0">     true   </op></test>
 
73
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10">    true  </op></test>
 
74
</case>
 
75
 
 
76
<case>
 
77
  <desc>AA - disjoint polygons</desc>
 
78
  <a>    POLYGON ((100 320, 60 120, 240 180, 200 260, 100 320))  </a>
 
79
  <b>    POLYGON ((420 320, 280 260, 400 100, 420 320))  </b>
 
80
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="72">    true   </op></test>
 
81
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="71">    false  </op></test>
 
82
</case>
 
83
 
 
84
<case>
 
85
  <desc>mAmA - overlapping multipolygons</desc>
 
86
  <a>    MULTIPOLYGON (((40 240, 160 320, 40 380, 40 240)),   ((100 240, 240 60, 40 40, 100 240)))  </a>
 
87
  <b>    MULTIPOLYGON (((220 280, 120 160, 300 60, 360 220, 220 280)),   ((240 380, 280 300, 420 340, 240 380)))  </b>
 
88
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0">    true   </op></test>
 
89
<test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10">    true  </op></test>
 
90
</case>
 
91
 
 
92
</run>