Given a surface triangulation T of and a subset X of its vertex set V (T), we define a restricted edge contraction as a contraction of an edge connecting X and V (T)−X. Boundary vertices in V (T) − X are only allowed to be contracted to the boundary vertices in X adjacent through boundary edges. In this paper, we prove that if a triangulation T of the sphere with boundary satisfies some connectivity conditions, then all the vertices in V (T) − X can be merged into X by restricted edge contractions. We also prove that the similar properties hold for a triangulation of the sphere with features.