tds/src/main/java/thredds/server/wfs/WFSGetFeatureWriter.java
private void writeHeadersAndBB() {
		fileOutput += "<wfs:FeatureCollection xsi:schemaLocation=" + WFSXMLHelper.encQuotes("http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd " + namespace + " " + server
					+ "?request=DescribeFeatureType" + WFSXMLHelper.AMPERSAND + "service=wfs" + WFSXMLHelper.AMPERSAND + "version=2.0.0" + WFSXMLHelper.AMPERSAND + "typename=" 
					+ WFSController.TDSNAMESPACE + "%3A" + ftName)
				+ " xmlns:xsi=" + WFSXMLHelper.encQuotes("http://www.w3.org/2001/XMLSchema-instance")
				+ " xmlns:xlink=" + WFSXMLHelper.encQuotes("http://www.w3.org/1999/xlink")
				+ " xmlns:gml=" + WFSXMLHelper.encQuotes("http://opengis.net/gml/3.2")
				+ " xmlns:fes=" + WFSXMLHelper.encQuotes("http://www.opengis.net/fes/2.0")
				+ " xmlns:ogc=" + WFSXMLHelper.encQuotes("http://www.opengis.net/ogc")
				+ " xmlns:wfs=" + WFSXMLHelper.encQuotes("http://opengis.net/wfs/2.0") 
				+ " xmlns:" + WFSController.TDSNAMESPACE +"=" + WFSXMLHelper.encQuotes(namespace)
				+ " xmlns=" + WFSXMLHelper.encQuotes("http://www.opengis.net/wfs/2.0")
				+ " version=\"2.0.0\" numberMatched=" + WFSXMLHelper.encQuotes(String.valueOf(geometries.size())) + " numberReturned=" 
				+ WFSXMLHelper.encQuotes(String.valueOf(geometries.size())) + ">";
		
			double[] boundLower;
			double[] boundUpper;
			if(geometries.isEmpty()) { 
				boundLower = new double[2]; boundUpper = new double[2];
				boundLower[0] = -180;  boundLower[1] = -90;
				boundUpper[0] = 180; boundUpper[1] = 90;
			}
			
			else {
				boundLower = geometries.get(0).getBBLower();
				boundUpper = geometries.get(0).getBBUpper();
			}
		
		   // WFS Bounding Box
			for(SimpleGeometry item: geometries) {
				
				// Find the overall BB
			
				// Test Lower
				double[] low = item.getBBLower();
				if(boundLower[0] > low[0]) boundLower[0] = low[0];
				if(boundLower[1] > low[1]) boundLower[1] = low[1];
				
				// Test Upper
				double[] upper = item.getBBUpper();
				if(boundUpper[0] < upper[0]) boundUpper[0] = upper[0];
				if(boundUpper[1] < upper[1]) boundUpper[1] = upper[1];
				
				// Add some padding
				boundLower[0] -= 10;  boundLower[1] -= 10;
				boundUpper[0] += 10; boundUpper[1] += 10;
			}
		
		fileOutput	+= "<wfs:boundedBy>"
			+ "<wfs:Envelope srsName=" + "\"urn:ogc:def:crs:EPSG::4326\"" + ">"
					+ "<wfs:lowerCorner>" + boundLower[0] + " " + boundLower[1] + "</wfs:lowerCorner>"
					+ "<wfs:upperCorner>" + boundUpper[0] + " " + boundUpper[1] + "</wfs:upperCorner>"
			+ "</wfs:Envelope>"
			+ "</wfs:boundedBy>";
	}
private void writeHeadersAndBB() {
		fileOutput += "<wfs:FeatureCollection xsi:schemaLocation=" + WFSXMLHelper.encQuotes("http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd " + namespace + " " + server
					+ "?request=DescribeFeatureType" + WFSXMLHelper.AMPERSAND + "service=wfs" + WFSXMLHelper.AMPERSAND + "version=2.0.0" + WFSXMLHelper.AMPERSAND + "typename=" 
					+ WFSController.TDSNAMESPACE + "%3A" + ftName)
				+ " xmlns:xsi=" + WFSXMLHelper.encQuotes("http://www.w3.org/2001/XMLSchema-instance")
				+ " xmlns:xlink=" + WFSXMLHelper.encQuotes("http://www.w3.org/1999/xlink")
				+ " xmlns:gml=" + WFSXMLHelper.encQuotes("http://opengis.net/gml/3.2")
				+ " xmlns:fes=" + WFSXMLHelper.encQuotes("http://www.opengis.net/fes/2.0")
				+ " xmlns:ogc=" + WFSXMLHelper.encQuotes("http://www.opengis.net/ogc")
				+ " xmlns:wfs=" + WFSXMLHelper.encQuotes("http://opengis.net/wfs/2.0") 
				+ " xmlns:" + WFSController.TDSNAMESPACE +"=" + WFSXMLHelper.encQuotes(namespace)
				+ " xmlns=" + WFSXMLHelper.encQuotes("http://www.opengis.net/wfs/2.0")
				+ " version=\"2.0.0\" numberMatched=" + WFSXMLHelper.encQuotes(String.valueOf(geometries.size())) + " numberReturned=" 
				+ WFSXMLHelper.encQuotes(String.valueOf(geometries.size())) + ">";
		
			double[] boundLower;
			double[] boundUpper;
			if(geometries.isEmpty()) { 
				boundLower = new double[2]; boundUpper = new double[2];
				boundLower[0] = -180;  boundLower[1] = -90;
				boundUpper[0] = 180; boundUpper[1] = 90;
			}
			
			else {
				boundLower = geometries.get(0).getBBLower();
				boundUpper = geometries.get(0).getBBUpper();
			}
		
		   // WFS Bounding Box
			for(SimpleGeometry item: geometries) {
				
				// Find the overall BB
			
				// Test Lower
				double[] low = item.getBBLower();
				if(boundLower[0] > low[0]) boundLower[0] = low[0];
				if(boundLower[1] > low[1]) boundLower[1] = low[1];
				
				// Test Upper
				double[] upper = item.getBBUpper();
				if(boundUpper[0] < upper[0]) boundUpper[0] = upper[0];
				if(boundUpper[1] < upper[1]) boundUpper[1] = upper[1];
				
				// Add some padding
				boundLower[0] -= 10;  boundLower[1] -= 10;
				boundUpper[0] += 10; boundUpper[1] += 10;
			}
		
		fileOutput	+= "<wfs:boundedBy>"
			+ "<wfs:Envelope srsName=" + "\"urn:ogc:def:crs:EPSG::4326\"" + ">"
					+ "<wfs:lowerCorner>" + boundLower[0] + " " + boundLower[1] + "</wfs:lowerCorner>"
					+ "<wfs:upperCorner>" + boundUpper[0] + " " + boundUpper[1] + "</wfs:upperCorner>"
			+ "</wfs:Envelope>"
			+ "</wfs:boundedBy>";
	}
