Developer's Guide - MapGuide Open Source - OSGeo
Developer's Guide - MapGuide Open Source - OSGeo
Developer's Guide - MapGuide Open Source - OSGeo
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
For example, if you have an MgLineString object $line and an MgPolygon<br />
object $polygon, you can test if the line crosses the polygon with a call to<br />
$line->Crosses($polygon)<br />
Methods to create new geometry objects from the point set of two other<br />
geometries include:<br />
■ Difference()<br />
■ Intersection()<br />
■ SymmetricDifference()<br />
■ Union()<br />
Complete details are in the Geometry module of the Web API reference, under<br />
Spatial Relationships.<br />
Coordinate Systems<br />
A single map will often combine data from different sources, and the different<br />
sources may use different coordinate systems. The map has its own coordinate<br />
system, and any feature sources used in the map may have different coordinate<br />
systems. It is important for display and analysis that all locations are<br />
transformed to the same coordinate system.<br />
NOTE A coordinate system can also be called a spatial reference system (SRS) or<br />
a coordinate reference system (CRS). This guide uses the abbreviation SRS.<br />
Map<strong>Guide</strong> supports three different types of coordinate system:<br />
■ Arbitrary X-Y<br />
■ Geographic, or latitude/longitude<br />
■ Projected<br />
An MgCoordinateSystem object represents a coordinate system.<br />
NOTE You cannot transform between arbitrary X-Y coordinates and either<br />
geographic or projected coordinates.<br />
74 | Chapter 5 Analyzing Features