Opened 12 years ago
Closed 12 years ago
#4466 closed defect (fixed)
[PATCH] FGDB driver does not ensure layer names are valid
Reported by: | ryanl | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.1 |
Component: | OGR_SF | Version: | 1.9.0 |
Severity: | normal | Keywords: | FileGDB, File Geodatabase |
Cc: | robert.coup@… |
Description
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.
References:
- 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
Attachments (3)
Change History (4)
by , 12 years ago
Attachment: | invalid_layers.diff added |
---|
comment:1 by , 12 years ago
Milestone: | → 1.9.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | svn-trunk → 1.9.0 |
fix against r23791