Incorrect Shapefile AttributeType Length
----------------------------------------

                 Key: GEOT-1727
                 URL: http://jira.codehaus.org/browse/GEOT-1727
             Project: GeoTools
          Issue Type: Bug
          Components: data shapefile
    Affects Versions: 2.4.0
         Environment: Windows XP, Java 6.0
            Reporter: Hari Singh Khalsa
            Assignee: Jesse Eichar
            Priority: Critical


Error found which sets the length of all String AttributeTypes to 254, thereby 
greatly increasing the size of dbf files associated with shapefiles.  This 
occured when writing a new shapefile or appending to an old.  More than one 
append creates an invalid Shapefile as a result of this bug.

Location of ShapefileDataStore 
...\gt2-2.4.0\modules\plugin\shapefile\src\main\java\org\geotools\data\shapefile

Location of Bug: Class: ShapefileDataStore; Function: createDbaseHeader; Line: 
1090
Description:  AttributeTypes with filters that restrict length do not pass this 
if test and therefore are set to the  default lengths.  This is mostly a 
problem for String attributes, which get set to a default length of 254.

Work around:  Copy ShapefileDataStore into local package. Modify lines 
1090-1092 to allow attribute types with length filters to pass through.  Change 
package.  Add org.geotools.data.shapefile.Lock to the import statements.  
Utilized this modified ShapefileDataStore.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to