Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Coordinate Systems

2,906 views

Published on

Presentation on a generic geometry library I developed long time ago at YDreams in C#.

Published in: Technology, Business
  • great
    its full of knowledge
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Coordinate Systems

  1. 1. Coordinate Systems Antão Almada
  2. 2. Canal Mapas <ul><li>Created by YDreams in 2000 for Vizzavi. </li></ul><ul><li>Cities: </li></ul><ul><ul><li>Lisbon </li></ul></ul><ul><ul><li>Oporto </li></ul></ul><ul><li>Platforms: </li></ul><ul><ul><li>Web browser </li></ul></ul><ul><ul><li>WAP cellulars </li></ul></ul>
  3. 3. FluidMapping <ul><li>Best route: </li></ul><ul><ul><li>Shortest </li></ul></ul><ul><ul><li>Quickest </li></ul></ul><ul><ul><li>... </li></ul></ul><ul><li>Algorithms: </li></ul><ul><ul><li>Two points: A* </li></ul></ul><ul><ul><li>Several Points: Ant Colony Optimization </li></ul></ul>
  4. 4. Coordinate System <ul><li>“ A coordinate system is a system for assigning an n -tuple of numbers or scalars to each point in an n -dimensional space” </li></ul><ul><li>From Wikipedia </li></ul>
  5. 5. YDreams.Geometry <ul><li>ICoordinateSystem – Represents a coordinate system. </li></ul><ul><li>IGeometryObject – Represents an object. </li></ul><ul><li>IClosedGeometryObject – Represents an object that may contain a point. </li></ul><ul><li>IPoint – Represents a point. </li></ul><ul><li>IRange – Represents a range of values. </li></ul><ul><li>ITransform – Transform from coordinate system into another. </li></ul>
  6. 6. YDreams.Geometry
  7. 7. YDreams.Geometry.ICoordinateSystem <ul><li>public interface ICoordinateSystem </li></ul><ul><li>{ </li></ul><ul><li>int Dimensions { get; } </li></ul><ul><li>string DimensionName (int index); </li></ul><ul><li>System.Type DimensionType (int index); </li></ul><ul><li>} </li></ul>
  8. 8. YDreams.Geometry.IGeometryObject <ul><li>public interface IGeometryObject </li></ul><ul><li>{ </li></ul><ul><li>ICoordinateSystem CoordinateSystem { get; } </li></ul><ul><li>IRange BoundingBox { get; } </li></ul><ul><li>} </li></ul><ul><li>public interface IGeometryObject<T> </li></ul><ul><li>: IGeometryObject </li></ul><ul><li>where T: ICoordinateSystem </li></ul><ul><li>{ </li></ul><ul><li>new T CoordinateSystem { get; } </li></ul><ul><li>new IRange<T> BoundingBox { get; } </li></ul><ul><li>} </li></ul>
  9. 9. YDreams.Geometry.IPoint <ul><li>public interface IPoint </li></ul><ul><li>: IGeometryObject </li></ul><ul><li>{ </li></ul><ul><li>object this [int index] { get; } </li></ul><ul><li>} </li></ul><ul><li>public interface IPoint <T> </li></ul><ul><li>: IPoint , IGeometryObject<T> </li></ul><ul><li>where T: ICoordinateSystem </li></ul><ul><li>{ </li></ul><ul><li>} </li></ul>
  10. 10. YDreams.Geometry.IClosedGeometryObject <ul><li>public interface IClosedGeometryObject </li></ul><ul><li>: IGeometryObject </li></ul><ul><li>{ </li></ul><ul><li>bool Contains (IPoint point); </li></ul><ul><li>} </li></ul><ul><li>public interface IClosedGeometryObject<T> </li></ul><ul><li>: IClosedGeometryObject, IGeometryObject<T> </li></ul><ul><li>where T : ICoordinateSystem </li></ul><ul><li>{ </li></ul><ul><li>bool Contains (IPoint<T> point); </li></ul><ul><li>} </li></ul>
  11. 11. YDreams.Geometry.IRange <ul><li>public interface IRange </li></ul><ul><li>: IClosedGeometryObject </li></ul><ul><li>{ </li></ul><ul><li>IPoint Minimum { get; } </li></ul><ul><li>IPoint Maximum { get; } </li></ul><ul><li>IPoint Centroid { get; } </li></ul><ul><li>bool Contains ( IRange range); </li></ul><ul><li>bool Intersects ( IRange range); </li></ul><ul><li>IRange Dilate ( IPoint point); </li></ul><ul><li>IRange Dilate ( IRange range); </li></ul><ul><li>} </li></ul>
  12. 12. YDreams.Geometry.IRange <ul><li>public interface IRange<T > </li></ul><ul><li>: IRange, IClosedGeometryObject<T> </li></ul><ul><li>where T: ICoordinateSystem </li></ul><ul><li>{ </li></ul><ul><li>new IPoint<T> Minimum { get; } </li></ul><ul><li>new IPoint<T> Maximum { get; } </li></ul><ul><li>new IPoint<T> Centroid { get; } </li></ul><ul><li>bool Contains (IRange<T> range); </li></ul><ul><li>bool Intersects (IRange<T> range); </li></ul><ul><li>IRange<T> Dilate (IPoint<T> point); </li></ul><ul><li>IRange<T> Dilate (IRange<T> range); </li></ul><ul><li>} </li></ul>
  13. 13. YDreams.Geometry.ITransform <ul><li>public interface ITransform </li></ul><ul><li>{ </li></ul><ul><li>ICoordinateSystem InputCoordinateSystem { get; } </li></ul><ul><li>ICoordinateSystem OutputCoordinateSystem { get; } </li></ul><ul><li>IPoint ForwardTransform (IPoint point); </li></ul><ul><li>IRange ForwardTransform (IRange range); </li></ul><ul><li>IPoint InverseTransform (IPoint point); </li></ul><ul><li>IRange InverseTransform (IRange range); </li></ul><ul><li>} </li></ul>
  14. 14. YDreams.Geometry.ITransform <ul><li>public interface ITransform <T, U> </li></ul><ul><li>: ITransform </li></ul><ul><li>where T: ICoordinateSystem </li></ul><ul><li>where U: ICoordinateSystem </li></ul><ul><li>{ </li></ul><ul><li>new T InputCoordinateSystem { get; } </li></ul><ul><li>new U OutputCoordinateSystem { get; } </li></ul><ul><li>IPoint<U> ForwardTransform (IPoint<T> point); </li></ul><ul><li>IRange<U> ForwardTransform (IRange<T> range); </li></ul><ul><li>IPoint<T> InverseTransform (IPoint<U> point); </li></ul><ul><li>IRange<T> InverseTransform (IRange<U> range); </li></ul><ul><li>} </li></ul>
  15. 15. Implemented Coordinate System <ul><li>Complex </li></ul><ul><li>R2 </li></ul><ul><ul><li>Point </li></ul></ul><ul><ul><li>Rectangle </li></ul></ul><ul><ul><li>LineSegment </li></ul></ul><ul><ul><li>Polygon </li></ul></ul><ul><ul><li>Circle </li></ul></ul><ul><li>R3 </li></ul><ul><li>Spherical </li></ul>
  16. 16. YDreams.Geometry.Geography
  17. 17. Latitude, Longitude <ul><li>Latitude – Vertical angle, in degrees, relative to equator. </li></ul><ul><li>Longitude – Horizontal angle, in degrees, relative to the Greenwich meridian. </li></ul><ul><li>Defines a point on a surface. </li></ul>
  18. 18. Ellipsoid
  19. 19. Ellipsoid Name E quatorial Radius F lattening Airy1830 6377563.396 1.0 / 299.3249646 Australian1965 6378160.0 1.0 / 298.25 Bessel1841 6377397.155 1.0 / 299.1528128 Clarke1880 6378249.145 1.0 / 293.465 Clarke1866 6378206.4 1.0 / 294.9786982 Everest1830 6377276.345 1.0 / 300.8017 Fischer1960 6378166.0 1.0 / 298.3 Fischer1968 6378150.0 1.0 / 298.3 Grs1967 6378160.0 1.0 / 298.247167427 Grs1975 6378140.0 1.0 / 298.257 Grs1980 6378137.0 1.0 / 298.257222101 Hayford1924 6378388.0 1.0 / 297.0 Helmert1906 6378200.0 1.0 / 298.3 Hough1956 6378270.0 1.0 / 297.0 International1924 6378388.0 1.0 / 297.0 Krassovsky1940 6378245.0 1.0 / 298.3 SouthAmerican1969 6378160.0 1.0 / 298.25 Wgs1960 6378165.0 1.0 / 298.3 WGS1966 6378145.0 1.0 / 298.25 WGS1972 6378135.0 1.0 / 298.26 WGS1984 6378137.0 1.0 / 298.257223563
  20. 20. Ellipsoid <ul><li>Same Latitude and Longitude coordinates define different points in different ellipsoids. </li></ul><ul><li>Transforms: </li></ul><ul><ul><li>Molodenski </li></ul></ul><ul><ul><li>Helmert (7 parameter) </li></ul></ul><ul><ul><li>Bursa-Wolf </li></ul></ul>
  21. 21. Geoid <ul><li>The planet is not homogeneous. </li></ul><ul><li>Higher density has higher gravity. </li></ul><ul><li>Vertical penduluns not always point the center of the planet. </li></ul>
  22. 22. <ul><li>The world is not flat... </li></ul><ul><li>How can we draw flat maps? </li></ul>
  23. 23. Projections <ul><li>Projection of an ellipsoid into a 2 dimensional surface. </li></ul><ul><li>Types of projections: </li></ul><ul><ul><li>Cylindrical </li></ul></ul><ul><ul><li>Conical </li></ul></ul><ul><ul><li>Planar </li></ul></ul>
  24. 24. Mercator (cylindrical) <ul><li>High distortion near the poles </li></ul>
  25. 25. Mercator (cylindrical) <ul><li>Azymuthal lines do not project straight lines </li></ul>
  26. 26. Mercator (cylindrical)
  27. 27. Mercator (cylindrical)
  28. 28. YDreams.Geometry.IProjection <ul><li>public interface IProjection <T> </li></ul><ul><li>: YDreams.Geometry.ITransform<YDreams.Geometry.Geography.Geodetic.CoordinateSystem, YDreams.Geometry.R2.CoordinateSystem<T>> </li></ul><ul><li>{ </li></ul><ul><li>IEllipsoid Ellipsoid { get; } </li></ul><ul><li>YDreams.Geometry.R2.Point<double, DoubleMath> TrueOriginGridCoordinates { get; } </li></ul><ul><li>YDreams.Geometry.Geography.Geodetic.Point TrueOrigin { get; } </li></ul><ul><li>double ScaleAlongMeridian { get; } </li></ul><ul><li>} </li></ul>
  29. 29. Cartesian Coordinate Systems <ul><li>A two-dimensional, planar coordinate system in which horizontal distance is measured along an x- axis and vertical distance is measured along a y- axis . </li></ul><ul><li>Each country has one or more cartesian coordinate systems. </li></ul>
  30. 30. Universal Transverse Mercator (UTM) <ul><li>Transversal cilindrical projection. </li></ul><ul><li>Distortion is minimized using 60 different projections. </li></ul>
  31. 31. Universal Transverse Mercator (UTM)
  32. 32. Universal Transverse Mercator (UTM) <ul><li>Units: meters </li></ul><ul><li>The point of origin of each UTM zone is the intersection of the equator and the zone's central meridian. </li></ul><ul><li>In order to avoid dealing with negative numbers: </li></ul><ul><ul><li>The central meridian of each zone is given a &quot;false easting&quot; value of 500,000 meters. </li></ul></ul><ul><ul><li>In the southern hemisphere, northings decrease as you go southward from the equator, which is given a &quot;false northing&quot; of 10,000,000 meters </li></ul></ul>
  33. 33. YDreams.FluidMapping
  34. 34. YDreams.FluidMapping <ul><li>IO </li></ul><ul><ul><li>Shape Files </li></ul></ul><ul><ul><li>MapInfo Files </li></ul></ul><ul><li>Map Browsing </li></ul><ul><ul><li>ASP.NET </li></ul></ul><ul><ul><li>Windows Forms </li></ul></ul><ul><li>Routing </li></ul><ul><ul><li>A* </li></ul></ul><ul><ul><li>Ant Colony </li></ul></ul>
  35. 35. Geographical Puzzle
  36. 36. Geographical puzzle <ul><li>A hunter walked one kilometer south from his camp. </li></ul><ul><li>Then he walked one kilometer west. </li></ul><ul><li>There he shot a bear. </li></ul><ul><li>Then he walked one kilometer north, and found that he was back at his camp. </li></ul><ul><li>What color was the bear? </li></ul>
  37. 37. Geographical puzzle <ul><li>White </li></ul><ul><li>It’s a polar bear </li></ul>

×