This page contains some steps/ideas about what would be necessary to do to allow openModeller to read occurrences from WFS services.
Better to do that on the library level, so that all interfaces could make use of it. In this case it would be necessary to create a new implementation of OccurrencesReader, eg. WfsOccurrences.
- For simplification, the new reader could make use of four parameters: the service end point, the identification of a specific feature type, the identification of a specific feature property and a string to be used in a simple comparison filter against that property.
- The request file for the console interface could represent these parameters as:
Species file = wfs>http://www.somehost.org/wfs/server.cgi Feature type = http://some_namespace/myfeature Feature property = xpath/to/element Species name = Furcata boliviana
Note by Tim: The above assumes the scientific name is represented as a single feature type.
The steps to be implemented in the LoadOccurrences method could include:
Send a GetCapabilities request to:
- Check that the service is online.
- Check the protocol version (see version negotiation in the specs).
- Check that the service has a simple filter comparison operator (equals/like).
- Check that the service responds in the expected output format (?).
Check that the service offers the desired feature type (look for //wfs:featureType and get its identification).
Get link related to GetFeature operation.
Send a DescribeFeatureType request (?)
- The idea would be to check that the feature type has the expected property. But this may not be necessary... and could also be complicated depending on the XML Schema construction.
Send a GetFeature request:
Look for //gml:FeatureMember, read the value of a gml:Point element inside it, and feed the occurrences property.