use of ddf.catalog.impl.filter.SpatialFilter in project ddf by codice.
the class TestOpenSearchSiteUtil method populatePolyGeospatial.
@Test
public void populatePolyGeospatial() throws Exception {
String wktPolygon = "POLYGON((1 1,5 1,5 5,1 5,1 1))";
String expectedStr = "1,1,1,5,5,5,5,1,1,1";
SpatialFilter spatial = new SpatialFilter(wktPolygon);
WebClient webClient = WebClient.create(url.toString());
OpenSearchSiteUtil.populateGeospatial(webClient, spatial, false, Arrays.asList("q,src,mr,start,count,mt,dn,lat,lon,radius,bbox,polygon,dtstart,dtend,dateName,filter,sort".split(",")));
String urlStr = webClient.getCurrentURI().toString();
assertTrue(urlStr.indexOf(expectedStr) != -1);
assertTrue(urlStr.indexOf(OpenSearchSiteUtil.GEO_POLY) != -1);
}
use of ddf.catalog.impl.filter.SpatialFilter in project ddf by codice.
the class OpenSearchQuery method addGeometrySpatialFilter.
public void addGeometrySpatialFilter(String geometryWkt) {
SpatialFilter spatialFilter = new SpatialFilter(geometryWkt);
addSpatialFilter(spatialFilter);
}
Aggregations