more tests

master
Alessia Bardi 1 year ago
parent 5f712d09b1
commit 60563084c1

@ -40,6 +40,16 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(true, id, datasource, apiId);
}
@Test
public void testADS276NorthIrelandRecord() throws Exception {
String id ="https://ariadne-infrastructure.eu/aocat/Resource/HERoNI/FB819062-C53C-3164-9A42-AEA6FD127575";
String datasource = "ads";
String apiId = "276";
readAndIndexTest(true, id, datasource, apiId);
}
@Test
public void testADS1093Collection() throws Exception {
String id ="https://ariadne-infrastructure.eu/aocat/Collection/ADS/5910411B-ED97-364E-8D28-6024558AA14B";
@ -217,6 +227,14 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
public void SNDCollectionWithWKT() throws Exception {
String recordId = "https://ariadne-infrastructure.eu/aocat/Collection/206F1EC8-014F-3201-A1E3-4545C2CD1953";
String datasource = "snd";
String collectionId = "zip";
readAndIndexTest(false, recordId, datasource, collectionId);
}
@Test
public void uploadNIAMTest() throws Exception {
boolean isRecord = true;
@ -442,6 +460,16 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
public void thanadosCollectionTest() throws Exception {
boolean isRecord = false;
String recordId = "https://ariadne-infrastructure.eu/aocat/Collection/THANADOS/29D18DF9-09D8-39E7-B424-01FDE024F191";
String datasource = "thanados";
String collectionId = "api";
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
public void uploadAdsScotlandAATTest() throws Exception {
boolean isRecord = true;

@ -40,4 +40,20 @@ public class BulkUploadTest {
GeoPoint centroid = bu.calculateCentroid(wkt);
System.out.println("Long: "+centroid.getLon()+", Lat: "+centroid.getLat());
}
@Test
public void testErrorWkt(){
String wkt = "POLYGON ((14.992851606, 49.997701819, 14.99285127, 49.997700687, 14.992851522, 49.997699286, 14.992852444, 49.99769864, 14.992854204, 49.997697993, 14.992855629, 49.997698101, 14.992857473, 49.997698694, 14.992859066, 49.997699771, 14.99286049, 49.997701172, 14.992862251, 49.997702358, 14.992864346, 49.997704028, 14.992865687, 49.997705644, 14.992867867, 49.997706937, 14.992869962, 49.997708877, 14.992871387, 49.997710116, 14.992871555, 49.997711194, 14.992870633, 49.997712433, 14.992869124, 49.997713457, 14.992867531, 49.997714103, 14.99286619, 49.997714157, 14.992864765, 49.997714157, 14.99286334, 49.997713888, 14.992861832, 49.997712756, 14.992860239, 49.997711248, 14.992858395, 49.997709847, 14.992856719, 49.997708446, 14.992855629, 49.997706991, 14.992854288, 49.997705429, 14.992852863, 49.997704082, 14.992851606, 49.997702789, 14.992851606, 49.997701819))";
GeoPoint centroid = bu.calculateCentroid(wkt);
System.out.println("Long: "+centroid.getLon()+", Lat: "+centroid.getLat());
}
@Test
public void wktSND(){
String wkt="POLYGON ((15.0890347818947000 58.4016252063743000, 15.0886178984403000 58.4014150599049000, 15.0882593461811000 58.4012361894750000, 15.0877677533438000 58.4009725637710000, 15.0872345094368000 58.4006865934337000, 15.0867758097746000 58.4004629423839000, 15.0864339387892000 58.4002930037917000, 15.0860410894795000 58.4001448849296000, 15.0856568468080000 58.3999879707178000, 15.0852396416980000 58.3997954979955000, 15.0848901762974000 58.3995857184202000, 15.0845903412038000 58.3994204326843000, 15.0845492281592000 58.3993715645669000, 15.0846090823620000 58.3993276863909000, 15.0842983876037000 58.3992817208913000, 15.0842119123063000 58.3993917714065000, 15.0842685128493000 58.3995070502855000, 15.0845256073749000 58.3997030466499000, 15.0847657703784000 58.3999033684038000, 15.0850143573253000 58.4001037380030000, 15.0853219913347000 58.4003000162623000, 15.0857384794602000 58.4005278574010000, 15.0859303780227000 58.4006173677459000, 15.0862306820130000 58.4007605447592000, 15.0866902830228000 58.4009399884428000, 15.0870247289009000 58.4010612472058000, 15.0875181172298000 58.4012364553409000, 15.0879784504359000 58.4013805265811000, 15.0883964981257000 58.4015332008690000, 15.0886722704646000 58.4016408627805000, 15.0888306740171000 58.4017213377041000, 15.0890347818947000 58.4016252063743000))";
GeoPoint centroid = bu.calculateCentroid(wkt);
System.out.println("Long: "+centroid.getLon()+", Lat: "+centroid.getLat());
}
}

Loading…
Cancel
Save