Disabled external gits
This commit is contained in:
50
Alpano/tests/ch/epfl/alpano/gui/LabelizerTest.java
Normal file
50
Alpano/tests/ch/epfl/alpano/gui/LabelizerTest.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package ch.epfl.alpano.gui;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import ch.epfl.alpano.dem.ContinuousElevationModel;
|
||||
import ch.epfl.alpano.dem.HgtDiscreteElevationModel;
|
||||
import ch.epfl.alpano.summit.GazetteerParser;
|
||||
import ch.epfl.alpano.summit.Summit;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.text.Text;
|
||||
|
||||
public class LabelizerTest {
|
||||
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void testLabels() {
|
||||
|
||||
try {
|
||||
|
||||
|
||||
List<Summit> listOfSummit = GazetteerParser.readSummitsFrom(new File("HGT/alps.txt"));
|
||||
|
||||
HgtDiscreteElevationModel dDem = new HgtDiscreteElevationModel(new File ("HGT/N46E007.hgt"));
|
||||
ContinuousElevationModel cDem = new ContinuousElevationModel(dDem);
|
||||
Labelizer l = new Labelizer(cDem, listOfSummit);
|
||||
List<Node> n= l.labels(PredefinedPanoramas.NIESEN.get().panoramaComputeParameters());
|
||||
int count =0;
|
||||
for (Node node : n){
|
||||
System.out.println(node);
|
||||
if (node instanceof Text){
|
||||
++count;
|
||||
//System.out.println("node");
|
||||
System.out.println(node.toString());
|
||||
}
|
||||
}
|
||||
System.out.println(count);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user