Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
switch vector sheet to new style management #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Sep 3, 2019
1 parent ae877ab commit ed1d12b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 75 deletions.
25 changes: 2 additions & 23 deletions isogeotoxlsx/isogeo2xlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,30 +607,9 @@ def store_md_generic(self, md: Metadata, ws: Worksheet, idx: int):
# lang
ws["{}{}".format(col.get("language").letter, idx)] = md.language

def store_md_vector(self, md: Metadata, ws: Worksheet, idx: int):
""" TO DOCUMENT
"""

# STYLING
ws["C{}".format(idx)].style = "wrap"
ws["F{}".format(idx)].style = "wrap"
ws["G{}".format(idx)].style = "wrap"
ws["I{}".format(idx)].style = "wrap"
ws["J{}".format(idx)].style = "wrap"
ws["K{}".format(idx)].style = "date"
ws["L{}".format(idx)].style = "date"
ws["U{}".format(idx)].style = "wrap"
ws["AA{}".format(idx)].style = "wrap"
ws["AB{}".format(idx)].style = "wrap"
ws["AC{}".format(idx)].style = "wrap"
ws["AD{}".format(idx)].style = "wrap"
ws["AE{}".format(idx)].style = "wrap"
ws["AG{}".format(idx)].style = "wrap"
ws["AH{}".format(idx)].style = "wrap"

# LOG
# log
logger.info(
"Vector metadata stored: {} ({})".format(
"Metadata stored: {} ({})".format(
md.title_or_name(slugged=1), md._id
)
)
Expand Down
104 changes: 52 additions & 52 deletions isogeotoxlsx/matrix/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,59 @@
# ############ Globals ############
# #################################
VECTOR_COLUMNS = {
"_created": ("AM", 0),
"_creator": ("E", 0),
"_id": ("AL", 0),
"_modified": ("AN", 0),
"abstract": ("C", 0),
"collectionContext": ("I", 0),
"collectionMethod": ("J", 0),
"conditions": ("AD", 0),
"contacts": ("AF", 0),
"coordinateSystem": ("T", 0),
"created": ("O", 0),
"distance": ("W", 0),
"editionProfile": (None, 0),
"encoding": (None, 0),
"envelope": ("U", 0),
"events": ("P", 0),
"featureAttributes": ("AA", 0),
"features": ("Y", 0),
"format": ("S", 0),
"formatVersion": (None, 0),
"geometry": ("V", 0),
"keywords": ("F", 0),
"language": ("AO", 0),
"layers": (None, 0),
"limitations": ("AE", 0),
"links": (None, 0),
"modified": ("Q", 0),
"name": ("B", 0),
"operations": (None, 0),
"path": ("D", 0),
"precisio(n": (None, 0),
"published": ("R", 0),
"scale": ("X", 0),
"series": (None, 0),
"serviceLayers": (None, 0),
"specifications": ("AB", 0),
"tags": (None, 0),
"title": ("A", 0),
"topologicalConsistency": ("AC", 0),
"typ(e": (None, 0),
"updateFrequency": ("M", 0),
"validFrom": ("K", 0),
"validTo": ("L", 0),
"validityComment": ("N", 0),
"_created": ("AM", "date"),
"_creator": ("E", None),
"_id": ("AL", None),
"_modified": ("AN", "date"),
"abstract": ("C", "wrap"),
"collectionContext": ("I", "wrap"),
"collectionMethod": ("J", "wrap"),
"conditions": ("AD", "wrap"),
"contacts": ("AF", None),
"coordinateSystem": ("T", None),
"created": ("O", "date"),
"distance": ("W", None),
"editionProfile": (None, None),
"encoding": (None, None),
"envelope": ("U", "wrap"),
"events": ("P", None),
"featureAttributes": ("AA", "wrap"),
"features": ("Y", None),
"format": ("S", None),
"formatVersion": (None, None),
"geometry": ("V", None),
"keywords": ("F", "wrap"),
"language": ("AO", None),
"layers": (None, None),
"limitations": ("AE", "wrap"),
"links": (None, None),
"modified": ("Q", "date"),
"name": ("B", None),
"operations": (None, None),
"path": ("D", None),
"precision": (None, None),
"published": ("R", None),
"scale": ("X", None),
"series": (None, None),
"serviceLayers": (None, None),
"specifications": ("AB", "wrap"),
"tags": (None, None),
"title": ("A", None),
"topologicalConsistency": ("AC", "wrap"),
"typ(e": (None, None),
"updateFrequency": ("M", None),
"validFrom": ("K", "date"),
"validTo": ("L", "date"),
"validityComment": ("N", None),
# specific,
"featureAttributesCount": ("Z", 0),
"hasLinkDownload": ("AG", 0),
"hasLinkOther": ("AI", 0),
"hasLinkView": ("AH", 0),
"linkEdit": ("AJ", 0),
"linkView": ("AK", 0),
"inspireConformance": ("H", 0),
"inspireThemes": ("G", 0),
"featureAttributesCount": ("Z", None),
"hasLinkDownload": ("AG", None),
"hasLinkOther": ("AI", None),
"hasLinkView": ("AH", None),
"linkEdit": ("AJ", None),
"linkView": ("AK", None),
"inspireConformance": ("H", None),
"inspireThemes": ("G", "wrap"),
}

# #############################################################################
Expand Down

0 comments on commit ed1d12b

Please sign in to comment.