An optimal transport path may be viewed as a geodesic in the space of probability
measures under a suitable family of metrics. This geodesic may exhibit a tree-shaped
branching structure in many applications such as trees, blood vessels, draining and
irrigation systems. Here, we extend the study of ramified optimal transportation between
probability measures from Euclidean spaces to a geodesic metric space. We investigate the
existence as well as the behavior of optimal transport paths under various properties of
the metric such as completeness, doubling, or curvature upper boundedness. We also
introduce the transport dimension of a probability measure on a complete geodesic metric
space, and show that the transport dimension of a probability measure is bounded above by
the Minkowski dimension and below by the Hausdorff dimension of the measure. Moreover, we
introduce a metric, called "the dimensional distance", on the space of probability
measures. This metric gives a geometric meaning to the transport dimension: with respect to
this metric, the transport dimension of a probability measure equals to the distance from
it to any finite atomic probability measure.