private void writeHeadersAndBB ( ) { fileOutput += "<wfs:FeatureCollection xsi:schemaLocation=" + WFSXMLHelper . encQuotes ( "http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd " + namespace + " " + server + "?request=DescribeFeatureType" + WFSXMLHelper . AMPERSAND + "service=wfs" + WFSXMLHelper . AMPERSAND + "version=2.0.0" + WFSXMLHelper . AMPERSAND + "typename=" + WFSController . TDSNAMESPACE + "%3A" + ftName ) + " xmlns:xsi=" + WFSXMLHelper . encQuotes ( "http://www.w3.org/2001/XMLSchema-instance" ) + " xmlns:xlink=" + WFSXMLHelper . encQuotes ( "http://www.w3.org/1999/xlink" ) + " xmlns:gml=" + WFSXMLHelper . encQuotes ( "http://opengis.net/gml/3.2" ) + " xmlns:fes=" + WFSXMLHelper . encQuotes ( "http://www.opengis.net/fes/2.0" ) + " xmlns:ogc=" + WFSXMLHelper . encQuotes ( "http://www.opengis.net/ogc" ) + " xmlns:wfs=" + WFSXMLHelper . encQuotes ( "http://opengis.net/wfs/2.0" ) + " xmlns:" + WFSController . TDSNAMESPACE + "=" + WFSXMLHelper . encQuotes ( namespace ) + " xmlns=" + WFSXMLHelper . encQuotes ( "http://www.opengis.net/wfs/2.0" ) + " version=\"2.0.0\" numberMatched=" + WFSXMLHelper . encQuotes ( String . valueOf ( geometries . size ( ) ) ) + " numberReturned=" + WFSXMLHelper . encQuotes ( String . valueOf ( geometries . size ( ) ) ) + ">" ; double [ ] boundLower ; double [ ] boundUpper ; if ( geometries . isEmpty ( ) ) { boundLower = new double [ 2 ] ; boundUpper = new double [ 2 ] ; boundLower [ 0 ] = - 180 ; boundLower [ 1 ] = - 90 ; boundUpper [ 0 ] = 180 ; boundUpper [ 1 ] = 90 ; } else { boundLower = geometries . get ( 0 ) . getBBLower ( ) ; boundUpper = geometries . get ( 0 ) . getBBUpper ( ) ; } // WFS Bounding Box
 for ( SimpleGeometry item : geometries ) { // Find the overall BB
 // Test Lower
 double [ ] low = item . getBBLower ( ) ; if ( boundLower [ 0 ] > low [ 0 ] ) boundLower [ 0 ] = low [ 0 ] ; if ( boundLower [ 1 ] > low [ 1 ] ) boundLower [ 1 ] = low [ 1 ] ; // Test Upper
 double [ ] upper = item . getBBUpper ( ) ; if ( boundUpper [ 0 ] < upper [ 0 ] ) boundUpper [ 0 ] = upper [ 0 ] ; if ( boundUpper [ 1 ] < upper [ 1 ] ) boundUpper [ 1 ] = upper [ 1 ] ; // Add some padding
 boundLower [ 0 ] -= 10 ; boundLower [ 1 ] -= 10 ; boundUpper [ 0 ] += 10 ; boundUpper [ 1 ] += 10 ; } fileOutput += "<wfs:boundedBy>" + "<wfs:Envelope srsName=" + "\"urn:ogc:def:crs:EPSG::4326\"" + ">" + "<wfs:lowerCorner>" + boundLower [ 0 ] + " " + boundLower [ 1 ] + "</wfs:lowerCorner>" + "<wfs:upperCorner>" + boundUpper [ 0 ] + " " + boundUpper [ 1 ] + "</wfs:upperCorner>" + "</wfs:Envelope>" + "</wfs:boundedBy>" ; }
Writes headers and bounding box
Writes headers and bounding box