Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] To use ChoiceAttributeType with geotools

As far as I know the ChoiceAttributeType is not ready in Geotools 2.2.x, which is what uDig is based on. If you can to have a feature that can be Point, Polygon or Line then make the GeometryType be Geometry.

Jesse


On 4-Apr-06, at 7:50 AM, Francisco Javier García González wrote:

Hello

I'm working with UDIG 1.1.M5 and geotools.
I want to add a attribute to one feature when I create it. For that attribute I want the user to be able to change its value from a list of predetermined values in the feature editor. I don't know if I am using the right class (ChoiceAttributeType), but I'm not achieving my goal because although the feature editor shows the property, it is not possible to change it nor to chose between the different values.

The type of geometry is a polygon, but I will have point and polylines.

	--------------------------------------------------
chAttribute[0] = AttributeTypeFactory.newAttributeType ("A",String.class); chAttribute[1] = AttributeTypeFactory.newAttributeType ("B",String.class); ChoiceAttributeType choiceAttribute = new ChoiceAttributeType ("TYPE",chAttribute);

	...........

	Object[] featureAttributes = {geometry,"A"};
	features[i] = FeatureType.create(featureAttributes, 1);

	-------------------------------------------------

Has someone tried to do the same thing?

A greeting



_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top