Re: [Geotools-gt2-users] problem adding attributes to shapefile version 2.5

2008-07-09 Thread bdo
Your're right about the jar file. It was a jar file issue. I removed three commons jar files (codec, collections, logging) in the application WEB-INF/lib that were probably conflicting with the versions from the geotools M2 library. Once I removed them, the attribute addition code worked fine. J

Re: [Geotools-gt2-users] problem adding attributes to shapefile version 2.5

2008-07-09 Thread bdo
I tried the builder.add(AttributeTypeFactory.newAttributeType("stringProperty", String.class, true, 10) like you suggested and I still didn't have success. Knowing from your reply that it works for you, I checked my system as I figured it had to be somethere there. I found three commons* jar files

Re: [Geotools-gt2-users] problem adding attributes to shapefile version 2.5

2008-07-09 Thread Jody Garnett
Interesting; shapefile has the concept of a maximum string length (I think it may be 256 characters?). As such when you call .createSchema it actually makes a new FeatureType with all these restrictions represented. The restriction on string length is represented as something like "length(strin

Re: [Geotools-gt2-users] problem adding attributes to shapefile version 2.5

2008-07-09 Thread Matt Foster
I'm not sure why the code you have isn't working. It looks like it should. When I have created simple features to go into a shapefile in the past, I have used AttributeTypeFactory for the attributes. Perhaps you could see if the following works to add the String attribute... builder.add(Att

[Geotools-gt2-users] problem adding attributes to shapefile version 2.5

2008-07-09 Thread bdo
Hi, I am a new user to geotools and am using the 2.5M2 version. (Thank you for the great tool and documention). I've successfully created a shapefile of points but am having problems when trying to include additional attributes. I'm using the SimpleFeatureTypeBuilder. SimpleFeatureTypeBuilder b