The ability to process geospatial data will be a great benefit for spatial data infrastructures. This requires the ability to compose data providing services with geoprocessing services. Discovering suitable geoprocessing services is a major challenge in this endeavour. Current (keyword-based) approaches to service discovery are inherently restricted by the ambiguities of natural language, which can lead to low precision and/or recall. To alleviate these problems, we propose to use an ontology-based approach to GI service discovery, which rests on two ideas. Ontologies describing geospatial operations are used to create descriptions of requirements and service capabilities; matches between these descriptions are identified based on function subtyping. We use a running example from the geospatial domain to analyse which problems can occur in existing keyword- and ontology-based approaches and how the discovery of geoprocessing services differs from other service discovery tasks. The example is also used for illustrating the prototypical implementation of the proposed approach.