Opened 16 years ago

Closed 5 years ago

#2534 closed enhancement (wontfix)

Add XML Metadata support to PGEO driver

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: OGR_SF Version: unspecified
Severity: normal Keywords: PGEO
Cc:

Description

Mike Childs (Global Mapper) reports:

I did get a request from a user to provide access to the XML metadata in an ESRI MDB file in the GM_UserMetadata table, so I went ahead and added support to the pgeo library for that. I'm not sure exactly where to submit this changes to the community, so I thought I would just provide them to you for review and possible inclusion. The changes are pretty minor.

Updated code attached...

Attachments (2)

pgeo_xml.zip (13.6 KB ) - added by warmerdam 16 years ago.
updated driver code.
patch.diff (5.0 KB ) - added by warmerdam 16 years ago.
restructured as a patch.

Download all attachments as: .zip

Change History (8)

by warmerdam, 16 years ago

Attachment: pgeo_xml.zip added

updated driver code.

by warmerdam, 16 years ago

Attachment: patch.diff added

restructured as a patch.

comment:1 by warmerdam, 16 years ago

It appears the patch exposes the metadata via a special method on the OGRPGeoLayer called GetMetadata(). It is not clear how generally useful this will be since it is not part of the OGR data model.

I've asked Mike to comment here.

in reply to:  1 comment:2 by globalmapper, 16 years ago

That is correct, the extra information is currently exposed only through the GetMetadata function in the OGRPGeoLayer class. I wasn't too sure the best place to put this in the OGR data model for easier access. Perhaps in the OGRFeatureDefn class? Anyone have any suggestions?

comment:3 by warmerdam, 16 years ago

Mike,

There are a couple possible approaches (at least).

1) Extend the OGRLayer interface so that GetMetadata() is a proper part of the OGR data model and general API. To do this we would need to write an RFC and clearly document the intended semantics of the method on different datasources.

2) Treat the metadata as a layer - essentially expose GDB_UserMetadata as a non-spatial OGR Layer in the PGEO driver. It would then be up to application code to query it much as you have done in the driver. This would not require an RFC, and would remain a local change in the PGEO driver. It would be a non-trivial amount of change from the current patch, but it would also leave an obvious approach to exposing any other GDB_ tables we decide are of broader interest.

comment:4 by globalmapper, 16 years ago

Since the metadata is really tied to an existing layer I think that adding something to the OGRLayer interface would make more sense than creating a separate non-spatial layer for the table that users would then have to know how to join up to the appropriate spatial layer themselves. That logic should be hidden in the pgeo library.

I'm not sure what all is involved in a RFC. I think if this was moved up to the OGRLayer level that it should maybe be called GetXmlMetadata (it probably should be called that in the OGRPGeoLayer as well) since it should always contain XML-formatted metadata for the layer. I supposed a new virtual GetXmlMetadata function could be added to OGRLayer and any layers that have additional metadata available in XML format (like OGRPGeoLayer) could override that. I think I have seen XML metadata files accompanying data in other formats that I have seen.

comment:5 by Even Rouault, 9 years ago

Note that since GDAL 2.0, OGRLayer derives from GDALMajorObject, so the metadata could be reported properly.

comment:6 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.