Beispiel #1
0
  public GeoBox(GeoPos posTopLeft, GeoPos posBotRight) {

    mLonMin = Math.min(posTopLeft.getLon(), posBotRight.getLon());
    mLonMax = Math.max(posTopLeft.getLon(), posBotRight.getLon());
    mLatMin = Math.min(posTopLeft.getLat(), posBotRight.getLat());
    mLatMax = Math.max(posTopLeft.getLat(), posBotRight.getLat());
  }
Beispiel #2
0
  public void scale(double scaleFactor) {

    GeoPos center = getCenter();
    double width = getWidth();
    double height = getHeight();

    width *= scaleFactor;
    height *= scaleFactor;

    mLonMin = center.getLon() - width / 2.0;
    mLonMax = center.getLon() + width / 2.0;

    mLatMin = center.getLat() - height / 2.0;
    mLatMax = center.getLat() - height / 2.0;
  }
Beispiel #3
0
 public boolean geoIsIn(GeoPos pos) {
   return geoIsIn(pos.getLon(), pos.getLat());
 }