Schuster Stefan ha scritto:
> Hi,
>
>
>
> I wrote a programm that creates a Shapefile, and it basically works
> fine. But the strings in the metadata can have more than 255 characters,
> and I have no idea how I can define this in the SimpleFeatureType.
>
>
>
> Currently I create the type as follows, and this leads to Strings that
> are truncated after 255 chars:
>
>
>
> StringBuilder sb = *new* StringBuilder();
>
> sb.append("location:MultiLineString:srid=32632");
>
> *for* (String fieldName : fieldNames) {
>
> sb.append("," + fieldName + ":String");
>
> }
>
> TYPE = DataUtilities./createType/("Testereignisse", // <- the name for
>
> // our feature type
>
> sb.toString())
I don't think setting the field length is supported using
this method. It's really just there to make unit testing easier,
was not expanded to make it of general utility.
I suggest you use SimpleFeatureTypeBuilder instead
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users