Opened 7 years ago
Closed 7 years ago
#7109 closed enhancement (fixed)
Setting layer alias in FieGDB layers.
Reported by: | zbordas | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | 2.2.1 |
Severity: | normal | Keywords: | |
Cc: |
Description
We needed a way to explicitly set the layer alias when creating FileGDB layers. I added 2 lines of code to the existing source to honor if a layer alias if passed one in the configuration.
Simple change in ogr\ogrsf_frmts\filegdb\FGdbLayer.cpp : 2458:
/* Set the alias for the Feature Class, check if we received an explicit one in the options vector. */ if ( CSLFetchNameValue( papszOptions, "LAYER_ALIAS") != NULL ) {
std::string alias = CSLFetchNameValue( papszOptions, "LAYER_ALIAS");
CPLCreateXMLElementAndValue(defn_xml, "AliasName", alias.c_str());
} else if (pszLayerNameIn != layerName) {
CPLCreateXMLElementAndValue(defn_xml, "AliasName", pszLayerNameIn);
}
Modified source file.