public class ZoneUtils
extends java.lang.Object
createZoneId(double, double, int)
Modifier and Type | Method and Description |
---|---|
static LatLon |
calcOrthoSquareUnitVector(double y0,
double x0,
double y1,
double x1,
int e)
Berechnet den quadratischen Einheitsvektor und dreht diesen orthogonal
um 90 Grad gegen den Uhrzeigersinn.
|
static LatLon |
calcZoneAnchor(int zoneId,
int e)
Liefert die Anker-Koordinate (links unten) einer Zone.
|
static LatLons |
calcZoneRect(int zoneId,
int e)
Liefert die ungefaehre Rechteck-Form einer Zone.
|
static int |
createZoneId(double lat,
double lon,
int e)
Rastert eine Koordinate auf ein Grad-Raster.
|
static int[] |
createZoneIdsBox(double lat1,
double lon1,
double lat2,
double lon2,
int e)
Rastert eine rechteckige Box auf ein Raster.
|
static int[] |
createZoneIdsBox(long[] coords,
int e)
Rastert eine rechteckige Box auf ein 1/10^e-Grad Raster.
|
static int[] |
expandZone(int zoneId,
int r,
int e)
Erweitert eine Zone um weitere Zonen im Umkreis quadratisch.
|
static int[] |
raytraceZones(double lat1,
double lon1,
double lat2,
double lon2,
int e)
Liefert alle Ids von Zellen, die von einer Strecke durchkreuzt werden.
|
static double |
scaleForE(int e)
Liefert die erlaubten Skalierungen fuer einen Exponenten e.
|
public static final double scaleForE(int e)
e
- int 10er-Exponent. Erlaubte Werte sind 0, 1, 2public static final int createZoneId(double lat, double lon, int e)
lat
- doublelon
- doublee
- int z.B. e=1 fuer 1/10^1 = 0.1. Erlaubte Werte fuer e sind 0,1,2.calcZoneAnchor(int, int)
public static final LatLon calcZoneAnchor(int zoneId, int e)
createZoneId(double, double, int)
zoneId
- int Id der Zonee
- int z.B. e=0 fuer 1/10^0 = 1. Erlaubte Werte: 0,1,2.LatLon
AnkerpunktcreateZoneId(double, double, int)
public static final int[] expandZone(int zoneId, int r, int e)
Beispiel: Z mit R(adius)=2 liefert 25 Zellen(-Ids).
R R R R R
R R R R R
R R(Z)R R
R R R R R
R R R R R
zoneId
- intr
- Anzahl der erweiterten Zonen - quadratisch.e
- int z.B. e=0 fuer 1/10^0 = 1. Erlaubte Werte: 0,1,2.public static final LatLons calcZoneRect(int zoneId, int e)
zoneId
- int Id der Zonee
- int z.B. e=0 fuer 1/10^0 = 1. Erlaubte Werte: 0,1,2.LatLons
Koordinaten des Rechtecks (Polygon)public static final int[] createZoneIdsBox(double lat1, double lon1, double lat2, double lon2, int e)
lat1
- Breitengrad untenlon1
- Laengengrad linkslat2
- Breitengrad obenlon2
- Laengengrad rechtse
- int z.B. e=0 fuer 1/10^0 = 1. Erlaubte Werte: 0,1,2.java.lang.IllegalArgumentException
- wenn keine Boxpublic static final int[] createZoneIdsBox(long[] coords, int e)
coords
- long[] Koordinaten lat/lon als 1e-7-coded.e
- int z.B. e=0 fuer 1/10^0 = 1. Erlaubte Werte: 0,1,2.public static final int[] raytraceZones(double lat1, double lon1, double lat2, double lon2, int e)
lat1
- double Startpunkt ylon1
- double Startpunkt xlat2
- double Zielpunkt ylon2
- double Zielpunkt xe
- int z.B. e=0 fuer 1/10^0 = 1. Erlaubte Werte: 0,1,2.public static final LatLon calcOrthoSquareUnitVector(double y0, double x0, double y1, double x1, int e)
y0
- double Startpunkt yx0
- double Startpunkt xy1
- double Endpunkte yx1
- double Endpunkt xe
- int z.B. e=0 fuer 1/10^0 = 1. Erlaubte Werte: 0,1,2.LatLon
der den normalisierten Vektor darstellt.