Package org.geotools.data.simple

Examples of org.geotools.data.simple.SimpleFeatureCollection.features()


       
        // check size
        assertEquals(1, features.size());
       
        // check actual iteration
        SimpleFeatureIterator it = features.features();
        try {
            assertTrue(it.hasNext());
            SimpleFeature f = it.next();
            ReferencedEnvelope fe = ReferencedEnvelope.reference(f.getBounds());
            assertEquals(1, ((Number) f.getAttribute(aname("intProperty"))).intValue());
View Full Code Here


   
    SimpleFeatureIterator fr1 = null;
    SimpleFeatureIterator fr2 = null;
    try
    {
      fr1 = collection.features();

      if (fr1 == null)
        return false;
         
      while (fr1.hasNext())
View Full Code Here

         
      while (fr1.hasNext())
      {
        SimpleFeature f1 = fr1.next();
        Geometry g1 = (Geometry) f1.getDefaultGeometry();
        fr2 = collection.features();
        try {
            while (fr2 != null && fr2.hasNext())
            {
              SimpleFeature f2 = fr2.next();
              Geometry g2 = (Geometry) f2.getDefaultGeometry();
View Full Code Here

      boolean r = true;
     
        SimpleFeatureSource fsLine = (SimpleFeatureSource) layers.get(getLineTypeRef());
       
        SimpleFeatureCollection fcLine = fsLine.getFeatures();
        SimpleFeatureIterator fLine = fcLine.features();
       
        SimpleFeatureSource fsPoly = (SimpleFeatureSource) layers.get(getRestrictedPolygonTypeRef());
       
        ListFeatureCollection fcPoly = new ListFeatureCollection( fsPoly.getFeatures() );
               
View Full Code Here

         
      while (fr1.hasNext())
      {
        SimpleFeature f1 = fr1.next();
        Geometry g1 = (Geometry) f1.getDefaultGeometry();
        fr2 = collectionB.features();
     
        while (fr2 != null && fr2.hasNext())
        {
          SimpleFeature f2 = fr2.next();
          Geometry g2 = (Geometry) f2.getDefaultGeometry();
View Full Code Here

 
    SimpleFeatureIterator fr1 = null;
    SimpleFeatureIterator fr2 = null;
    try
    {
      fr1 = collection.features();

      if (fr1 == null)
        return false;
         
      while (fr1.hasNext())
View Full Code Here

         
      while (fr1.hasNext())
      {
        SimpleFeature f1 = fr1.next();
        Geometry g1 = (Geometry) f1.getDefaultGeometry();
        fr2 = collection.features();
     
        while (fr2 != null && fr2.hasNext())
        {
          SimpleFeature f2 = fr2.next();
          Geometry g2 = (Geometry) f2.getDefaultGeometry();
View Full Code Here

      boolean r = true;
     
        SimpleFeatureSource fsLine = (SimpleFeatureSource) layers.get(getLineTypeRef());
       
        SimpleFeatureCollection fcLine = fsLine.getFeatures();
        SimpleFeatureIterator fLine = fcLine.features();
       
        SimpleFeatureSource fsPoly = (SimpleFeatureSource) layers.get(getRestrictedPolygonTypeRef());
        
        ListFeatureCollection fcPoly = new ListFeatureCollection( fsPoly.getFeatures() );
               
View Full Code Here

     
      LineStringGraphGenerator lgb = new LineStringGraphGenerator();
      SimpleFeatureSource fs = (SimpleFeatureSource) layers.get(typeName);
      SimpleFeatureCollection fr = fs.getFeatures();
      SimpleFeatureCollection fc = fr;
      SimpleFeatureIterator f = fc.features();

      while (f.hasNext()) {
          SimpleFeature ft = f.next();

          if (envelope.contains(ft.getBounds())) {
View Full Code Here

        SimpleFeatureCollection featureCollection;
        featureCollection = (SimpleFeatureCollection) featureCollections.get(0);
        assertEquals(5, featureCollection.size());
        assertNotNull(featureCollection.getBounds().getCoordinateReferenceSystem());

        SimpleFeatureIterator features = featureCollection.features();

        try {
            assertTrue(features.hasNext());

            SimpleFeature f = features.next();
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.