<filename>OGR_drivers.py
###########
# Translations between more friendly describtions of OGR-drivers and short codes.
# adresses: TRUI issue #2 https://bitbucket.org/KMS/trui/issue/2/ogr-driver-naming
# more or less taken directly from http://www.gdal.org/ogr/ogr_formats.html
# simlk, march 2013
##############
# FORMAT: Long name: (short_name,dco,lco)
OGR_LONG_TO_SHORT = {
    "Aeronav FAA files": ["AeronavFAA", "", ""],
    "ESRI ArcObjects": ["ArcObjects", "", ""],
    "Arc/Info Binary Coverage": ["AVCBin", "", ""],
    "Arc/Info .E00 (ASCII) Coverage": ["AVCE00", "", ""],
    "Arc/Info Generate": ["ARCGEN", "", ""],
    "Atlas BNA": ["BNA", "", ""],
    "AutoCAD DWG": ["DWG", "", ""],
    "AutoCAD DXF": ["DXF", "", ""],
    "Comma Separated Value (.csv)": ["CSV", "", ""],
    "CouchDB/GeoCouch": ["CouchDB", "", ""],
    "DODS/OPeNDAP": ["DODS", "", ""],
    "EDIGEO": ["EDIGEO", "", ""],
    "ElasticSearch": ["ElasticSearch", "", ""],
    "ESRI FileGDB": ["FileGDB", "", ""],
    "ESRI Personal GeoDatabase": ["PGeo", "", ""],
    "ESRI ArcSDE": ["SDE", "", ""],
    "ESRI Shapefile": ["ESRI Shapefile", "", ""],
    "FMEObjects Gateway": ["FMEObjects Gateway", "", ""],
    "GeoJSON": ["GeoJSON", "", ""],
    "Geoconcept Export": ["Geoconcept", "", ""],
    "Geomedia .mdb": ["Geomedia", "", ""],
    "GeoRSS": ["GeoRSS", "", ""],
    "Google Fusion Tables": ["GFT", "", ""],
    "GML": ["GML", "", ""],
    "GMT": ["GMT", "", ""],
    "GPSBabel": ["GPSBabel", "", ""],
    "GPX": ["GPX", "", ""],
    "GRASS": ["GRASS", "", ""],
    "GPSTrackMaker (.gtm, .gtz)": ["GPSTrackMaker", "", ""],
    "Hydrographic Transfer Format": ["HTF", "", ""],
    "Idrisi Vector (.VCT)": ["Idrisi", "", ""],
    "Informix DataBlade": ["IDB", "", ""],
    "INTERLIS1": ["Interlis 1", "", ""],
    "INTERLIS2": ["Interlis 2", "", ""],
    "INGRES": ["INGRES", "", ""],
    "KML": ["KML", "", ""],
    "LIBKML": ["LIBKML", "", ""],
    "Mapinfo File": ["MapInfo File", "", ""],
    "Microstation dgn (v.7)": ["DGN", "", ""],
    "Access MDB": ["MDB", "", ""],
    "Memory": ["Memory", "", ""],
    "MySQL": ["MySQL", "", ""],
    "NAS - ALKIS": ["NAS", "", ""],
    "Oracle Spatial": ["OCI", "", ""],
    "ODBC": ["ODBC", "", ""],
    "MS SQL Spatial server": ["MSSQLSpatial", "", ""],
    "Open Document Spreadsheet": ["ODS", "", ""],
    "OGDI Vectors": ["OGDI", "", ""],
    "OpenAir": ["OpenAir", "", ""],
    "OpenStreetMap": ["OSM", "", ""],
    "PCI Geomatics DbFile": ["PCIDSK", "", ""],
    "Geospatial PDF": ["PDF", "", ""],
    "PDS": ["PDS", "", ""],
    "PostgreSQL data dump": ["PGDump", "", ""],
    "PostgreSQL/Postgis": ["PostgreSQL", "", ""],
    "EPIInfo .REC": ["REC", "", ""],
    "S-57 (ENC)": ["S57", "", ""],
    "SDTS": ["SDTS", "", ""],
    "SEG-P1/UKOOA P1/90": ["SEGUKOOA", "", ""],
    "SEG-Y": ["SEGY", "", ""],
    "Norwegian SOSI Std.": ["SOSI", "", ""],
    "SQLite": ["SQLite", "", ""],
    "SpatiaLite": ["SQLite", "SPATIALITE=YES", ""],
    "SUA": ["SUA", "", ""],
    "SVG": ["SVG", "", ""],
    "UK .NTF": ["UK. NTF", "", ""],
    "U.S. Census TIGER/Line": ["TIGER", "", ""],
    "VFK data": ["VFK", "", ""],
    "VRT-Virtual Datasource": ["VRT", "", ""],
    "OGC WFS": ["WFS", "", ""],
    "MS Excel format": ["XLS", "", ""],
    "MS Open XML spreadsheet": ["XLSX", "", ""],
    "X-Plane/Flightgear data": ["XPLANE", "", ""]}
# Define or pickle this to speed up start up time
OGR_SHORT_TO_LONG = dict()  # A one to many mapping
for key, val in OGR_LONG_TO_SHORT.items():
    if val[0] in OGR_SHORT_TO_LONG:
        OGR_SHORT_TO_LONG[val[0]].append(key)
    else:
        OGR_SHORT_TO_LONG[val[0]] = [key]

