Package org.geotools

Examples of org.geotools.GML


    try {
      String url = formatGetFeatureInfoUrl(bestResolution.getTileWidthPx(), bestResolution.getTileHeightPx(),
          layerBox, x, y);
      log.debug("getFeaturesByLocation: {} {} {} {}",
          new Object[] {layerCoordinate, layerScale, pixelTolerance, url});
      GML gml = new GML(Version.GML3);

      stream = httpService.getStream(url, getAuthentication());
      FeatureCollection<?, SimpleFeature> collection = gml.decodeFeatureCollection(stream);
      FeatureIterator<SimpleFeature> it = collection.features();

      while (it.hasNext()) {
        features.add(toDto(it.next()));
      }
View Full Code Here


        }

        @Override
        protected void write(Object object, OutputStream out) throws IOException {
            SimpleFeatureCollection features = (SimpleFeatureCollection) object;
            GML gml = new GML(Version.WFS1_0);
            gml.setNamespace("gf", features.getSchema().getName().getNamespaceURI());
            // gml.setFeatureBounding(false);
            gml.encode(out, features);
        }
View Full Code Here

TOP

Related Classes of org.geotools.GML

Copyright © 2018 www.massapicom. 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.