@Test public void testGetFeatureTypeWGS84Bounds() throws IOException { createTestProtocol(GEOS_ARCHSITES.CAPABILITIES); try { wfs.getFeatureTypeAbstract("nonExistentTypeName"); fail("Expected IAE"); } catch (IllegalArgumentException e) { assertTrue(true); } ReferencedEnvelope wgs84Bounds = wfs .getFeatureTypeWGS84Bounds(GEOS_ARCHSITES.FEATURETYPENAME); assertNotNull(wgs84Bounds); assertSame(DefaultGeographicCRS.WGS84, wgs84Bounds.getCoordinateReferenceSystem()); assertEquals(-103D, wgs84Bounds.getMinX(), 1.0e-3); assertEquals(44D, wgs84Bounds.getMinY(), 1.0e-3); assertEquals(-102D, wgs84Bounds.getMaxX(), 1.0e-3); assertEquals(45D, wgs84Bounds.getMaxY(), 1.0e-3); createTestProtocol(CUBEWERX_GOVUNITCE.CAPABILITIES); assertNotNull(wfs.getFeatureTypeWGS84Bounds(CUBEWERX_GOVUNITCE.FEATURETYPENAME)); }
public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName) { final FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName); List<WGS84BoundingBoxType> bboxList = featureTypeInfo.getWGS84BoundingBox(); if (bboxList != null && bboxList.size() > 0) { WGS84BoundingBoxType bboxType = bboxList.get(0); List lowerCorner = bboxType.getLowerCorner(); List upperCorner = bboxType.getUpperCorner(); double minLon = (Double) lowerCorner.get(0); double minLat = (Double) lowerCorner.get(1); double maxLon = (Double) upperCorner.get(0); double maxLat = (Double) upperCorner.get(1); ReferencedEnvelope latLonBounds = new ReferencedEnvelope(minLon, maxLon, minLat, maxLat, DefaultGeographicCRS.WGS84); return latLonBounds; } throw new IllegalStateException( "The capabilities document does not supply the ows:WGS84BoundingBox element"); }
WFS_1_1_0_Protocol implements WFSProtocol { public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName) { final FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName); List<WGS84BoundingBoxType> bboxList = featureTypeInfo.getWGS84BoundingBox(); if (bboxList != null && bboxList.size() > 0) { WGS84BoundingBoxType bboxType = bboxList.get(0); List lowerCorner = bboxType.getLowerCorner(); List upperCorner = bboxType.getUpperCorner(); double minLon = (Double) lowerCorner.get(0); double minLat = (Double) lowerCorner.get(1); double maxLon = (Double) upperCorner.get(0); double maxLat = (Double) upperCorner.get(1); ReferencedEnvelope latLonBounds = new ReferencedEnvelope(minLon, maxLon, minLat, maxLat, DefaultGeographicCRS.WGS84); return latLonBounds; } throw new IllegalStateException( "The capabilities document does not supply the ows:WGS84BoundingBox element"); } }
WFS_1_1_0_Protocol implements WFSProtocol { public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName) { final FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName); List<WGS84BoundingBoxType> bboxList = featureTypeInfo.getWGS84BoundingBox(); if (bboxList != null && bboxList.size() > 0) { WGS84BoundingBoxType bboxType = bboxList.get(0); List lowerCorner = bboxType.getLowerCorner(); List upperCorner = bboxType.getUpperCorner(); double minLon = (Double) lowerCorner.get(0); double minLat = (Double) lowerCorner.get(1); double maxLon = (Double) upperCorner.get(0); double maxLat = (Double) upperCorner.get(1); ReferencedEnvelope latLonBounds = new ReferencedEnvelope(minLon, maxLon, minLat, maxLat, DefaultGeographicCRS.WGS84); return latLonBounds; } throw new IllegalStateException( "The capabilities document does not supply the ows:WGS84BoundingBox element"); } WFS_1_1_0_Protocol(InputStream capabilitiesReader, HTTPProtocol http); }
WFS_1_1_0_Protocol implements WFSProtocol { public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName) { final FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName); List<WGS84BoundingBoxType> bboxList = featureTypeInfo.getWGS84BoundingBox(); if (bboxList != null && bboxList.size() > 0) { WGS84BoundingBoxType bboxType = bboxList.get(0); List lowerCorner = bboxType.getLowerCorner(); List upperCorner = bboxType.getUpperCorner(); double minLon = (Double) lowerCorner.get(0); double minLat = (Double) lowerCorner.get(1); double maxLon = (Double) upperCorner.get(0); double maxLat = (Double) upperCorner.get(1); ReferencedEnvelope latLonBounds = new ReferencedEnvelope(minLon, maxLon, minLat, maxLat, DefaultGeographicCRS.WGS84); return latLonBounds; } throw new IllegalStateException( "The capabilities document does not supply the ows:WGS84BoundingBox element"); } WFS_1_1_0_Protocol(InputStream capabilitiesReader, HTTPProtocol http); void setStrategy(WFSStrategy strategy); Version getServiceVersion(); String getServiceTitle(); String getServiceAbstract(); Set<String> getServiceKeywords(); URI getServiceProviderUri(); Set<String> getSupportedGetFeatureOutputFormats(); Set<String> getSupportedOutputFormats(String typeName); Set<QName> getFeatureTypeNames(); QName getFeatureTypeName(String typeName); FilterCapabilities getFilterCapabilities(); boolean supportsOperation(WFSOperationType operation, boolean post); URL getOperationURL(WFSOperationType operation, boolean post); String getFeatureTypeTitle(String typeName); String getFeatureTypeAbstract(String typeName); ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName); String getDefaultCRS(String typeName); Set<String> getSupportedCRSIdentifiers(String typeName); Set<String> getFeatureTypeKeywords(String typeName); URL getDescribeFeatureTypeURLGet(String typeName); WFSResponse describeFeatureTypeGET(String typeName, String outputFormat); WFSResponse describeFeatureTypePOST(String typeName, String outputFormat); WFSResponse issueGetFeatureGET(final GetFeature request); WFSResponse issueGetFeaturePOST(final GetFeature request); void dispose(); static void encode(final EObject request, final Configuration configuration,
            final OutputStream out, final Charset charset); String getDefaultOutputFormat(WFSOperationType operation); Filter[] splitFilters(Filter filter); }
