Metadata Editor - Vector Metadata not shown

Issue #184 resolved
Andreas Janz created an issue

I can select a GeoPackage file in the Metadata Editor, but the metadata is not shown.

Tested with attached GeoPackage.

The metadata domains "CLASS_NAMES" and "CLASS_LOOKUP" are not shown.

filename = r'c:\output\LandCov_BerlinUrbanGradient.gpkg'
ds=gdal.OpenEx(filename, gdal.OF_VECTOR)
l=ds.GetLayer(0)
print(l.GetMetadata_Dict('CLASS_NAMES'))
print(l.GetMetadata_Dict('CLASS_LOOKUP'))

Prints:

{'level_1': '{Unclassified, Impervious, Vegetation, Soil, Other}', 
 'level_2': '{Unclassified, Roof, Pavement, Low vegetation, Tree, Soil, Other}'}
{'level_1': '{0, 0, 0, 156, 156, 156, 56, 168, 0, 168, 112, 0, 245, 245, 122}', 
 'level_2': '{0, 0, 0, 230, 0, 0, 156, 156, 156, 152, 230, 0, 38, 115, 0, 168, 112, 0, 245, 245, 122}'}

Comments (2)

  1. Andreas Janz reporter

    Until fixed, one can also use: View Map Metadata ProcessingAlgorithm under Auxilliary -> View Map Metadata, which simply prints all Raster/Vector metadata to the log widget of the algo dialog.

    parameters = {'map': 'C:\\Work\\source\\enmap-box-testdata\\enmapboxtestdata\\LandCov_BerlinUrbanGradient.gpkg'}
    
    ===============
    Layer Domain: CLASS_NAMES
    level 1 = ['Unclassified', 'Impervious', 'Vegetation', 'Soil', 'Other']
    level 2 = ['Unclassified', 'Roof', 'Pavement', 'Low vegetation', 'Tree', 'Soil', 'Other']
    
    ===============
    Layer Domain: CLASS_LOOKUP
    level 1 = ['0', '0', '0', '156', '156', '156', '56', '168', '0', '168', '112', '0', '245', '245', '122']
    level 2 = ['0', '0', '0', '230', '0', '0', '156', '156', '156', '152', '230', '0', '38', '115', '0', '168', '112', '0', '245', '245', '122']
    
    ===============
    Layer Domain: <default>
    DBF DATE LAST UPDATE = 2017-08-30
    
  2. Log in to comment