Пример #1
0
        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
        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
 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
 /**
  * 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());
 }