Last change
on this file since 74 was 73, checked in by imi, 18 years ago |
fixed bug where lat/lon was exchanged in download dialog and quick fix for Java6 - gui problem
|
File size:
959 bytes
|
Line | |
---|
1 | package org.openstreetmap.josm.data;
|
---|
2 |
|
---|
3 | import org.openstreetmap.josm.data.coor.LatLon;
|
---|
4 | import org.openstreetmap.josm.data.projection.Projection;
|
---|
5 |
|
---|
6 | /**
|
---|
7 | * This is a simple data class for "rectangular" areas of the world, given in
|
---|
8 | * lat/lon min/max values.
|
---|
9 | *
|
---|
10 | * Do not confuse this with "Area", which is an OSM-primitive for a vector of nodes,
|
---|
11 | * describing some area (like a sea).
|
---|
12 | *
|
---|
13 | * @author imi
|
---|
14 | */
|
---|
15 | public class Bounds {
|
---|
16 | /**
|
---|
17 | * The minimum and maximum coordinates.
|
---|
18 | */
|
---|
19 | public LatLon min, max;
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * Construct bounds out of two points
|
---|
23 | */
|
---|
24 | public Bounds(LatLon min, LatLon max) {
|
---|
25 | this.min = min;
|
---|
26 | this.max = max;
|
---|
27 | }
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * Construct bounds that span the whole world.
|
---|
31 | */
|
---|
32 | public Bounds() {
|
---|
33 | min = new LatLon(-Projection.MAX_LAT, -Projection.MAX_LON);
|
---|
34 | max = new LatLon(Projection.MAX_LAT, Projection.MAX_LON);
|
---|
35 | }
|
---|
36 |
|
---|
37 | @Override
|
---|
38 | public String toString() {
|
---|
39 | return "Bounds["+min.lat()+","+min.lon()+","+max.lat()+","+max.lon()+"]";
|
---|
40 | }
|
---|
41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.