use of org.apache.jena.geosparql.spatial.SpatialIndex in project jena by apache.
the class WestPFTest method testCheckSearchEnvelope_wrap.
/**
* Test of checkSearchEnvelope method, of class WestPF.
*/
@Test
public void testCheckSearchEnvelope_wrap() {
SpatialIndex spatialIndex = SpatialIndexTestData.createTestIndex();
// Search Envelope
GeometryWrapper geometryWrapper = SpatialIndexTestData.HONOLULU_GEOMETRY_WRAPPER;
WestPF instance = new WestPF();
// Needed to initialise the search.
SearchEnvelope searchEnvelope = instance.buildSearchEnvelope(geometryWrapper, SpatialIndexTestData.WGS_84_SRS_INFO);
HashSet<Resource> expResult = new HashSet<>(Arrays.asList(SpatialIndexTestData.AUCKLAND_FEATURE, SpatialIndexTestData.PERTH_FEATURE, SpatialIndexTestData.HONOLULU_FEATURE));
HashSet<Resource> result = searchEnvelope.check(spatialIndex);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.spatial.SpatialIndex in project jena by apache.
the class WestPFTest method testCheckSearchEnvelope_no_wrap.
/**
* Test of checkSearchEnvelope method, of class WestPF.
*/
@Test
public void testCheckSearchEnvelope_no_wrap() {
SpatialIndex spatialIndex = SpatialIndexTestData.createTestIndex();
// Search Envelope
GeometryWrapper geometryWrapper = SpatialIndexTestData.PERTH_GEOMETRY_WRAPPER;
WestPF instance = new WestPF();
// Needed to initialise the search.
SearchEnvelope searchEnvelope = instance.buildSearchEnvelope(geometryWrapper, SpatialIndexTestData.WGS_84_SRS_INFO);
HashSet<Resource> expResult = new HashSet<>(Arrays.asList(SpatialIndexTestData.LONDON_FEATURE, SpatialIndexTestData.PERTH_FEATURE));
HashSet<Resource> result = searchEnvelope.check(spatialIndex);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.spatial.SpatialIndex in project jena by apache.
the class EastPFTest method testCheckSearchEnvelope_no_wrap.
/**
* Test of checkSearchEnvelope method, of class EastPF.
*/
@Test
public void testCheckSearchEnvelope_no_wrap() {
SpatialIndex spatialIndex = SpatialIndexTestData.createTestIndex();
// Search Envelope
GeometryWrapper geometryWrapper = SpatialIndexTestData.HONOLULU_GEOMETRY_WRAPPER;
EastPF instance = new EastPF();
// Needed to initialise the search.
SearchEnvelope searchEnvelope = instance.buildSearchEnvelope(geometryWrapper, SpatialIndexTestData.WGS_84_SRS_INFO);
HashSet<Resource> expResult = new HashSet<>(Arrays.asList(SpatialIndexTestData.LONDON_FEATURE, SpatialIndexTestData.HONOLULU_FEATURE, SpatialIndexTestData.NEW_YORK_FEATURE));
HashSet<Resource> result = searchEnvelope.check(spatialIndex);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.spatial.SpatialIndex in project jena by apache.
the class EastPFTest method testCheckSearchEnvelope_wrap.
/**
* Test of checkSearchEnvelope method, of class EastPF.
*/
@Test
public void testCheckSearchEnvelope_wrap() {
SpatialIndex spatialIndex = SpatialIndexTestData.createTestIndex();
// Search Envelope
GeometryWrapper geometryWrapper = SpatialIndexTestData.PERTH_GEOMETRY_WRAPPER;
EastPF instance = new EastPF();
// Needed to initialise the search.
SearchEnvelope searchEnvelope = instance.buildSearchEnvelope(geometryWrapper, SpatialIndexTestData.WGS_84_SRS_INFO);
HashSet<Resource> expResult = new HashSet<>(Arrays.asList(SpatialIndexTestData.AUCKLAND_FEATURE, SpatialIndexTestData.PERTH_FEATURE, SpatialIndexTestData.HONOLULU_FEATURE, SpatialIndexTestData.NEW_YORK_FEATURE));
HashSet<Resource> result = searchEnvelope.check(spatialIndex);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.spatial.SpatialIndex in project jena by apache.
the class WestGeomPFTest method testCheckSearchEnvelope_wrap.
/**
* Test of checkSearchEnvelope method, of class WestGeomPF.
*/
@Test
public void testCheckSearchEnvelope_wrap() {
SpatialIndex spatialIndex = SpatialIndexTestData.createTestIndex();
// Search Envelope
GeometryWrapper geometryWrapper = SpatialIndexTestData.HONOLULU_GEOMETRY_WRAPPER;
WestGeomPF instance = new WestGeomPF();
// Needed to initialise the search.
SearchEnvelope searchEnvelope = instance.buildSearchEnvelope(geometryWrapper, SpatialIndexTestData.WGS_84_SRS_INFO);
HashSet<Resource> expResult = new HashSet<>(Arrays.asList(SpatialIndexTestData.AUCKLAND_FEATURE, SpatialIndexTestData.PERTH_FEATURE, SpatialIndexTestData.HONOLULU_FEATURE));
HashSet<Resource> result = searchEnvelope.check(spatialIndex);
assertEquals(expResult, result);
}
Aggregations