Opened 6 years ago

Closed 6 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);

}

Attachments (1)

FGdbLayer.cpp (135.3 KB ) - added by zbordas 6 years ago.
Modified source file.

Download all attachments as: .zip

Change History (2)

by zbordas, 6 years ago

Attachment: FGdbLayer.cpp added

Modified source file.

comment:1 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

In 40560:

FileGDB: add LAYER_ALIAS layer creation option (derived from patch by zbordas, fixes #7109)

Note: See TracTickets for help on using tickets.