api.html 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. <div id="wiki-wrapper" class="page">
  2. <div id="head">
  3. <h1 class="instapaper_title">API Reference</h1>
  4. <ul class="wiki-actions readability-extra">
  5. <li class="gollum-minibutton">
  6. <a href="/phayes/geoPHP/wiki/API-Reference/_history"
  7. class="minibutton bigger action-page-history">
  8. <span>Page History</span>
  9. </a>
  10. </li>
  11. </ul>
  12. </div>
  13. <div id="wiki-content">
  14. <div class="wrap">
  15. <div id="wiki-body" class="gollum-mediawiki-content instapaper_body">
  16. <div class="markdown-body">
  17. <table class="toc" summary="Contents">
  18. <tr>
  19. <td>
  20. <div>Table of Contents</div>
  21. <ul>
  22. <ul>
  23. <li>
  24. <a href="#wiki-geoPHP_static_class" rel="nofollow">geoPHP static class</a>
  25. <ul>
  26. <li>
  27. <a href="#wiki-Example" rel="nofollow">Example</a>
  28. </li>
  29. <li>
  30. <a href="#wiki-Static_Methods" rel="nofollow">Static Methods</a>
  31. </li>
  32. </ul>
  33. </li>
  34. <li>
  35. <a href="#wiki-Adapters" rel="nofollow">Adapters</a>
  36. <ul>
  37. <li>
  38. <a href="#wiki-Class_Hierarchy" rel="nofollow">Class Hierarchy</a>
  39. </li>
  40. <li>
  41. <a href="#wiki-Example-2" rel="nofollow">Example</a>
  42. </li>
  43. <li>
  44. <a href="#wiki-Methods" rel="nofollow">Methods</a>
  45. </li>
  46. </ul>
  47. </li>
  48. <li>
  49. <a href="#wiki-Geometries" rel="nofollow">Geometries</a>
  50. <ul>
  51. <li>
  52. <a href="#wiki-Class_Hierarchy-2" rel="nofollow">Class Hierarchy</a>
  53. </li>
  54. <li>
  55. <a href="#wiki-Example-3" rel="nofollow">Example</a>
  56. </li>
  57. <li>
  58. <a href="#wiki-Methods-2" rel="nofollow">Methods</a>
  59. </li>
  60. </ul>
  61. </li>
  62. </ul>
  63. </ul>
  64. </td>
  65. </tr>
  66. </table>
  67. <h2>
  68. <span class="mw-headline">
  69. <a name="wiki-geoPHP_static_class" rel="nofollow">geoPHP static class</a>
  70. </span>
  71. </h2>
  72. <p>geoPHP provides a static class that contains useful utility functions. All methods must
  73. be called statically. </p>
  74. <h3>
  75. <span class="mw-headline">
  76. <a name="wiki-Example" rel="nofollow">Example</a>
  77. </span>
  78. </h3>
  79. <pre>$geometry = geoPHP::load('MULTILINESTRING((10 10,20 20,10 40))','wkt');</pre>
  80. <pre>$reduced_geometry = geoPHP::geometryReduce($geometry);</pre>
  81. <h3>
  82. <span class="mw-headline">
  83. <a name="wiki-Static_Methods" rel="nofollow">Static Methods</a>
  84. </span>
  85. </h3>
  86. <table>
  87. <tr>
  88. <td>
  89. <b>Method</b>
  90. </td>
  91. <td>
  92. <b>Description</b>
  93. </td>
  94. <td>
  95. <b>Returns</b>
  96. </td>
  97. </tr>
  98. <tr>
  99. <td> version </td>
  100. <td> Provides the current geoPHP version. Useful if you need to check compatablity </td>
  101. <td> Numeric String </td>
  102. </tr>
  103. <tr>
  104. <td> load </td>
  105. <td> Load from an adapter format (like wkt) into a geometry. The first argument is the
  106. data, the second one is the format of the data
  107. ('wkt','wkb','json','kml','gpx','google_geocode'). All additional arguments are
  108. passed along to the read method of the relevant adapte </td>
  109. <td> Geometry </td>
  110. </tr>
  111. <tr>
  112. <td> getAdapterMap </td>
  113. <td> Get a list of adapters as an array keyed by the value that should be passed to
  114. geoPHP::load </td>
  115. <td> Array </td>
  116. </tr>
  117. <tr>
  118. <td> geometryList </td>
  119. <td> List all geometry types </td>
  120. <td> Array </td>
  121. </tr>
  122. <tr>
  123. <td> geosToGeometry </td>
  124. <td> Given a GEOSGeometry, get a geoPHP geometry </td>
  125. <td> Geometry </td>
  126. </tr>
  127. <tr>
  128. <td> geometryReduce </td>
  129. <td> Reduce a geometry, or an array of geometries, into their \'lowest\' available
  130. common geometry. For example a GeometryCollection of only points will become a
  131. MultiPoint, while a multi-point containing a single point will return a point. An
  132. array of geometries can be passed and they will be compiled into a single geometry. </td>
  133. <td> Geometry </td>
  134. </tr>
  135. <tr>
  136. <td> geosInstalled </td>
  137. <td> Check if the GEOS php extension is installed and working </td>
  138. <td> Boolean </td>
  139. </tr>
  140. </table>
  141. <h2>
  142. <span class="mw-headline">
  143. <a name="wiki-Adapters" rel="nofollow">Adapters</a>
  144. </span>
  145. </h2>
  146. <p>Adapters are responsible for getting data in and out of geoPHP Geometries. Generally
  147. you will use an adapter to load data into a geoPHP geometry, do various manipulations on
  148. the geometry, then use another adapter to write it out to another (or the same) format.
  149. You can also use adapters by themselves to simply do conversion from one format to
  150. another (See <a class="internal present"
  151. href="/phayes/geoPHP/wiki/Example-format-converter" rel="nofollow"
  152. >example-format-converter</a> for an example of this). Adapters should be instantiated
  153. and not called statically. </p>
  154. <h3>
  155. <span class="mw-headline">
  156. <a name="wiki-Class_Hierarchy" rel="nofollow">Class Hierarchy</a>
  157. </span>
  158. </h3>
  159. <ul>
  160. <li>GeoAdapter Abtract Class<ul>
  161. <li>WKT Enables reading and writing WKT (Well Known Text)</li>
  162. <li>WKB Enables reading and writing WKB (Well Known Binary). This is very fast.</li>
  163. <li>GeoJSON Enables reading and writing GeoJSON</li>
  164. <li>KML Enables reading and writing KML (Google Earth)</li>
  165. <li>GoogleGeocode Enables geocoding and reverse-geocoding via google geocoding
  166. API</li>
  167. <li>GPX Enables reading and writing GPX (from handheld GPS devices)</li>
  168. <li>GeoRSS Enables reading and writing of GeoRSS</li>
  169. </ul>
  170. </li>
  171. </ul>
  172. <h3>
  173. <span class="mw-headline">
  174. <a name="wiki-Example-2" rel="nofollow">Example</a>
  175. </span>
  176. </h3>
  177. <pre>$wkb_reader = new WKB();</pre>
  178. <pre>$geometry = $wkb_reader-&gt;read('0101000000000000000000f03f000000000000f03f',TRUE);</pre>
  179. <pre>$wkt_writer = new wkt();</pre>
  180. <pre>$wkt = $wkt_writer-&gt;write($geometry);</pre>
  181. <h3>
  182. <span class="mw-headline">
  183. <a name="wiki-Methods" rel="nofollow">Methods</a>
  184. </span>
  185. </h3>
  186. <table>
  187. <tr>
  188. <td>
  189. <b>Method</b>
  190. </td>
  191. <td>
  192. <b>Description</b>
  193. </td>
  194. <td>
  195. <b>Returns</b>
  196. </td>
  197. </tr>
  198. <tr>
  199. <td> read </td>
  200. <td> Read in input (generally a string) and return a Geometry </td>
  201. <td> Geometry </td>
  202. </tr>
  203. <tr>
  204. <td> write </td>
  205. <td> Write out the given geometry into the adapter formater </td>
  206. <td> String </td>
  207. </tr>
  208. </table>
  209. <h2>
  210. <span class="mw-headline">
  211. <a name="wiki-Geometries" rel="nofollow">Geometries</a>
  212. </span>
  213. </h2>
  214. <p>Geometries form the heart of the geoPHP library. Once you have loaded your data into a
  215. Geometry object, you have access to all the various methods detailed below for doing
  216. conversions, transformations, and operations. While generally you would use an adapter
  217. to get a Geometry object, they can also be built by hand. See the constructor methods in
  218. the classes to see how to do this. GEOS-php extension needs to be installed in order to
  219. use some of the advanced methods (detailed below). </p>
  220. <h3>
  221. <span class="mw-headline">
  222. <a name="wiki-Class_Hierarchy-2" rel="nofollow">Class Hierarchy</a>
  223. </span>
  224. </h3>
  225. <ul>
  226. <li>Geometry<ul>
  227. <li>Point</li>
  228. <li>Collection<ul>
  229. <li>LineString</li>
  230. <li>Polygon</li>
  231. <li>MultiLineString</li>
  232. <li>MultiPoint</li>
  233. <li>MultiPolygon</li>
  234. <li>GeometryCollection</li>
  235. </ul>
  236. </li>
  237. </ul>
  238. </li>
  239. </ul>
  240. <h3>
  241. <span class="mw-headline">
  242. <a name="wiki-Example-3" rel="nofollow">Example</a>
  243. </span>
  244. </h3>
  245. <pre>$poly1 = $geoPHP::load('POLYGON((30 10,10 20,20 40,40 40,30 10))','wkt');</pre>
  246. <pre>$poly2 = $geoPHP::load('POLYGON((35 10,10 20,15 40,45 45,35 10),(20 30, 35 35, 30 20, 20 30))','wkt');</pre>
  247. <pre>$combined_poly = $poly1-&gt;union($poly2);</pre>
  248. <pre>$kml = $combined_poly-&gt;out('kml');</pre>
  249. <h3>
  250. <span class="mw-headline">
  251. <a name="wiki-Methods-2" rel="nofollow">Methods</a>
  252. </span>
  253. </h3>
  254. <p>
  255. <b>Common Methods</b>
  256. </p>
  257. <table>
  258. <tr>
  259. <td>
  260. <b>Method</b>
  261. </td>
  262. <td>
  263. <b>Description</b>
  264. </td>
  265. <td>
  266. <b>Returns</b>
  267. </td>
  268. </tr>
  269. <tr>
  270. <td> out </td>
  271. <td> Outputs the geometry into the specified adapter format. Available formats are
  272. <i>wkt</i>, <i>wkb</i>, <i>json</i>, <i>kml</i>, <i>gpx</i>, <i>google_geocode</i>
  273. </td>
  274. <td> String </td>
  275. </tr>
  276. <tr>
  277. <td> area </td>
  278. <td> The area of this Polygon (or GeometryCollection), as measured in the spatial
  279. reference system of the geometry </td>
  280. <td> Float </td>
  281. </tr>
  282. <tr>
  283. <td> boundary </td>
  284. <td> Returns the closure of the combinatorial boundary of this geometric object. </td>
  285. <td> LinearRing </td>
  286. </tr>
  287. <tr>
  288. <td> envelope </td>
  289. <td> The minimum bounding box for this Geometry, returned as a Geometry. </td>
  290. <td> Polygon </td>
  291. </tr>
  292. <tr>
  293. <td> getBBox </td>
  294. <td> The minimum bounding box for this Geometry, returned as an array. Also see
  295. envelope() </td>
  296. <td> Array </td>
  297. </tr>
  298. <tr>
  299. <td> centroid </td>
  300. <td> The mathematical centroid for this geometry as a Point. For polygons, the result
  301. is not guaranteed to be interior. </td>
  302. <td> Point </td>
  303. </tr>
  304. <tr>
  305. <td> length </td>
  306. <td> The length of this Curve in its associated spatial reference. </td>
  307. <td> Float </td>
  308. </tr>
  309. <tr>
  310. <td> y </td>
  311. <td> The y-coordinate value for this Point. </td>
  312. <td> Float </td>
  313. </tr>
  314. <tr>
  315. <td> x </td>
  316. <td> The x-coordinate value for this Point. </td>
  317. <td> Float </td>
  318. </tr>
  319. <tr>
  320. <td> numGeometries </td>
  321. <td> The number of component geometries in this collection </td>
  322. <td> Integer </td>
  323. </tr>
  324. <tr>
  325. <td> geometryN </td>
  326. <td> Returns the geometry N in this collection. Note that the index starts at 1. </td>
  327. <td> Geometry </td>
  328. </tr>
  329. <tr>
  330. <td> startPoint </td>
  331. <td> The start Point of this LineString </td>
  332. <td> Point </td>
  333. </tr>
  334. <tr>
  335. <td> endPoint </td>
  336. <td> The end Point of this LineString </td>
  337. <td> Point </td>
  338. </tr>
  339. <tr>
  340. <td> isRing </td>
  341. <td> Returns 1 (TRUE) if this Curve is closed() and this Curve isSimple(). </td>
  342. <td> Boolean </td>
  343. </tr>
  344. <tr>
  345. <td> isClosed </td>
  346. <td> Returns 1 (TRUE) if this Curve is closed. StartPoint() == EndPoint(). </td>
  347. <td> Boolean </td>
  348. </tr>
  349. <tr>
  350. <td> getComponents </td>
  351. <td> Get all sub-geometry components of the geometry </td>
  352. <td> Array of geometries </td>
  353. </tr>
  354. <tr>
  355. <td> numPoints </td>
  356. <td> The number of Points in this LineString </td>
  357. <td> Integer </td>
  358. </tr>
  359. <tr>
  360. <td> pointN </td>
  361. <td> Returns the specified Point N in this LineString. Note that the index starts at
  362. 1. </td>
  363. <td> Point </td>
  364. </tr>
  365. <tr>
  366. <td> exteriorRing </td>
  367. <td> Returns the exterior ring of this Polygon. </td>
  368. <td> LineString </td>
  369. </tr>
  370. <tr>
  371. <td> numInteriorRings </td>
  372. <td> Returns the number of interior rings in this Polygon. </td>
  373. <td> Integer </td>
  374. </tr>
  375. <tr>
  376. <td> interiorRingN </td>
  377. <td> Returns the Nth interior ring for this Polygon as a LineString. Note that the
  378. index starts at 1. </td>
  379. <td> LineString </td>
  380. </tr>
  381. <tr>
  382. <td> dimension </td>
  383. <td> The inherent dimension of this geometric object. In non-homogeneous collections,
  384. this will return the largest topological dimension of the contained objects. </td>
  385. <td> Integer </td>
  386. </tr>
  387. <tr>
  388. <td> geometryType </td>
  389. <td> Returns the name of the instantiable subtype of Geometry of which this geometric
  390. object is an instantiable member. The name of the subtype of Geometry is returned as
  391. a string. </td>
  392. <td> String </td>
  393. </tr>
  394. <tr>
  395. <td> SRID </td>
  396. <td> Returns the Spatial Reference System ID for this geometric object. </td>
  397. <td> integer </td>
  398. </tr>
  399. <tr>
  400. <td> setSRID </td>
  401. <td> Set the Spatial Reference System ID for this geometric object. </td>
  402. <td> NULL </td>
  403. </tr>
  404. <tr>
  405. <td> asArray </td>
  406. <td> Get the given geometry as an array of components (recursive) </td>
  407. <td> Array </td>
  408. </tr>
  409. <tr>
  410. <td> getGeoInterface </td>
  411. <td> Get the geometryType and Coordinates as an array </td>
  412. <td> Array </td>
  413. </tr>
  414. </table>
  415. <p>
  416. <b>Aliases</b>
  417. </p>
  418. <table>
  419. <tr>
  420. <td>
  421. <b>Method</b>
  422. </td>
  423. <td>
  424. <b>Description</b>
  425. </td>
  426. <td>
  427. <b>Returns</b>
  428. </td>
  429. </tr>
  430. <tr>
  431. <td> getCentroid </td>
  432. <td> Alias for centroid() </td>
  433. <td> Point </td>
  434. </tr>
  435. <tr>
  436. <td> getArea </td>
  437. <td> Alias for area() </td>
  438. <td> Float </td>
  439. </tr>
  440. <tr>
  441. <td> getX </td>
  442. <td> Alias for x() </td>
  443. <td> Float </td>
  444. </tr>
  445. <tr>
  446. <td> getY </td>
  447. <td> Alias for y() </td>
  448. <td> Float </td>
  449. </tr>
  450. <tr>
  451. <td> getGeos </td>
  452. <td> Alias for geos() </td>
  453. <td> GEOSGeometry </td>
  454. </tr>
  455. <tr>
  456. <td> getGeomType </td>
  457. <td> Alias for geometryType() </td>
  458. <td> String </td>
  459. </tr>
  460. <tr>
  461. <td> getSRID </td>
  462. <td> Alias for SRID() </td>
  463. <td> Integer </td>
  464. </tr>
  465. <tr>
  466. <td> asText </td>
  467. <td> Alias for <i>$this-&gt;out('wkt')</i>
  468. </td>
  469. <td> String </td>
  470. </tr>
  471. <tr>
  472. <td> asBinary </td>
  473. <td> Alias for <i>$this-&gt;out('wkb')</i>
  474. </td>
  475. <td> String </td>
  476. </tr>
  477. </table>
  478. <p>
  479. <b>Advanced Methods</b>
  480. </p>
  481. <p>The <a class="internal present" href="/phayes/geoPHP/wiki/GEOS" rel="nofollow">GEOS-php
  482. extension</a> needs to be installed for these functions to be available </p>
  483. <table>
  484. <tr>
  485. <td>
  486. <b>Method</b>
  487. </td>
  488. <td>
  489. <b>Description</b>
  490. </td>
  491. <td>
  492. <b>Returns</b>
  493. </td>
  494. </tr>
  495. <tr>
  496. <td> geos </td>
  497. <td> Return a GEOSGeometry object representing this geometry </td>
  498. <td> GEOSGeometry </td>
  499. </tr>
  500. <tr>
  501. <td> setGeos </td>
  502. <td> Set a GEOSGeometry object representing this geometry </td>
  503. <td> NULL </td>
  504. </tr>
  505. <tr>
  506. <td> pointOnSurface </td>
  507. <td> A Point guaranteed to be within a polygon </td>
  508. <td> Point </td>
  509. </tr>
  510. <tr>
  511. <td> equals </td>
  512. <td> Returns 1 (TRUE) if this geometry is “spatially equal” to another Geometry </td>
  513. <td> Boolean </td>
  514. </tr>
  515. <tr>
  516. <td> equalsExact </td>
  517. <td> Returns 1 (TRUE) if this gemometric object is exactly the same as another object,
  518. including the ordering of component parts </td>
  519. <td> Boolean </td>
  520. </tr>
  521. <tr>
  522. <td> relate </td>
  523. <td> Returns 1 (TRUE) if this geometric object is spatially related to anotherGeometry
  524. by testing for intersections between the interior, boundary and exterior of the two
  525. geometric objects as specified by the values in the intersectionPatternMatrix. This
  526. returns FALSE if all the tested intersections are empty except exterior (this)
  527. intersect exterior (another). </td>
  528. <td> Boolean </td>
  529. </tr>
  530. <tr>
  531. <td> checkValidity </td>
  532. <td> Boolean </td>
  533. </tr>
  534. <tr>
  535. <td> isSimple </td>
  536. <td> Returns 1 (TRUE) if this geometry does not pass through the same point in space
  537. more than once </td>
  538. <td> Boolean </td>
  539. </tr>
  540. <tr>
  541. <td> project </td>
  542. <td> Project the geometry from from one SRID to another </td>
  543. <td> Geometry </td>
  544. </tr>
  545. <tr>
  546. <td> buffer </td>
  547. <td> Returns a geometric object that represents all Points whose distance from this
  548. geometric object is less than or equal to distance. Calculations are in the spatial
  549. reference system of this geometric object. Because of the limitations of linear
  550. interpolation, there will often be some relatively small error in this distance, but
  551. it should be near the resolution of the coordinates used. </td>
  552. <td> Geometry </td>
  553. </tr>
  554. <tr>
  555. <td> intersection </td>
  556. <td> Returns a geometric object that represents the Point set intersection of this
  557. geometric object with anotherGeometry. See <a
  558. href="http://en.wikipedia.org/wiki/Intersection_(set_theory)" rel="nofollow"
  559. >http://en.wikipedia.org/wiki/Intersection_(set_theory)</a>
  560. </td>
  561. <td> Geometry </td>
  562. </tr>
  563. <tr>
  564. <td> convexHull </td>
  565. <td> Returns a geometric object that represents the convex hull of this geometric
  566. object. See <a href="http://en.wikipedia.org/wiki/Convex_hull" rel="nofollow"
  567. >http://en.wikipedia.org/wiki/Convex_hull</a>
  568. </td>
  569. <td> Geometry </td>
  570. </tr>
  571. <tr>
  572. <td> difference </td>
  573. <td> Returns a geometric object that represents the Point set difference of this
  574. geometric object with anotherGeometry. </td>
  575. <td> Geometry </td>
  576. </tr>
  577. <tr>
  578. <td> symDifference </td>
  579. <td> Returns a geometric object that represents the Point set symmetric difference of
  580. this geometric object with another Geometry. See <a
  581. href="http://en.wikipedia.org/wiki/Symmetric_difference" rel="nofollow"
  582. >http://en.wikipedia.org/wiki/Symmetric_difference</a>
  583. </td>
  584. <td> Geometry </td>
  585. </tr>
  586. <tr>
  587. <td> union </td>
  588. <td> Returns a geometric object that represents the Point set union of this geometric
  589. object with anotherGeometry. See <a
  590. href="http://en.wikipedia.org/wiki/Union_(set_theory)" rel="nofollow"
  591. >http://en.wikipedia.org/wiki/Union_(set_theory)</a>
  592. </td>
  593. <td> Geometry </td>
  594. </tr>
  595. <tr>
  596. <td> simplify </td>
  597. <td> Simplify the geometry </td>
  598. <td> Geometry </td>
  599. </tr>
  600. <tr>
  601. <td> disjoint </td>
  602. <td> Returns 1 (TRUE) if this geometric object is “spatially disjoint” from another
  603. Geometry. </td>
  604. <td> Boolean </td>
  605. </tr>
  606. <tr>
  607. <td> touches </td>
  608. <td> Returns 1 (TRUE) if this geometric object “spatially touches” another Geometry. </td>
  609. <td> Boolean </td>
  610. </tr>
  611. <tr>
  612. <td> intersects </td>
  613. <td> Returns 1 (TRUE) if this geometric object “spatially intersects” another
  614. Geometry. </td>
  615. <td> Boolean </td>
  616. </tr>
  617. <tr>
  618. <td> crosses </td>
  619. <td> Returns 1 (TRUE) if this geometric object “spatially crosses? another Geometry. </td>
  620. <td> Boolean </td>
  621. </tr>
  622. <tr>
  623. <td> within </td>
  624. <td> Returns 1 (TRUE) if this geometric object is “spatially within” another Geometry. </td>
  625. <td> Boolean </td>
  626. </tr>
  627. <tr>
  628. <td> contains </td>
  629. <td> Returns 1 (TRUE) if this geometric object “spatially contains” another Geometry. </td>
  630. <td> Boolean </td>
  631. </tr>
  632. <tr>
  633. <td> overlaps </td>
  634. <td> Returns 1 (TRUE) if this geometric object “spatially overlaps” another Geometry. </td>
  635. <td> Boolean </td>
  636. </tr>
  637. <tr>
  638. <td> covers </td>
  639. <td> Alias for contains() </td>
  640. <td> Boolean </td>
  641. </tr>
  642. <tr>
  643. <td> coveredBy </td>
  644. <td> Alias for within() </td>
  645. <td> Boolean </td>
  646. </tr>
  647. <tr>
  648. <td> distance </td>
  649. <td> Returns the shortest distance between any two Points in the two geometric objects
  650. as calculated in the spatial reference system of this geometric object. Because the
  651. geometries are closed, it is possible to find a point on each geometric object
  652. involved, such that the distance between these 2 points is the returned distance
  653. between their geometric objects. </td>
  654. <td> Float </td>
  655. </tr>
  656. <tr>
  657. <td> hausdorffDistance </td>
  658. <td> See <a href="http://en.wikipedia.org/wiki/Hausdorff_distance" rel="nofollow"
  659. >http://en.wikipedia.org/wiki/Hausdorff_distance</a>
  660. </td>
  661. <td> Float </td>
  662. </tr>
  663. </table>
  664. <p>
  665. <b>Placeholders</b>
  666. </p>
  667. <p>These methods are part of the specification, but are not really supported by geoPHP. </p>
  668. <table>
  669. <tr>
  670. <td>
  671. <b>Method</b>
  672. </td>
  673. <td>
  674. <b>Description</b>
  675. </td>
  676. <td>
  677. <b>Returns</b>
  678. </td>
  679. </tr>
  680. <tr>
  681. <td> hasZ </td>
  682. <td> returns FALSE. geoPHP does not support Z values at the moment. </td>
  683. <td> Boolean </td>
  684. </tr>
  685. <tr>
  686. <td> is3D </td>
  687. <td> returns FALSE. geoPHP does not support 3D geometries at the moment. </td>
  688. <td> Boolean </td>
  689. </tr>
  690. <tr>
  691. <td> isMeasured </td>
  692. <td> returns FALSE. geoPHP does not yet support M values </td>
  693. <td> Boolean </td>
  694. </tr>
  695. <tr>
  696. <td> isEmpty </td>
  697. <td> returns FALSE. geoPHP does not yet support empty geometries </td>
  698. <td> Boolean </td>
  699. </tr>
  700. <tr>
  701. <td> coordinateDimension </td>
  702. <td> returns 2. geoPHP only supports 2-dimentional space </td>
  703. <td> Integer </td>
  704. </tr>
  705. <tr>
  706. <td> z </td>
  707. <td> returns NULL. geoPHP does not support Z values at the moment </td>
  708. <td> NULL </td>
  709. </tr>
  710. <tr>
  711. <td> m </td>
  712. <td> returns NULL. geoPHP does not support M values </td>
  713. <td> NULL </td>
  714. </tr>
  715. </table>
  716. </div>
  717. </div>
  718. </div>
  719. </div>
  720. </div>