[PATCH] FGDB driver does not ensure layer names are valid
|Reported by:||ryanl||Owned by:||warmerdam|
|Severity:||normal||Keywords:||FileGDB, File Geodatabase|
If an input contains layer names that are invalid in a FGDB the driver attempts to add them directly, error messages are displayed and the resulting database does not contain the layers.
The FGDB API also exits when you create layers with reserved words.
The attached patch cleans layer names by changing invalid characters to "_", appending "_" to reserved words, prepending "-" to unsupported prefixes, shrinks names to 160 characters and ensures uniqueness of the names. It also adds an alias to the original layer name.
I have attached an example csv/vrt that contains several layers with invalid and duplicate names.
This is similar to #4458.
- Reserved words: http://blogs.esri.com/Support/blogs/supportcenter/archive/2010/05/26/Words-_2800_by-Reservation-Only_2900_.aspx
- Field name length: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/File_geodatabase_size_and_name_limits/003n0000007q000000
- Invalid characters/prefixes (Fields starting with underscores work fine): http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002200000002000000.htm