예제 #1
0
파일: MapView.cs 프로젝트: mitice/foo
        public Point getPoiPixelCoordinates(Poi p)
        {
            double deltaLongitude = p.getLongitude() - this.area.getTopLeftLongitude();
            double deltaLatitude  = this.area.getTopLeftLatitude() - p.getLatitude();

            int x = (int)Math.Floor(deltaLongitude / this.longitudePerPixel);
            int y = (int)Math.Floor(deltaLatitude / this.latitudePerPixel);

            return(new Point(x, y));
        }
예제 #2
0
파일: MapView.cs 프로젝트: misiek/foo
        public Point getPoiPixelCoordinates(Poi p)
        {
            double deltaLongitude = p.getLongitude() - this.area.getTopLeftLongitude();
            double deltaLatitude = this.area.getTopLeftLatitude() - p.getLatitude();

            int x = (int) Math.Floor(deltaLongitude / this.longitudePerPixel);
            int y = (int) Math.Floor(deltaLatitude / this.latitudePerPixel);
            return new Point(x, y);
        }
예제 #3
0
파일: Area.cs 프로젝트: mitice/foo
 // check if given poi is inside area
 public bool contains(Poi poi)
 {
     return(contains(poi.getLatitude(), poi.getLongitude()));
 }
예제 #4
0
파일: Targets.cs 프로젝트: misiek/foo
 private Area createTargetArea(Poi target)
 {
     double topLeftLat = target.getLatitude() + maxLatitudeToTarget;
     double topLeftLon = target.getLongitude() - maxLongitudeToTarget;
     double bottomRightLat = target.getLatitude() - maxLatitudeToTarget;
     double bottomRightLon = target.getLongitude() + maxLongitudeToTarget;
     return new Area(topLeftLat, topLeftLon, bottomRightLat, bottomRightLon);
 }
예제 #5
0
파일: PoiSourceHdd.cs 프로젝트: misiek/foo
 /**
  * Returns poi sub dir by poi and named area
  */
 private string getPoiSubDir(Poi p, NamedArea namedArea)
 {
     string dirName = p.getName() + "_" + p.getLatitude() + "_" + p.getLongitude();
     return getPoiSubDir(dirName, namedArea);
 }
예제 #6
0
파일: Area.cs 프로젝트: misiek/foo
 // check if given poi is inside area
 public bool contains(Poi poi)
 {
     return contains(poi.getLatitude(), poi.getLongitude());
 }