WFS_1_1_0_Protocol implements WFSProtocol { public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName) { final FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName); List<WGS84BoundingBoxType> bboxList = featureTypeInfo.getWGS84BoundingBox(); if (bboxList != null && bboxList.size() > 0) { WGS84BoundingBoxType bboxType = bboxList.get(0); List lowerCorner = bboxType.getLowerCorner(); List upperCorner = bboxType.getUpperCorner(); double minLon = (Double) lowerCorner.get(0); double minLat = (Double) lowerCorner.get(1); double maxLon = (Double) upperCorner.get(0); double maxLat = (Double) upperCorner.get(1); ReferencedEnvelope latLonBounds = new ReferencedEnvelope(minLon, maxLon, minLat, maxLat, DefaultGeographicCRS.WGS84); return latLonBounds; } throw new IllegalStateException( "The capabilities document does not supply the ows:WGS84BoundingBox element"); } WFS_1_1_0_Protocol(InputStream capabilitiesReader, HTTPProtocol http); void setStrategy(WFSStrategy strategy); Version getServiceVersion(); String getServiceTitle(); String getServiceAbstract(); Set<String> getServiceKeywords(); URI getServiceProviderUri(); Set<String> getSupportedGetFeatureOutputFormats(); Set<String> getSupportedOutputFormats(String typeName); Set<QName> getFeatureTypeNames(); QName getFeatureTypeName(String typeName); FilterCapabilities getFilterCapabilities(); boolean supportsOperation(WFSOperationType operation, boolean post); URL getOperationURL(WFSOperationType operation, boolean post); String getFeatureTypeTitle(String typeName); String getFeatureTypeAbstract(String typeName); ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName); String getDefaultCRS(String typeName); Set<String> getSupportedCRSIdentifiers(String typeName); Set<String> getFeatureTypeKeywords(String typeName); URL getDescribeFeatureTypeURLGet(String typeName); WFSResponse describeFeatureTypeGET(String typeName, String outputFormat); WFSResponse describeFeatureTypePOST(String typeName, String outputFormat); WFSResponse issueGetFeatureGET(final GetFeature request); WFSResponse issueGetFeaturePOST(final GetFeature request); void dispose(); static void encode(final EObject request, final Configuration configuration,
            final OutputStream out, final Charset charset); String getDefaultOutputFormat(WFSOperationType operation); Filter[] splitFilters(Filter filter);  }