  Consider the semialgebraic structure over the real field. More generally, let
an ominimal structure be over a real closed field. We show that a definable
metric space X with a definable metric d is embedded into a Euclidean space so
that its closure is compact and the metric on the image induced by d is
extended to a definable metric on the closure if and only if the limit of
d(r(t);r(t)) is 0 as t converges to 0 for any definable continuous curve r from
(0, 1] to X (Theorem 1). We also find two compact semialgebraic metric spaces
over the real field which are isometric but not semialgebraically isometric
(Theorem 2). A version of blow up is the key to the proof of Theorem 1. Using
it in the same way, we prove a resolution of singularities of definable sets
(Theorem 3). We prove the theorems by a constructive procedure.
