Examples of GetFeature


Examples of org.geoserver.wfs.GetFeature

     *
     * @throws WFSException Any service exceptions.
     */
    public FeatureCollectionType getFeature(GetFeatureType request)
        throws WFSException {
        GetFeature getFeature = new GetFeature(wfs, catalog);
        getFeature.setFilterFactory(filterFactory);

        return getFeature.run(request);
    }
View Full Code Here

Examples of org.geoserver.wfs.GetFeature

   public GeoPackageProcess(GeoServer geoServer, GeoPackageGetMapOutputFormat mapOutput, WPSStorageCleaner storage, FilterFactory2 filterFactory) {
       this.storage = storage;
       this.mapOutput = mapOutput;
       this.filterFactory = filterFactory;
       catalog = geoServer.getCatalog();
       getFeatureDelegate = new GetFeature(geoServer.getService(WFSInfo.class), catalog);
       getFeatureDelegate.setFilterFactory(filterFactory);
   }
View Full Code Here

Examples of org.geotools.data.wfs.protocol.wfs.GetFeature

        featureReader = ds.getFeatureReader(query, Transaction.AUTO_COMMIT);
        while(featureReader.hasNext()) {
            SimpleFeature feature = featureReader.next();
            System.out.println(feature.getDefaultGeometry());
        }
        GetFeature request = wfs.getRequest();
        assertEquals("text/xml; subtype=gml/2.1.2", request.getOutputFormat());
    }
View Full Code Here

Examples of org.geotools.data.wfs.protocol.wfs.GetFeature

            LOGGER.log(Level.FINER, e.getMessage(), e);
        } catch (FactoryException e) {
            LOGGER.log(Level.FINER, e.getMessage(), e);
        }
       
        GetFeature request = new GetFeatureQueryAdapter(query, outputFormat, srsName, resultType);

        final WFSResponse response = sendGetFeatures(request);
        return response;
    }
View Full Code Here

Examples of org.geotools.data.wfs.protocol.wfs.GetFeature

        featureReader = ds.getFeatureReader(query, Transaction.AUTO_COMMIT);
        assertNotNull(featureReader);
        assertTrue(featureReader instanceof ForceCoordinateSystemFeatureReader);
        assertEquals(otherCrs, featureReader.getFeatureType()
                .getCoordinateReferenceSystem());
        GetFeature request = wfs.getRequest();
        assertEquals(CUBEWERX_GOVUNITCE.ALTERNATIVECRS, request.getSrsName());
   
        // use an SRS not supported by server
        CoordinateReferenceSystem unknownCrs = CRS.decode("EPSG:3003");
        query.setCoordinateSystem(unknownCrs);
   
        featureReader = ds.getFeatureReader(query, Transaction.AUTO_COMMIT);
        assertNotNull(featureReader);
        assertTrue(featureReader instanceof ReprojectFeatureReader);
        assertEquals(unknownCrs, featureReader.getFeatureType()
                .getCoordinateReferenceSystem());
        request = wfs.getRequest();
        assertEquals(CUBEWERX_GOVUNITCE.CRS, request.getSrsName());
    }
View Full Code Here

Examples of org.geotools.data.wfs.protocol.wfs.GetFeature

        featureReader = ds.getFeatureReader(query, Transaction.AUTO_COMMIT);
        assertNotNull(featureReader);
        assertTrue(featureReader instanceof ReprojectFeatureReader);
        assertEquals(otherCrs, featureReader.getFeatureType()
                .getCoordinateReferenceSystem());
        GetFeature request = wfs.getRequest();
        assertEquals(CUBEWERX_GOVUNITCE.CRS, request.getSrsName());
   
        // use an SRS not supported by server
        CoordinateReferenceSystem unknownCrs = CRS.decode("EPSG:3003");
        query.setCoordinateSystem(unknownCrs);
   
        featureReader = ds.getFeatureReader(query, Transaction.AUTO_COMMIT);
        assertNotNull(featureReader);
        assertTrue(featureReader instanceof ReprojectFeatureReader);
        assertEquals(unknownCrs, featureReader.getFeatureType()
                .getCoordinateReferenceSystem());
        request = wfs.getRequest();
        assertEquals(CUBEWERX_GOVUNITCE.CRS, request.getSrsName());
    }
View Full Code Here

Examples of org.geotools.data.wfs.protocol.wfs.GetFeature

        assertTrue(featureReader instanceof ForceCoordinateSystemFeatureReader);
   
        assertEquals(GML2EncodingUtils.epsgCode(otherCrs),
                GML2EncodingUtils.epsgCode(featureReader.getFeatureType()
                        .getCoordinateReferenceSystem()));
        GetFeature request = wfs.getRequest();
        assertEquals("urn:ogc:def:crs:EPSG::3857", request.getSrsName());
    }
View Full Code Here

Examples of org.geotools.data.wfs.protocol.wfs.GetFeature

        TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);

        createTestProtocol(GEOS_ARCHSITES.CAPABILITIES, mockHttp, new GeoServerStrategy());

        Query query = new Query(GEOS_ARCHSITES.FEATURETYPENAME);
        GetFeature getFeature = new GetFeatureQueryAdapter(query, defaultWfs11OutputFormat,
                "EPSG:4326", ResultType.RESULTS);

        WFSResponse response;

        response = wfs.issueGetFeatureGET(getFeature);
View Full Code Here

Examples of org.geotools.data.wfs.protocol.wfs.GetFeature

        TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);

        createTestProtocol(GEOS_ARCHSITES.CAPABILITIES, mockHttp, new GeoServerStrategy());

        Query query = new Query(GEOS_ARCHSITES.FEATURETYPENAME);
        GetFeature getFeature = new GetFeatureQueryAdapter(query, defaultWfs11OutputFormat,
                "EPSG:4326", ResultType.HITS);

        WFSResponse response;

        response = wfs.issueGetFeatureGET(getFeature);
View Full Code Here

Examples of org.geotools.data.wfs.protocol.wfs.GetFeature

        WFSResponse response;

        wfs.setDescribeFeatureTypeURLOverride(TestData.url(this, GEOS_ARCHSITES.SCHEMA));

        GetFeature getFeature = new GetFeatureQueryAdapter(query, defaultWfs11OutputFormat,
                "EPSG:26713", ResultType.RESULTS);

        response = wfs.issueGetFeatureGET(getFeature);

        assertNotNull(response);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.