[udig-devel] creating a feature with default values
andrea antonello
andrea.antonello at gmail.com
Fri May 2 15:08:46 PDT 2008
Alright, I think I miss something.
[...]
> Object attributes[] = DataUtilities.defaultValues( featureType );
That is what I thought I would need, btut attributes[0], seems to
contain it all:
[Feature[ id=fid-861f70d_119aa748a37__7fec , the_geom=null , ID=null ,
IDSTAZIONE=null , Y=null , X=null , DESCRIZION=null , TIPOLOGIA_=null
, RELATED_ID=null , RETE_ID=null , ATTIVO=null ]]
Isn't this a full feature structure?
> attributes[0] = geometry?
If I do this, then I get an exception in the next:
> featureType.create( attributes );
telling me that:
IllegalAttribute: org.geotools.feature.Feature , but got
com.vividsolutions.jts.geom.Point
So the attribute is expected to be a feature, instead of one of the
attributes, geometry or non geometry?
Investigating further...
Andrea
>
> There is also a method for dealing with a single AttributeType
>
> Object value = DataUtilities.defaultValue( attributeTypes[0] );
>
> > Should this work?
> >
> >
> Your example looked fine (and similar to the code in DataUtilities), I
> think you now may be arguing with your DataStore or working with invalid
> data?
>
>
> Jody
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
More information about the udig-devel
mailing list