<filename>OGR_drivers.py
###########
# Translations between more friendly describtions of OGR-drivers and short codes.
# adresses: TRUI issue #2 https://bitbucket.org/KMS/trui/issue/2/ogr-driver-naming
# more or less taken directly from http://www.gdal.org/ogr/ogr_formats.html
# simlk, march 2013
##############
# FORMAT: Long name: (short_name,dco,lco)
OGR_LONG_TO_SHORT = {
    "Aeronav FAA files": ["AeronavFAA", "", ""],
    "ESRI ArcObjects": ["ArcObjects", "", ""],
    "Arc/Info Binary Coverage": ["AVCBin", "", ""],
    "Arc/Info .E00 (ASCII) Coverage": ["AVCE00", "", ""],
    "Arc/Info Generate": ["ARCGEN", "", ""],
    "Atlas BNA": ["BNA", "", ""],
    "AutoCAD DWG": ["DWG", "", ""],
    "AutoCAD DXF": ["DXF", "", ""],
    "Comma Separated Value (.csv)": ["CSV", "", ""],
    "CouchDB/GeoCouch": ["CouchDB", "", ""],
    "DODS/OPeNDAP": ["DODS", "", ""],
    "EDIGEO": ["EDIGEO", "", ""],
    "ElasticSearch": ["ElasticSearch", "", ""],
    "ESRI FileGDB": ["FileGDB", "", ""],
    "ESRI Personal GeoDatabase": ["PGeo", "", ""],
    "ESRI ArcSDE": ["SDE", "", ""],
    "ESRI Shapefile": ["ESRI Shapefile", "", ""],
    "FMEObjects Gateway": ["FMEObjects Gateway", "", ""],
    "GeoJSON": ["GeoJSON", "", ""],
    "Geoconcept Export": ["Geoconcept", "", ""],
    "Geomedia .mdb": ["Geomedia", "", ""],
    "GeoRSS": ["GeoRSS", "", ""],
    "Google Fusion Tables": ["GFT", "", ""],
    "GML": ["GML", "", ""],
    "GMT": ["GMT", "", ""],
    "GPSBabel": ["GPSBabel", "", ""],
    "GPX": ["GPX", "", ""],
    "GRASS": ["GRASS", "", ""],
    "GPSTrackMaker (.gtm, .gtz)": ["GPSTrackMaker", "", ""],
    "Hydrographic Transfer Format": ["HTF", "", ""],
    "Idrisi Vector (.VCT)": ["Idrisi", "", ""],
    "Informix DataBlade": ["IDB", "", ""],
    "INTERLIS1": ["Interlis 1", "", ""],
    "INTERLIS2": ["Interlis 2", "", ""],
    "INGRES": ["INGRES", "", ""],
    "KML": ["KML", "", ""],
    "LIBKML": ["LIBKML", "", ""],
    "Mapinfo File": ["MapInfo File", "", ""],
    "Microstation dgn (v.7)": ["DGN", "", ""],
    "Access MDB": ["MDB", "", ""],
    "Memory": ["Memory", "", ""],
    "MySQL": ["MySQL", "", ""],
    "NAS - ALKIS": ["NAS", "", ""],
    "Oracle Spatial": ["OCI", "", ""],
    "ODBC": ["ODBC", "", ""],
    "MS SQL Spatial server": ["MSSQLSpatial", "", ""],
    "Open Document Spreadsheet": ["ODS", "", ""],
    "OGDI Vectors": ["OGDI", "", ""],
    "OpenAir": ["OpenAir", "", ""],
    "OpenStreetMap": ["OSM", "", ""],
    "PCI Geomatics DbFile": ["PCIDSK", "", ""],
    "Geospatial PDF": ["PDF", "", ""],
    "PDS": ["PDS", "", ""],
    "PostgreSQL data dump": ["PGDump", "", ""],
    "PostgreSQL/Postgis": ["PostgreSQL", "", ""],
    "EPIInfo .REC": ["REC", "", ""],
    "S-57 (ENC)": ["S57", "", ""],
    "SDTS": ["SDTS", "", ""],
    "SEG-P1/UKOOA P1/90": ["SEGUKOOA", "", ""],
    "SEG-Y": ["SEGY", "", ""],
    "Norwegian SOSI Std.": ["SOSI", "", ""],
    "SQLite": ["SQLite", "", ""],
    "SpatiaLite": ["SQLite", "SPATIALITE=YES", ""],
    "SUA": ["SUA", "", ""],
    "SVG": ["SVG", "", ""],
    "UK .NTF": ["UK. NTF", "", ""],
    "U.S. Census TIGER/Line": ["TIGER", "", ""],
    "VFK data": ["VFK", "", ""],
    "VRT-Virtual Datasource": ["VRT", "", ""],
    "OGC WFS": ["WFS", "", ""],
    "MS Excel format": ["XLS", "", ""],
    "MS Open XML spreadsheet": ["XLSX", "", ""],
    "X-Plane/Flightgear data": ["XPLANE", "", ""]}
# Define or pickle this to speed up start up time
OGR_SHORT_TO_LONG = dict()  # A one to many mapping
for key, val in OGR_LONG_TO_SHORT.items():
    if val[0] in OGR_SHORT_TO_LONG:
        OGR_SHORT_TO_LONG[val[0]].append(key)
    else:
        OGR_SHORT_TO_LONG[val[0]] = [key]

########### # Translations between more friendly describtions of OGR-drivers and short codes. # adresses: TRUI issue #2 https://bitbucket.org/KMS/trui/issue/2/ogr-driver-naming # more or less taken directly from http://www.gdal.org/ogr/ogr_formats.html # simlk, march 2013 ############## # FORMAT: Long name: (short_name,dco,lco) # Define or pickle this to speed up start up time # A one to many mapping