/[schmitzm]/trunk/src/skrueger/geotools/StyledFeatureCollection.java
ViewVC logotype

Diff of /trunk/src/skrueger/geotools/StyledFeatureCollection.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1203 by alfonx, Tue Nov 2 22:53:55 2010 UTC revision 1261 by alfonx, Thu Nov 11 13:12:50 2010 UTC
# Line 48  import org.opengis.feature.type.Attribut Line 48  import org.opengis.feature.type.Attribut
48  import org.opengis.filter.Filter;  import org.opengis.filter.Filter;
49    
50  import schmitzm.geotools.feature.FeatureUtil;  import schmitzm.geotools.feature.FeatureUtil;
51    import schmitzm.geotools.feature.FeatureUtil.GeometryForm;
52  import skrueger.AttributeMetadataImpl;  import skrueger.AttributeMetadataImpl;
53  import skrueger.i8n.Translation;  import skrueger.i8n.Translation;
54    
# Line 320  public class StyledFeatureCollection Line 321  public class StyledFeatureCollection
321                  SimpleFeatureType ftype = fc.getSchema();                  SimpleFeatureType ftype = fc.getSchema();
322                  for (int i = 0; i < ftype.getAttributeCount(); i++) {                  for (int i = 0; i < ftype.getAttributeCount(); i++) {
323                          AttributeDescriptor aDesc = ftype.getAttributeDescriptors().get(i);                          AttributeDescriptor aDesc = ftype.getAttributeDescriptors().get(i);
324                          if ( !FeatureUtil.isGeometryAttribute(aDesc) )                          if (!FeatureUtil.isGeometryAttribute(aDesc))
325                                  metaDataMap.put(aDesc.getName(), new AttributeMetadataImpl( new NameImpl( aDesc.getName().getNamespaceURI(), aDesc.getName().getLocalPart()),                                  metaDataMap.put(aDesc.getName(), new AttributeMetadataImpl(
326                                                  true, // visible                                                  new NameImpl(aDesc.getName().getNamespaceURI(), aDesc
327                                                                    .getName().getLocalPart()), true, // visible
328                                                  new Translation(aDesc.getLocalName()), // Column name                                                  new Translation(aDesc.getLocalName()), // Column name
329                                                  new Translation(aDesc.getLocalName()), // description                                                  new Translation(aDesc.getLocalName()), // description
330                                                  "" // Unit                                                  "" // Unit
# Line 358  public class StyledFeatureCollection Line 360  public class StyledFeatureCollection
360                  /** It will be recreated on the next getFetureSource() **/                  /** It will be recreated on the next getFetureSource() **/
361                  featureSource = null;                  featureSource = null;
362    
363                  LOGGER                  LOGGER.warn("Uncache onyl uncached any virtual FeatureSource. Object remains in memory.");
                                 .warn("Uncache onyl uncached any virtual FeatureSource. Object remains in memory.");  
364          }          }
365    
366          /*          /*
# Line 439  public class StyledFeatureCollection Line 440  public class StyledFeatureCollection
440                  return getGeoObject().getSchema();                  return getGeoObject().getSchema();
441          }          }
442    
   
443          @Override          @Override
444          public ReferencedEnvelope getReferencedEnvelope() {          public ReferencedEnvelope getReferencedEnvelope() {
445                  return new ReferencedEnvelope(getEnvelope(), getCrs());                  return new ReferencedEnvelope(getEnvelope(), getCrs());
446          }          }
447    
448            /**
449             * Defaults to the GeometryForm determined with FeatureUtil.getGeometryForm,
450             * but can be set to override ANY.
451             */
452            private GeometryForm geometryForm;
453    
454            /**
455             * Defaults to the GeometryForm determined with FeatureUtil.getGeometryForm,
456             * but can be set to override ANY.
457             */
458    
459            @Override
460            public GeometryForm getGeometryForm() {
461                    if (geometryForm == null) {
462                            geometryForm = FeatureUtil.getGeometryForm(getSchema());
463                    }
464                    return geometryForm;
465            }
466    
467            /**
468             * Defaults to the GeometryForm determined with FeatureUtil.getGeometryForm,
469             * but can be set to override ANY.
470             */
471            public void setGeometryForm(GeometryForm geometryForm) {
472                    this.geometryForm = geometryForm;
473            }
474    
475  }  }

Legend:
Removed from v.1203  
changed lines
  Added in v.1261

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26