Added by jgarnett, last edited by jgarnett on Dec 07, 2007  (view change)

Labels

 
(None)

A feature is something that can be drawn on a map, while a simple feature is one that does not contain any complicated internal structure. A SimpleFeature is "flat" recording of key value pairs. At least one of the values should be a Geometry, and the list of keys is known ahead of time.

Related

How to Create a SimpleFeature

You can create a SimpleFeature using the a builder:

GeometryFactory geomFactory = new GeometryFactory();
  SimpleFeatureBuilder build = new SimpleFeatureBuilder( featureType );
  
  //add the attributes
  build.add( geomFactory.createPoint( new Coordinate(40,50) );
  build.add( 12 );
  build.add( "My Name" );
  
  SimpleFeature feature = builder.build( "Flag.12" );