Opened 13 years ago
Closed 13 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 |
Cc: |
Description
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)
Change History (2)
by , 13 years ago
Attachment: | ogr_l_getname.patch added |
---|
comment:1 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Implemented in trunk in r20336, r20337 and r20338