Disabled external gits
This commit is contained in:
41
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_02.java
Normal file
41
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_02.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package ch.epfl.alpano.sigcheck;
|
||||
|
||||
import ch.epfl.alpano.GeoPoint;
|
||||
import ch.epfl.alpano.Interval1D;
|
||||
import ch.epfl.alpano.Interval2D;
|
||||
|
||||
final class SignatureChecks_02 {
|
||||
private SignatureChecks_02() {}
|
||||
|
||||
String checkGeoPoint() {
|
||||
double lon = 0, lat = 0;
|
||||
GeoPoint p = new GeoPoint(lon, lat);
|
||||
lon += p.longitude() + p.latitude();
|
||||
double d = p.distanceTo(p);
|
||||
double a = p.azimuthTo(p);
|
||||
return String.valueOf(d) + a;
|
||||
}
|
||||
|
||||
String checkInterval1D() {
|
||||
int a = 0;
|
||||
Interval1D i = new Interval1D(a, a);
|
||||
a = i.includedFrom() + i.includedTo() + i.size() + i.sizeOfIntersectionWith(i);
|
||||
boolean b = i.contains(a)
|
||||
| i.isUnionableWith(i);
|
||||
i = i.union(i.boundingUnion(i));
|
||||
return i.toString() + b;
|
||||
}
|
||||
|
||||
String checkInterval2D() {
|
||||
int a = 0;
|
||||
Interval1D i1 = null;
|
||||
Interval2D i2 = new Interval2D(i1, i1);
|
||||
i1 = i2.iX();
|
||||
i1 = i2.iY();
|
||||
a = i2.size() + i2.sizeOfIntersectionWith(i2);
|
||||
boolean b = i2.contains(a, a)
|
||||
| i2.isUnionableWith(i2);
|
||||
i2 = i2.union(i2.boundingUnion(i2));
|
||||
return i2.toString() + b;
|
||||
}
|
||||
}
|
29
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_03.java
Normal file
29
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_03.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package ch.epfl.alpano.sigcheck;
|
||||
|
||||
import ch.epfl.alpano.GeoPoint;
|
||||
import ch.epfl.alpano.Interval2D;
|
||||
import ch.epfl.alpano.dem.ContinuousElevationModel;
|
||||
import ch.epfl.alpano.dem.DiscreteElevationModel;
|
||||
|
||||
final class SignatureChecks_03 {
|
||||
private SignatureChecks_03() {}
|
||||
|
||||
String checkDiscElevationModel(DiscreteElevationModel d) throws Exception {
|
||||
double a = DiscreteElevationModel.SAMPLES_PER_DEGREE * DiscreteElevationModel.SAMPLES_PER_RADIAN;
|
||||
a = DiscreteElevationModel.sampleIndex(a);
|
||||
Interval2D e = d.extent();
|
||||
int v = 0;
|
||||
a = d.elevationSample(v, v);
|
||||
d = d.union(d);
|
||||
d.close();
|
||||
return d.toString() + e;
|
||||
}
|
||||
|
||||
String checkContElevationModel() {
|
||||
DiscreteElevationModel md = null;
|
||||
ContinuousElevationModel m = new ContinuousElevationModel(md);
|
||||
GeoPoint p = null;
|
||||
double e = m.elevationAt(p) + m.slopeAt(p);
|
||||
return String.valueOf(e);
|
||||
}
|
||||
}
|
30
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_04.java
Normal file
30
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_04.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package ch.epfl.alpano.sigcheck;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import ch.epfl.alpano.GeoPoint;
|
||||
import ch.epfl.alpano.dem.ContinuousElevationModel;
|
||||
import ch.epfl.alpano.dem.DiscreteElevationModel;
|
||||
import ch.epfl.alpano.dem.ElevationProfile;
|
||||
import ch.epfl.alpano.dem.HgtDiscreteElevationModel;
|
||||
|
||||
final class SignatureChecks_04 {
|
||||
private SignatureChecks_04() {}
|
||||
|
||||
void checkHgtDiscreteElevationModel() {
|
||||
File f = null;
|
||||
DiscreteElevationModel m = new HgtDiscreteElevationModel(f);
|
||||
System.out.println(m);
|
||||
}
|
||||
|
||||
void checkElevationProfile() {
|
||||
ContinuousElevationModel dem = null;
|
||||
GeoPoint o = null;
|
||||
double d = 0;
|
||||
|
||||
ElevationProfile p = new ElevationProfile(dem, o, d, d);
|
||||
d = p.elevationAt(d);
|
||||
o = p.positionAt(d);
|
||||
d = p.slopeAt(d);
|
||||
}
|
||||
}
|
46
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_05.java
Normal file
46
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_05.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package ch.epfl.alpano.sigcheck;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import ch.epfl.alpano.GeoPoint;
|
||||
import ch.epfl.alpano.PanoramaParameters;
|
||||
import ch.epfl.alpano.summit.GazetteerParser;
|
||||
import ch.epfl.alpano.summit.Summit;
|
||||
|
||||
final class SignatureChecks_05 {
|
||||
private SignatureChecks_05() {}
|
||||
|
||||
void checkSummit() {
|
||||
GeoPoint p = null;
|
||||
int e = 0;
|
||||
Summit s = new Summit("", p, e);
|
||||
p = s.position();
|
||||
e = s.elevation();
|
||||
System.out.println(s.name());
|
||||
}
|
||||
|
||||
void checkGazetteerParser() throws IOException {
|
||||
File f = null;
|
||||
List<Summit> s = GazetteerParser.readSummitsFrom(f);
|
||||
System.out.println(s);
|
||||
}
|
||||
|
||||
void checkPanoramaParameters() {
|
||||
GeoPoint p = null;
|
||||
int i = 0;
|
||||
double d = 0d;
|
||||
PanoramaParameters pp = new PanoramaParameters(p, i, d, d, i, i, i);
|
||||
p = pp.observerPosition();
|
||||
i = pp.observerElevation();
|
||||
d = pp.centerAzimuth();
|
||||
d = pp.horizontalFieldOfView();
|
||||
d = pp.verticalFieldOfView();
|
||||
i = pp.width();
|
||||
i = pp.height();
|
||||
i = pp.maxDistance();
|
||||
d = pp.xForAzimuth(pp.azimuthForX(d));
|
||||
d = pp.yForAltitude(pp.altitudeForY(d));
|
||||
}
|
||||
}
|
49
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_06.java
Normal file
49
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_06.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package ch.epfl.alpano.sigcheck;
|
||||
|
||||
import java.util.function.DoubleUnaryOperator;
|
||||
|
||||
import ch.epfl.alpano.Panorama;
|
||||
import ch.epfl.alpano.PanoramaComputer;
|
||||
import ch.epfl.alpano.PanoramaParameters;
|
||||
import ch.epfl.alpano.dem.ContinuousElevationModel;
|
||||
import ch.epfl.alpano.dem.ElevationProfile;
|
||||
|
||||
final class SignatureChecks_06 {
|
||||
private SignatureChecks_06() {}
|
||||
|
||||
void checkPanorama(Panorama p) {
|
||||
PanoramaParameters pp = p.parameters();
|
||||
int x = 0;
|
||||
float d = p.distanceAt(x, x);
|
||||
d = p.distanceAt(x, x, d);
|
||||
d = p.longitudeAt(x, x);
|
||||
d = p.latitudeAt(x, x);
|
||||
d = p.elevationAt(x, x);
|
||||
d = p.slopeAt(x, x);
|
||||
checkPanoramaBuilder(pp);
|
||||
}
|
||||
|
||||
void checkPanoramaBuilder(PanoramaParameters pp) {
|
||||
Panorama.Builder b = new Panorama.Builder(pp);
|
||||
int x = 0;
|
||||
float d = 0;
|
||||
b.setDistanceAt(x, x, d);
|
||||
b.setLongitudeAt(x, x, d);
|
||||
b.setLatitudeAt(x, x, d);
|
||||
b.setElevationAt(x, x, d);
|
||||
b.setSlopeAt(x, x, d);
|
||||
Panorama p = b.build();
|
||||
checkPanorama(p);
|
||||
}
|
||||
|
||||
void checkPanoramaComputer(PanoramaParameters pp) {
|
||||
ContinuousElevationModel d = null;
|
||||
PanoramaComputer pc = new PanoramaComputer(d);
|
||||
Panorama p = pc.computePanorama(pp);
|
||||
checkPanorama(p);
|
||||
double y = 0;
|
||||
ElevationProfile pr = null;
|
||||
DoubleUnaryOperator o = PanoramaComputer.rayToGroundDistance(pr, y, y);
|
||||
System.out.println(o);
|
||||
}
|
||||
}
|
12
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_11.java
Normal file
12
Alpano/tests/ch/epfl/alpano/sigcheck/SignatureChecks_11.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package ch.epfl.alpano.sigcheck;
|
||||
|
||||
import ch.epfl.alpano.gui.Alpano;
|
||||
|
||||
final class SignatureChecks_11 {
|
||||
private SignatureChecks_11() {}
|
||||
|
||||
void checkAlpano() {
|
||||
String[] args = null;
|
||||
Alpano.main(args);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user