# ====================================================================
# Source code for cfdm_coordinate_reference.svg
#
# cfdm_coordinate_reference.svg created with:
#
# $ dot -T svg cfdm_coordinate_reference.gv cfdm_coordinate_reference.svg
# ====================================================================

digraph {splines=ortho nodesep="+0.25"

node [
     style="filled,bold"
     shape=rectangle
     fillcolor="#C3FFC2"
     width=1.0
     height=0.5
     fontname="Arial"
     ]

# --------------------------------------------------------------------
# CF-netCDF variables
# --------------------------------------------------------------------
DataVariable [
         fillcolor="#C3FFFF"
         label="CN::Data\nVariable"
         ]

GenericCoordinateVariable [
      label="<<abstract>>\nGeneric\nCoordinate\nVariable"
      fillcolor=white
      ]
GridMappingVariable [
       fillcolor="#C3FFFF"
       label="CN::Grid Mapping\nVariable"
       ]

NamedFormula [
       fillcolor="#C3FFFF"
       label="<<enumeration>>\nCN::Named\nFormula"
       ]

FormulaTerms [
       fillcolor="#C3FFFF"
       label="CN::Formula\nTerms"
       ]

# --------------------------------------------------------------------
# CF data model constructs
# --------------------------------------------------------------------
GenericCoordinateConstruct [
      label="<<abstract>>\nGeneric\nCoordinate\nConstruct"
      fillcolor=white
      ]
DomainAncillary [
     label="<<construct>>\nDomainAncillary"
     ]
CoordinateReference [
        label="<<construct>>\nCoordinateReference"
        ]
CoordinateConversion [
        label="Coordinate\nConversion"
        ]
Datum [
        label="Datum"
        ]

## --------------------------------------------------------------------
## Notes
## --------------------------------------------------------------------
#Note [
#               style=filled
#         fillcolor=white
#         label="A Coordinate Conversion
#can only be associated
#with one of
#Grid Mapping Variable
#or Formula Terms"
#         fontsize="11.0"
#         fontname="Arial italic"
#         ]

# --------------------------------------------------------------------
# Invisible nodes used to aid in layout
# --------------------------------------------------------------------
node [
     width=0
     height=0
     size=fixed
     shape=none
     label=""
     ]
route1
route2
route3
route4
route5
route6
route7
route8

edge [arrowtail=none
      arrowhead=vee
      dir=both
      arrowsize=1.0
      fontname="Arial"
      labelfontsize=11.0
      ]

CoordinateReference -> DomainAncillary [headlabel="0..*   " minlen=2]
CoordinateReference -> GenericCoordinateConstruct [weight=100
                                                   headlabel="0..*  "]
CoordinateReference -> Datum [arrowtail=diamond headlabel="0..1  "]
CoordinateReference -> CoordinateConversion [arrowtail=diamond
                                 headlabel="0..1    "]
DomainAncillary -> CoordinateConversion [arrowhead=none
                       arrowtail=vee
           taillabel="0..*       "
                       labeldistance=1.1]
GenericCoordinateConstruct -> CoordinateConversion [arrowhead=none
                                  arrowtail=vee
                taillabel="   0..*"
                labeldistance=2.0]
DomainAncillary -> DataVariable [taillabel=" either/or" minlen=5]
DomainAncillary -> GenericCoordinateVariable [taillabel="                  either/or"
                                              labeldistance=1.1]

Datum -> GenericCoordinateConstruct [headlabel="0..*   "]
Datum -> GridMappingVariable [minlen=2 headlabel="0..1    "]
GridMappingVariable -> NamedFormula [minlen=2]
NamedFormula -> FormulaTerms [arrowtail=vee arrowhead=none minlen=5]
GenericCoordinateVariable -> FormulaTerms [weight=100
                         arrowtail=vee
             arrowhead=none]

CoordinateConversion -> route7 [weight=100
                    arrowhead=none
                                taillabel="either/or           "
        labeldistance=1.1]
route7 -> GridMappingVariable []
CoordinateConversion -> route8 [weight=100
                    arrowhead=none
                                taillabel="                  either/or"
        labeldistance=1.1]
route8 -> FormulaTerms []

{rank=same; CoordinateReference, DomainAncillary, DataVariable}
{rank=same; GenericCoordinateConstruct, CoordinateConversion,
      GenericCoordinateVariable}
{rank=same; Datum, GridMappingVariable, NamedFormula, FormulaTerms}
{rank=same; route7, route8}


# --------------------------------------------------------------------
# Invisible edges used to aid in layout
# --------------------------------------------------------------------
CoordinateConversion -> GenericCoordinateVariable [style=invis]
Data -> GenericCoordinateVariable [style=invis]

}
