Opened 14 years ago

Closed 14 years ago

#3719 closed enhancement (fixed)

[PATCH] Add OGR_L_GetName() / OGRLayer::GetName()

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 1.8.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: layer GetName


The proposed patch introduces a new virtual method GetName() at the OGRLayer level.

The semantics of this method is to return the same result as GetLayerDefn()->GetName(). This is indeed the default implementation of the OGRLayer class itself.

So, what is it usefull for ? A few drivers, like PG since r20277, can benefit from GetName() by overloading it, without needing to fetch the layer defn, which is an opperation that cost a few SQL requests.

So the new method can be usefull to present the list of layer names of a PG database.

This would also be very handy for a OGR WFS driver I'm writing. It would save a DescribeFeatureType request for each layer. Just GetCapabilities would be needed.

Attachments (1)

ogr_l_getname.patch (4.7 KB ) - added by Even Rouault 14 years ago.

Download all attachments as: .zip

Change History (2)

by Even Rouault, 14 years ago

Attachment: ogr_l_getname.patch added

comment:1 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed

Implemented in trunk in r20336, r20337 and r20338

Note: See TracTickets for help on using tickets.