9
A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control Raimo Nikkilä a,, Jens Wiebensohn b , Edward Nash b , Ilkka Seilonen a , Kari Koskinen a a Aalto University School of Electrical Engineering, Department of Automation and Systems Technology, P.O. Box 5500, 00076 Aalto, Finland b Rostock University, Faculty of Agricultural and Environmental Sciences, Chair of Geodesy and Geoinformatics, Justus-von-Liebig-Weg 6, 18059 Rostock, Germany article info Article history: Received 26 May 2011 Received in revised form 11 October 2011 Accepted 16 October 2011 Keywords: FMIS Compliance control Production standard Service oriented architecture REST abstract Modern agricultural production is governed by a variety of production standards that restrict and guide farming practices. Controlling the compliance of farms to these standards is currently a considerable and expensive manual effort for several stakeholders of agriculture; an effort that could be alleviated with suitable information technology. This article identifies the requirements and proposes a design for a service infrastructure that transfers the production standards in a computer encoded and machine interpretable format between the stake- holders of modern agricultural production. These encoded production standards can then have an imme- diate benefit for farmers and providers of Farm Management Information Systems (FMIS), ultimately enabling automated compliance control with existing farm data. The functionality of the infrastructure is demonstrated with a precision fertilisation case, where compliance to several fertilisation restrictions is controlled and confirmed automatically. The proposed REST-based service infrastructure was found sufficient in fulfilling the identified require- ments. Automated compliance control for a fair proportion of production standards, despite several tech- nical challenges, can be reasonably achieved with existing technologies as a lightweight infrastructure of REST-based Web services. Ó 2011 Elsevier B.V. All rights reserved. 1. Introduction Agricultural production standards, e.g. the European cross com- pliance, are an effort to protect the environment from agricultural activities (Louwagie et al., 2011). The European cross compliance imposes restrictions on farming practices and ties the payout of vi- tal farming subsidies to adherence of these restrictions, thus cross compliance carries considerable financial consequences for farm- ers (de Graaff et al., 2011). The European cross compliance is also the most widely studied of the many production standards and has been found to have a positive environmental impact on nitro- gen fluxes (Follador et al., 2011), however, the policy has been met with a degree of rejection by several farmers (Davies and Hodge, 2006). Currently, controlling and monitoring cross compliance alone is estimated to require more than two days worth of admin- istrative work for each individual farm being monitored (Varela- Ortega and Calatrava, 2004). Considering the over 10 million farms in Europe (European Union, 2011), controlling compliance to all production standards amounts to a substantial and expensive manual effort. This is in addition to the work imposed on farmers to demonstrate their compliance in the form of collecting docu- mentation and otherwise assisting in the controlling process. Implementation of compliance control involves several stake- holders of modern agriculture and in practice, consists of printed manuals, printed checklists and manual labour. This article consid- ers compliance control as a challenge of information technology. With the emerging precision, or information intensive agriculture, large quantities of data on farming activities become available that can be used as input for automated compliance control. Agricul- tural production standards already have a part in FMIS (Farm Man- agement Information Systems), albeit as hard-coded values, supporting other FMIS features such as operational planning. This hard-coding is unsuitable considering the dynamic nature of agri- cultural production standards, i.e. revisions are published every now and then that supercede previous standards. However, infor- mation technology could be used to better distribute and present these production standards to farmers and beyond replacing the hard-coded limits in FMIS, ultimately used to automate parts of the compliance control process. The potential of this scheme is recognised by Nash et al. (2011), who also extensively cover the criteria and limitations of any encoding of production standards. Furthermore, agricultural production standards already affect existing information systems, such as systems for decision support, 0168-1699/$ - see front matter Ó 2011 Elsevier B.V. All rights reserved. doi:10.1016/j.compag.2011.10.011 Corresponding author. Tel.: +358 9 451 26267; fax: +358 9 451 5394. E-mail addresses: [email protected].fi (R. Nikkilä), jens.wiebensohn@uni-rostock. de (J. Wiebensohn), [email protected] (E. Nash), ilkka.seilonen@hut.fi (I. Seilonen), kari.o. koskinen@hut.fi (K. Koskinen). Computers and Electronics in Agriculture 80 (2012) 80–88 Contents lists available at SciVerse ScienceDirect Computers and Electronics in Agriculture journal homepage: www.elsevier.com/locate/compag

A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

Embed Size (px)

Citation preview

Page 1: A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

Computers and Electronics in Agriculture 80 (2012) 80–88

Contents lists available at SciVerse ScienceDirect

Computers and Electronics in Agriculture

journal homepage: www.elsevier .com/locate /compag

A service infrastructure for the representation, discovery, distribution andevaluation of agricultural production standards for automated compliance control

Raimo Nikkilä a,⇑, Jens Wiebensohn b, Edward Nash b, Ilkka Seilonen a, Kari Koskinen a

a Aalto University School of Electrical Engineering, Department of Automation and Systems Technology, P.O. Box 5500, 00076 Aalto, Finlandb Rostock University, Faculty of Agricultural and Environmental Sciences, Chair of Geodesy and Geoinformatics, Justus-von-Liebig-Weg 6, 18059 Rostock, Germany

a r t i c l e i n f o a b s t r a c t

Article history:Received 26 May 2011Received in revised form 11 October 2011Accepted 16 October 2011

Keywords:FMISCompliance controlProduction standardService oriented architectureREST

0168-1699/$ - see front matter � 2011 Elsevier B.V. Adoi:10.1016/j.compag.2011.10.011

⇑ Corresponding author. Tel.: +358 9 451 26267; faE-mail addresses: [email protected] (R. Nikkilä), je

de (J. Wiebensohn), [email protected] (E. Nash), ilkkakari.o. [email protected] (K. Koskinen).

Modern agricultural production is governed by a variety of production standards that restrict and guidefarming practices. Controlling the compliance of farms to these standards is currently a considerable andexpensive manual effort for several stakeholders of agriculture; an effort that could be alleviated withsuitable information technology.

This article identifies the requirements and proposes a design for a service infrastructure that transfersthe production standards in a computer encoded and machine interpretable format between the stake-holders of modern agricultural production. These encoded production standards can then have an imme-diate benefit for farmers and providers of Farm Management Information Systems (FMIS), ultimatelyenabling automated compliance control with existing farm data. The functionality of the infrastructureis demonstrated with a precision fertilisation case, where compliance to several fertilisation restrictionsis controlled and confirmed automatically.

The proposed REST-based service infrastructure was found sufficient in fulfilling the identified require-ments. Automated compliance control for a fair proportion of production standards, despite several tech-nical challenges, can be reasonably achieved with existing technologies as a lightweight infrastructure ofREST-based Web services.

� 2011 Elsevier B.V. All rights reserved.

1. Introduction

Agricultural production standards, e.g. the European cross com-pliance, are an effort to protect the environment from agriculturalactivities (Louwagie et al., 2011). The European cross complianceimposes restrictions on farming practices and ties the payout of vi-tal farming subsidies to adherence of these restrictions, thus crosscompliance carries considerable financial consequences for farm-ers (de Graaff et al., 2011). The European cross compliance is alsothe most widely studied of the many production standards andhas been found to have a positive environmental impact on nitro-gen fluxes (Follador et al., 2011), however, the policy has been metwith a degree of rejection by several farmers (Davies and Hodge,2006). Currently, controlling and monitoring cross compliancealone is estimated to require more than two days worth of admin-istrative work for each individual farm being monitored (Varela-Ortega and Calatrava, 2004). Considering the over 10 million farmsin Europe (European Union, 2011), controlling compliance to allproduction standards amounts to a substantial and expensive

ll rights reserved.

x: +358 9 451 5394.ns.wiebensohn@uni-rostock.

[email protected] (I. Seilonen),

manual effort. This is in addition to the work imposed on farmersto demonstrate their compliance in the form of collecting docu-mentation and otherwise assisting in the controlling process.

Implementation of compliance control involves several stake-holders of modern agriculture and in practice, consists of printedmanuals, printed checklists and manual labour. This article consid-ers compliance control as a challenge of information technology.With the emerging precision, or information intensive agriculture,large quantities of data on farming activities become available thatcan be used as input for automated compliance control. Agricul-tural production standards already have a part in FMIS (Farm Man-agement Information Systems), albeit as hard-coded values,supporting other FMIS features such as operational planning. Thishard-coding is unsuitable considering the dynamic nature of agri-cultural production standards, i.e. revisions are published everynow and then that supercede previous standards. However, infor-mation technology could be used to better distribute and presentthese production standards to farmers and beyond replacing thehard-coded limits in FMIS, ultimately used to automate parts ofthe compliance control process. The potential of this scheme isrecognised by Nash et al. (2011), who also extensively cover thecriteria and limitations of any encoding of production standards.Furthermore, agricultural production standards already affectexisting information systems, such as systems for decision support,

Page 2: A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

R. Nikkilä et al. / Computers and Electronics in Agriculture 80 (2012) 80–88 81

production optimisation or operational planning. Thus, having theencoded content of the production standards readily availablewould have potential benefits for all these systems. The handlingof agricultural production standards also requires great flexibilityin the globalising economy, as agricultural products can be soldto international markets where these production standards can dif-fer. Moreover, when different production standards affect separatefields, farmers are forced to mind and adhere to several, possiblymutually contradicting production standards at the same time.

1.1. Research objectives

Automated compliance control is a complex problem that af-fects several stakeholders of modern agriculture. Proper automa-tion requires technical solutions to cover the long, and currentlylargely manual, workflow of compliance control. Thus, elementsrequired to cover the workflow, and hence also the research objec-tives, can be summarised as follows: A computer readable encod-ing for agricultural production standards; discovery anddistribution of these to FMIS through a Web service infrastructure;and automated compliance control by evaluating the encoded pro-duction standards and farm data. Certain availability of farm datais assumed to precede the workflow of automated compliance con-trol and this data is further assumed to reside within, or be acces-sible to, the FMIS. The acquisition of this data is beyond the scopeof this article, though the majority of the relevant data is recordedduring normal farming operations by mobile farm equipment(Steinberger et al., 2009).

This article presents a design for a service infrastructure thatachieves these objectives, by fulfilling the requirements of theassociated stakeholders of modern agricultural production. Thisinfrastructure is then evaluated with the workflow of a precisionfertilisation case, where compliance control is performed both be-fore and after a precise fertilisation operation.

2. Related research

Little research exists for automating compliance control or theformal representation of agricultural production standards. How-ever, compliance control and its socioeconomic effects on farmersas well as its effectiveness in environmental protection has beenwidely studied. Parallels of the research problem can also be foundin other fields of research where similar rules are encoded, distrib-uted or utilised (Gordon et al., 2009; Gao et al., 2008; Marqueset al., 2001). In particular, logical rules and their practical limitshave been widely studied in computer science, though the expres-sion and evaluation of rules with spatial elements is still an activearea of research.

The complexity, cost and considerable manual labour of compli-ance control for the European cross compliance has been estab-lished in research (Varela-Ortega and Calatrava, 2004). Since non-compliance carries a considerable economic penalty, the controlsystems have to be implemented with great care (Davies and Hodge,2006). Moreover, it would be naïve to assume that subjects of com-pliance control would actively promote their own non-compliance.

Automated compliance control was directly addressed in the EUproject FutureFarm1 (2008–2011) whereon this article is based. Theproject studied the requirements and benefits of automated compli-ance control, and produced several technical documents that speci-fied the encoding of agricultural production standards, data accessand service interfaces. Additionally, a service was designed andimplemented that handled the actual evaluation of compliance.Use of these services was demonstrated by two project partners at

1 http://www.futurefarm.eu.

the GeoFarmatics 2010 conference in Cologne, Germany. Some ofthese results have been published beyond the project deliverablesand are summarised in Sørensen et al. (2010a), Nash et al. (2011)and Sørensen et al. (2011). Another EU project, cross complianceassessment tool (CCAT) (Elbersen et al., 2010), produced a tool forassessing the effects of cross compliance (Bouma et al., 2010). Thistool is used to assess the costs and effects of cross compliance butthe process of compliance control itself was not addressed.

Compliance control inherently affects the FMIS, which is thecentral system in the process. This imposes certain functionalrequirements on the FMIS; a conceptual model of a modern FMISmarkedly suitable for automated compliance control is given bySørensen et al. (2010a). Future FMIS are also expected to utilisethe Internet, either in the form of a Web application or as a collec-tion of Web services (Murakami et al., 2007, 2010,). Many of thelong-term goals of production standards and compliance control,e.g. sustainability or ecology, are in line with those of precisionagriculture (McBratney et al., 2005). Precision agriculture is alsoan important factor for most applications of automated compliancecontrol, as the spatial data collected during field operations is oftenessential for determining compliance. Several information flowswithin the FMIS are also involved as data must be collected frommobile farm equipment, as well as from various Web services.

Automated compliance control requires agricultural productionstandards computer encoded as logical rules. While logical ruleshave been widely studied, interchangeable rule formats (Boleyet al., 2007) are still being developed. Likewise, spatial reasoningfor semantic Web (Hoekstra et al., 2009) is still an active field of re-search. Computer encoded rules and rule interchange have yet hadlittle applications in agriculture, though they have been applied forintegrating business processes by Milanovic et al. (2007) and in thelegal domain by Gordon et al. (2009).

3. Requirements of the infrastructure

To achieve the research objectives stated in Section 1.1, a tech-nical service infrastructure is required. The requirements of thisinfrastructure must be derived from the interests and require-ments of the identified stakeholders for the infrastructure. Theserequirements are then the foundation for the requirements of theindividual components of the infrastructure. In addition to therequirements from the stakeholders, the infrastructure has the im-plicit technical requirements of effective information interchange,openness and overall simplicity of design. Though implicit, theserequirements can with reason be considered fundamental to mod-ern information systems of quality.

3.1. Stakeholders

For compliance control, the list of stakeholders with directinterests or concerns is similar, though slightly shorter than thatof a complete FMIS (Nikkilä et al., 2010). The foremost stakeholdersare the farmers tasked with demonstrating compliance and stan-dards publishers who also control compliance. Additional stake-holders arise from the need to set up and maintain theinfrastructure as well as the need to interface with the infrastruc-ture through FMIS. Tertiary stakeholders, though not consideredhere, would cover those with an indirect interest in compliancecontrol; such as the general public who desire safe agriculturalproducts and ultimately pay the costs of compliance controlthrough taxes and prices of agricultural products.

3.1.1. FarmersFarmer are concerned with demonstrating compliance to sev-

eral different production standards. For this, farmers are required

Page 3: A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

82 R. Nikkilä et al. / Computers and Electronics in Agriculture 80 (2012) 80–88

to know the content of the production standards and then evaluatethese standards against farm data. Due to the increasing diversityof agricultural production, farmers require means to manage sev-eral production standards and know of any revisions to thesestandards.

3.1.2. Standard publishersStandards publishers include all stakeholders who publish agri-

cultural production standards and expect the farmers’ complianceto these standards. These stakeholders, who also include legalauthorities, are concerned with controlling compliance. For this,the standard publishers must make their encoded standards avail-able and receive a credible assurance of compliance.

3.1.3. Providers of the infrastructureProviders of the infrastructure are the future stakeholders

tasked with creating and maintaining the infrastructure, thoughthis work is largely administrative and similar to the administra-tion of most information systems. In practice, this stakeholdercould be a role for the existing providers of FMIS.

3.1.4. Providers of FMISProviders of FMIS software must integrate their systems to the

infrastructure. This is a non-trivial task since the majority of essen-tial data is assumed to reside within the FMIS. Considerableamounts of data export and general data integration are required,in addition to implementing client software for the services of theinfrastructure.

With these stakeholders, three distinct utilisations can be iden-tified for the encoded production standards and automated com-pliance control. The first utilisation is displaying or presentingthese standards and their relevant parts to the farmer, which isconvenient over having to find and collect the printed standardsor corresponding files from the Internet. The second is using theencoded values within the standards dynamically in FMIS, ratherthan hard-coding them and forcing software updates wheneversome production standard is changed. Having these values readilyavailable in the FMIS has direct benefits for several unrelated appli-cations, such as decision support systems or operational planning.The third utilisation, and also the most ambitious of the three, isautomated compliance control which aims to greatly reduce themanual workload for all stakeholders. These utilisations are nowused to derive the requirements for the individual components ofthe infrastructure. The general structure of the infrastructure isthe division to the formal representation of agricultural productionstandards, the discovery and distribution of these standards and fi-nally, a service for performing automated compliance control.

3.2. Representation

Before agricultural production standards can be transferred be-tween systems, they have to be encoded in some machine readableformat. This encoding must consists of two parts; a description ofthe standard itself and the logical rules encoding the standardproper. The description of the standard is mostly ordinary values,e.g. dates, references and strings describing the standard itselfand its applicability. However, the encoded rules of a standard re-quire some interchangeable logical rule representation sufficientfor rules common in agricultural production standards. Addition-ally, the encoded standards and rules should still contain the fullnatural language description of the standard for purposes otherthan automated compliance control, e.g. manual viewing by thefarmer.

Existing and mainly national encodings of agricultural data,such as the German AgroXML; Dutch EDI-teelt; French eDaplosor the American AgXML, have little to offer in terms of encoding

production rules. Thus, while existing formats should be preferred,no existing format is currently sufficient for the formal representa-tion of agricultural production standards. The description part ofthe standard is relatively simple and feasible to implement. Therules, on the other hand, are more problematic due to the difficultyof properly describing logical rules in an interchangeable format.Thus, for rules some existing format should be used, either as isor with extensions.

The technically difficult element is the encoding of the rules.Agricultural production rules inherently contain spatial elements,therefore the rule representation must support spatial informationand spatial relationships. Regardless of the rule representationused, however, it is impossible to encode or even attempt encodingan entire production standard (Nash et al., 2011). This is due tosome rules being intentionally abstract as ‘‘do not pollute theground water’’, which makes these rules an impossible subjectfor any automated compliance control as assessing them requireshuman judgement. Furthermore, in several interpretations rulesshould be considered as ‘guidance’ rather than as mechanical gov-ernance, this fact has been well-established in the legal domain(Gardner, 1987).

3.3. Discovery

Once the production standards have been encoded, they mustbe made available to other stakeholders. Assuming that the stan-dards are distributed through a series of Web services, the ad-dresses of these services must be known to other stakeholders.Since these Web services are not particularly static, i.e. new ser-vices can be added and old ones removed or updated to new ad-dresses, some basic means of service discovery are required. Thisservice discovery should also be possible with a minimum of initialinformation.

While discovery could easily be incorporated with rule distribu-tion into a single service, it is intentionally kept as a separate ser-vice. This is due to production standards being produced bycompeting parties or companies of whom eager co-operationshould not be expected. Moreover, a separate light service discov-ery enables the discovery services to be conveniently run by thirdparties if necessary. Additionally, agriculture has some specialrequirements for spatially filtering the results of service discovery,since agriculture and agricultural legislation is considerably local-ised by region. Thus, service discovery should support filteringbased on countries and geographical or jurisdictional areas. Thisimplies that production standards can be found based on a spatialquery for an area of interest in addition to searches on other prop-erties of production standards.

3.4. Distribution

Ideally, every producer of agricultural production standardswould have a service that distributes the encoded standards. Thesedistribution services should be independent, in the sense that theyrequire no knowledge of other distribution services and containthe entire production standards without references to external re-sources. Thus, knowing the address of the distribution service al-lows the farmer or an FMIS to obtain the standards of interestdirectly. These standards should be provided on several levels ofdetail; spanning from the entire standard to individual rules. Addi-tionally, individual rules should be referenceable and obtainabletrough the distribution service. As with discovery, there shouldbe a resource for searching the stored standards for a set of criteria.One criterion is the spatial search for selecting all standards thataffect a certain geographical or jurisdictional area.

Page 4: A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

R. Nikkilä et al. / Computers and Electronics in Agriculture 80 (2012) 80–88 83

3.5. Utilisation and automated evaluation

Once the standards have been transferred to farmers or theirFMIS, they can be utilised in a variety of ways. These utilisationsare those described in Section 3.1, of which the displaying orbrowsing of standards would not require any encoding of the stan-dard as logical rules. Likewise, using the encoded standards only toreplace hard-coded values in FMIS is just information transfer andfile processing. These first two utilisations, though immediatelyapplicable and useful in practice, lack novelty and technical chal-lenge. On the other hand, automated compliance control is techni-cally difficult and has an array of additional requirements.

Regardless of how automated compliance control is eventuallyimplemented, i.e. as an external service or an internal FMIS mod-ule, vast quantities of diverse data have to be collected from vari-ous sources by the FMIS. This data consists of data collected duringfarm operations, spatial regional data and other data e.g. on farmimplements, stored on the FMIS. Most of this data is spatial, insome GIS (geographic information system) format, and all of thedata should be integrated to at least some degree for any practicaleffect of automated compliance control. Due to the diversity of allthis data, the complexity of data integration should not be under-estimated (Lunetta et al., 1991). Since data integration in modernagriculture alone would be a topic worthy of extensive research,a degree of data integration sufficient to demonstrate automatedcompliance control should be considered adequate. The reliabilityof data, and particularly data originating from the farm is identifiedas a potential issue (Davies and Hodge, 2006), though data reliabil-ity is not within the scope of this article. However, some manner ofdata control is required so as to avoid missing or otherwise lackingdata from yielding false positive or false negative results.

4. Design of the infrastructure

The overall design of the infrastructure is governed by contem-porary de facto design standards and best practices. That is, theinfrastructure is a series of Web services that uses the now ubiqui-tous XML serialisation for all information and data transfer. This isa versatile combination favoured by the majority of all new sys-tems and also widely supported by existing tools and software li-braries. However, it should be noted that both web services andXML data representation are actually abstract concepts. Web ser-vices can be designed in a variety of different ways and XML datarepresentation is only meaningful through the used XML schema.

The infrastructure presented in this article is based on REST(Representational state transfer) by Fielding (2000). The choice ofusing REST, over the abundant and more complicated WS-⁄ family

Fig. 1. Logical REST structure

of standards, is the inherent simplicity and potent functionality ofREST services and their interfaces. This article provides an over-view of the entire infrastructure and several technical details, suchas the XML schemata used for communicating with the services,are intentionally omitted. The full technical description of theinfrastructure is available in the form of Futurefarm project delive-rables, in particular the documents D4.1.1, D4.1.2, D4.2 and D4.3.

While XML is used for all information transfer, various XMLschemata, both new and existing, are deployed. Some of the moresimple schemata have to be developed exclusively for the infra-structure, the most complicated of these being the encoding ofagricultural production standards. Others are for communicationwith the REST services, for situations where a REST operation re-quires additional input or produces complex output. Existing sche-mata are preferred for well-established data, such as spatial dataand the encoding for the rules of the production standards.

4.1. Representation

In the lack of any existing schemata or formats for representingagricultural production standards, a schema had to be devised.Similar rule interchange has been used in other fields of research,e.g. by Milanovic et al. (2007) in business processes and by Gordonet al. (2009) in the legal domain. The XML schema for the agricul-tural production standards, which covers the meta-information ofthe standard as well as encodes the standard as a set of rules, wasdesigned and defined in the FutureFarm project. The details, poten-tial and restrictions of this encoding are out of scope for this articleand are covered thoroughly by Nash et al. (2011).

The actual encoding of the rules is based on an extended formatof the rule interchange format (RIF) (Boley et al., 2007). Since na-tive RIF does not support any of the required spatial features, a dia-lect independent extension to RIF was devised and promptlynamed GeoRIF. GeoRIF introduces spatial predicates and functionsto RIF and allows GML2 (geography markup language, by OpenGISet al., 2001) elements as spatial literals within the RIF XML format.An example of the GeoRIF rule format is given in Section 5 of thisarticle.

The terms and concepts used in the encoded rules are those ofAGROVOC (Nations, 2005). However, though extensive, AGROVOClacks terms for many of the necessary spatial relationships.Therefore, a conceptual geovoc vocabulary had to be used to fillthese spatial gaps in AGROVOC. While these concepts could alsobe implemented using ontologies, e.g. OWL (Web ontology lan-guage), the lighter vocabularies were preferred partly because ofthe availability of AGROVOC.

of the catalogue service.

Page 5: A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

Fig. 2. Logical REST structure of the rule service.

Fig. 3. Logical REST structure of the evaluation service.

Fig. 4. Structure of the evaluation request service message.

84 R. Nikkilä et al. / Computers and Electronics in Agriculture 80 (2012) 80–88

4.2. Discovery

To fulfill the requirements for discovering the agricultural pro-duction standards, a catalogue service was designed. This cata-logue service is literally a catalogue of known distributionservices and other catalogue services. The information stored inthe catalogue service is minimal, consisting mostly of contactinformation for other services. The search resources, i.e. searchServ-ers and searchCatalogues, both support spatial filtering for theirresults.

Fig. 1 shows the logical structure of the catalogue service. Theresource hierarchy is shown in grey from left to right and for eachresource the available REST operations, i.e. GET, PUT, POST and DE-LETE, are shown in white. Brackets indicate resource identificationcodes within the hierarchy and all resources are available withoutuser authentication. However, operations that change the state ofthe service, i.e. PUT and DELETE, are privileged and require HTTPauthentication from the client.

4.3. Distribution

The requirements for distributing production standards are ful-filled by a rule service. This rule service is similar to the catalogueservice, though with the exceptions that it contains the actual en-coded production standards and contains no links or dependanciesto external systems. The rule service provides access to the produc-tion standards, up to the detail of addressing individual encodedrules of any standard and can also be queried periodically to iden-tify any updates to these production standards. Fig. 2 shows thelogical structure of the rule service in the same notation used forthe catalogue service.

4.4. Utilisation and automated evaluation

Technically, the most challenging element of the whole infra-structure is automated compliance control. The other recognisedutilisations, i.e. the viewing of the standards and using the encodedstandards to replace hard-coded constants within FMIS, are bothrelatively common features in modern information systems. Auto-mated compliance control, on the other hand, is essentially spatialinference with interchangeable rules and heterogenous data. Whilesystems for spatial inference have been proposed before, such asspatial YAP (Vaz et al., 2007), none properly support an inter-changeable rule format. This, in addition to the integration of spa-tial data from several unrelated sources, is a problem that requirescertain design decisions and assumptions in order to achieve anypractical level of functionality.

An assumption was made that all agricultural data can be seria-lised to an XML format, one such format is AgroXML (Kunisch et al.,2007). This assumption, together with assuming all spatial data inthe GML2 format and the encoded agricultural production stan-dards, enables automated inference. To ease data integration priorto automated compliance control, the Web service that providesevaluation of compliance also provides a service that can determine

the data requirements of a given rule. These requirements are thengiven to the client, e.g. a module within the FMIS, to fulfill as knowl-edge-level concepts, though including complete XPath queries tothe AgroXML schema for practical purposes. For automated compli-ance control proper, the evaluation Web-service implements a na-tive spatial GeoRIF interpreter that is capable of inferring theboolean result (compliance or lack of thereof) of a rule with the pro-vided data. In addition, the service is capable of identifying resultsaffected by missing data and label these as indeterminate results.

Fig. 3 shows the logical structure of the evaluation service forcompleteness. The service interface consists of only two resources,one for identifying the necessary data for evaluation and other forthe actual evaluation. Both of these resources, however, are some-what complicated, producing and requiring additional informationin the POST operation. An example of this is shown in Fig. 4, whichillustrates the XML structure of an evaluation request.

Data in the request is tagged for particular rules and contains aknowledge-level identification in the re:Concept element. The datacontent can vary from individual values to large XML structures,such as fertiliser application maps in GML2. While each data entrycomes with just one content element, this content is not necessar-ily atomic. An example of non-atomic data would be a spatial dataentry on waterbodies, such as is required by the example rule gi-ven in Section 5. The single data entry actually consists of severalindividual waterbody geometries, which are then separated by

Page 6: A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

Fig. 5. Illustration of the complete infrastructure.

R. Nikkilä et al. / Computers and Electronics in Agriculture 80 (2012) 80–88 85

the evaluation service and internally renamed if necessary. Therules, i.e. parts of production standards, sent for evaluation arecontained in the rif:sentence elements as RIF or GeoRIF in their na-tive XML formats. Replies of the evaluation service contain the ruleidentifiers with the result of the evaluation, i.e. true, false or inde-terminate, and in an extended output mode the MGU (most gen-eral unifier) or full evaluation history is included.

4.5. Complete infrastructure

Fig. 5 shows a summary of the infrastructure. The new servicesintroduced in this article are clustered to the right and correspondto the three fundamental operations of discovery, distribution andautomated compliance control. New functionality on the FMIS iscollectively the ‘‘Compliance control module’’, which is responsiblefor interacting with the services of the infrastructure and all datasources. This module also provides interfaces for the farmer andother FMIS components.

The identified data sources involved in the process of compli-ance control are also shown. These data sources are the local FMISdatabase which provides information on the farm activities in bothspatial (GML2 serialised) and non-spatial (AgroXML serialised) for-mats. External spatial databases provide spatial information, whichis essential for many rules which depend on the geographic fea-tures surrounding the farm, In addition, necessary data not storedon the FMIS, e.g. data concerning seeds or farming equipment, canbe obtained from the databases of other stakeholders through thenormal FMIS service connections (Nikkilä et al., 2010).

5. Case: The FutureFarm scenario

To demonstrate the effectiveness of the proposed infrastructure,a precision fertilisation case, also described by Sørensen et al.,2010b, was devised. The case is intended to demonstrate the work-flow of automated compliance control with a prototype implemen-tation of the infrastructure. For this purpose, the REST servicesspecified in Section 4 were implemented using the Ruby program-ing language (Flanagan and Matsumoto, 2008) and the Ramaze2

open-source Web application framework. The schema for encodingthe agricultural production standards was then used to encode parts

2 http://ramaze.net/.

of the German agricultural production standard Düngeverordnung,which regulates the use of fertilisers in arable farming.

The precision fertilisation case is a good all-around example ofprecision agriculture in general. It requires timing and planning,input and output of spatial data, and fertilisation in particular, isheavily restricted by legislation which makes it a suitable casefor automated compliance control. In addition, the fertilisationoperation can be subjected to automated compliance controltwice; before the operation for the operational plan and after theoperation for the operation document. For this purpose, the oper-ation plan and document are required in GML2 format for the eval-uation service. Listing 1 shows one agricultural production rule inGeoRIF presentation syntax. The rule is a part of the German Düng-everordnung and a practical example of one rule of an encodedagricultural production standard. This particular rule restricts fer-tilisation near water bodies and sloping areas near water bodies,but grants wider margins if special application devices are used.In addition to this somewhat complicated rule, a few simple ruleswere also encoded, e.g. a rule restricting the application of any fer-tiliser to certain times of year. Since the encoding of rules is some-what strenous manual work, these rules put together onlyconstitute a small portion of the entire production standard.

5.1. Workflow

The workflow of the case described in Section 4.5 is intended tocover the entire infrastructure, starting with the minimum of ini-tial information, i.e. the address of one catalogue service and theaddress of an evaluation service. This workflow is illustrated inFig. 6, starting from the top of the diagram and advancing throughthe four stages of a field operation as presented by Sørensen et al.(2010b). The workflow itself is described from the viewpoint of theFMIS compliance control module and is considered to be guided bythe farmer through a graphical user interface.

First, the known catalogue service must be contacted and que-ried. The catalogue service can be queried for additional catalogueservices, if necessary, or directly for the rule services. The chosenrule services are then queried for encoded production standards,either in full or as headers for browsing and selection.

Once the production standards of interest have been obtained,any of the three identified utilisations are now possible. Proceedingwith automated compliance control, the data identification func-tionality of the evaluation service must be queried with the chosen

Page 7: A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

Listing 1. The fertilisation rule in GeoRIF presentation syntax.

Fig. 6. Complete workflow of the case as a sequence diagram.

86 R. Nikkilä et al. / Computers and Electronics in Agriculture 80 (2012) 80–88

rules of the production standards. This establishes data require-ments as knowledge-level concepts and as practical XPath queriesto AgroXML for the FMIS.

The FMIS must then collect or produce all the necessary datafrom internal and external sources. For the part of the case preced-ing the field operation, the primary constituent of this data is theoperational plan in GML2 format. The operational plan and therules, used previously in the data requirements identification,can then be transferred to the evalution service for compliancecontrol. Compliance is the lack of any violations of the given ruleswithout any issues of missing or incomplete data indicated by theservice. Once the field operation has been completed, the operationdocument can be subjected to compliance control with the same ora different ruleset. The results of compliance control should thenbe presented to the user, though with the prototype implementa-tion this presentation is restricted to the boolean outcome of theevaluation or an indeterminate result indicating lack of data.

5.2. Results

Using data collected during a precise fertilisation operation inFinland, the workflow was completed successfully and automatedcompliance control was performed both before and after the fieldoperation. Although, due to project specific reasons the rules wereencoded from the German Düngeverordnung, they could easily beused with the finnish data as none of the rules relied on absolutegeographic coordinates. The use of foreign production standardsmight actually be a case for future agriculture, where produce issold internationally and must therefore comply to foreign produc-tion standards. Rule services were located, the encoded productionstandards were obtained and compliance was properly identifiedfor all chosen rules with the previous data. The evaluation servicealone was then tested for the identification of non-compliance.

Since actual data for non-compliant field operations is very dif-ficult to obtain, the non-compliant data was generated for testingpurposes. This data described the application of copious amountsof fertiliser to a park designated a nature protection area, near sev-eral water bodies and at a time of year when the application of anyfertiliser would be forbidden. This test case intentionally violatesrules that have spatial, temporal and quantitative restrictions.The evaluation service was able to identify and label all of theseviolations. However, identifying the exact cause of non-compliancewas somewhat involved as the evaluation service currently onlyprovides the MGU for the violated rule. The MGU provides a logicallink between the data and rules but does not directly indicate why

a particular rule was violated, save for particularly simple ruleswhich can only fail for a singular reason.

6. Conclusions

The developed infrastructure proved sufficient in fulfilling therequirements set forth in Section 3. Although certain assumptionshad to be made, particularly strongly concerning agricultural databeing available in common interchangeable and well-defined for-mats, automated compliance control was achieved. Thus, parts ofexisting agricultural production standards can be encoded in a for-mal representation and existing farm data can be used to verifycompliance. While practical automated compliance control in agri-culture may still be several years from becoming reality, the neces-sary infrastructure could be built gradually for more immediatebenefits. The mandatory data integration involved in the process

Page 8: A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

R. Nikkilä et al. / Computers and Electronics in Agriculture 80 (2012) 80–88 87

could also benefit other, unrelated, information intensive applica-tions in agriculture.

Experiences with REST, as the technology for developing theservices, were uniformly positive. With REST, it was possible to de-sign intuitive and elegant interfaces that the FMIS could easily con-nect to. Though simple, no compromises had to be made because ofthe limitations of REST. Thus, REST can be recommended as a tech-nology suitable for the development of future Web services inagriculture.

6.1. Discussion

Present agricultural production standards are somewhat vaguein their wording. For objectives such as ‘‘do not harm the nature’’,this is perfectly understandable as the rule must be sufficiently ab-stract to cover unforeseen situations. These are also the rules forwhich automated control of evaluation should not even be at-tempted. However, for more concrete issues, such as restrictionson fertiliser amounts or protection zones, the production standardsshould be unambigious and clear. Unfortunately, this is rarely thecase. The encoding of these ‘‘exact’’ parts of production rules couldbe hoped to inspire less vague production rules in general. Theserules would be far more suitable for encoding and, moreover, theywould be easier for everyone without a considerable bureucracticbackground to understand.

The role of spatial data in agricultural can only be expected toincrease. Though a necessary element in precision agriculture,the adoption of precision agriculture is not the primary driver forthis increase. Instead, it is the new farm implements and tractorsthat progressively more support the collection of spatial data. Thus,future FMIS will have to store and manage this data which enablesnew technical solutions for agriculture, including the possibility ofautomated compliance control. Unfortunately, the data formatscurrently produced by tractors and other devices are mostly pro-prietary, requiring advanced data transformations from the FMISor reducing the FMIS to a binary data storage and delegating theproblem elsewhere. A common data format, e.g. GML2 with gener-ally agreed terms, for this spatial data, would considerably advanceany present and future applications for the collected data.

Though developed for the practical necessity of an inter-changeable spatial rule format, GeoRIF could easily have applica-tions beyond the representation of agricultural production rules.Since GeoRIF was intentionally kept as compatible with RIF aspossible, it is independent of the used RIF dialect and does not af-fect the theoretical restrictions or capabilities of RIF in any way.The new features introduced in GeoRIF are ordinary predicatesand functions that operate natively on spatial data. In fact, themost significant incompatibility between RIF and GeoRIF is theuse of GML2 literals in GeoRIF as foreign XML elements are for-bidden in plain RIF.

3 http://www.agrixchange.eu/.

6.2. Further research and work

Spatial rules and spatial inference are still relatively youngfields. Though spatial rules are special only in the data and opera-tions they use, the size of spatial data does create certain practicalissues. From a strictly computational perspective, spatial rules areidentical to any other logical rules with the exception that theatomic operations on spatial data are usually computationallyexpensive. The creation of these spatial rules from a natural lan-guage source is largely manual labour with few or no tools to helpin the process. Additionally, this encoding of a natural languagespatial rule is usually very much non-trivial; assuring that the en-coded rule corresponds to the written one, currently requires con-siderable expertise.

The lack of proper standardised concepts, vocabularies andontologies continues to pose problems for knowledge manage-ment. The representation and transfer of these concepts is vital,yet transformations and interpretations concerning these elementsis difficult. Therefore some standardised set of concepts would berequired for agriculture. This is in addition to standardised datainterchange formats, as the problem of data integration still per-sists. Data integration in agriculture is an active field of researchthat has already been addressed in several research projects, whatis more, some research projects such as agriXchange3 focus solelyon the problem of data integration. Data integration is also a prob-lem that cannot be solved by research alone, instead co-operationbetween stakeholders, manufacturers and academia is required be-fore a proper and effective standardisation body can be formed. Hav-ing one or even just a few well-supported formats for all agriculturaldata seems utopic on a large scale. Even though AgroXML was pre-ferred for practical reasons, choosing just one format over all othersis too restrictive and likely to hinder the adoption of any new sys-tem. Thus, data transformations and data integration through vari-ous technologies, requires further work and can be expected toremain in agriculture for the foreseeable future.

Acknowledgements

The research for this article was done in the European Future-Farm Project, which received funding from the European Commu-nity’s Seventh Framework Programme (FP7/2007-2013) underGrant agreement No. 212117.

References

Boley, H., Kifer, M., Pätranjan, P.-L., Polleres, A., 2007. Rule interchange on the web.In: Antoniou, G., Aßmann, U., Baroglio, C., Decker, S., Henze, N., Patranjan, P.L.,Tolksdorf, R. (Eds.), Reasoning Web. Vol. 4636 of Lecture Notes in ComputerScience. Springer, Berlin/Heidelberg, pp. 269–309.

Bouma, F., Elbersen, B., Lankhorst, J.R.-K., Staritsky, I., 2010. Technical descriptionof final ccat tool. Tech. rep., The Cross Compliance Assessment Tool project.Available from: <http://www.ccat.wur.nl/NR/rdonlyres/14A64131-DD4E-46FD-953E-986DDDB2AEC1/113172/D5_TechnicalDescriptionCCATFinalToolFINAL1.pdf>.

Davies, B.B., Hodge, I., 2006. Farmers’ preferences for new environmental policyinstruments: determining the acceptability of cross compliance for biodiversitybenefits. Journal of Agricultural Economics 57 (3), 393–414. Available from:<http://econpapers.repec.org/RePEc:bla:jageco:v:57:y:2006:i:3:p:393-414> .

de Graaff, J., Kessler, A., Duarte, F., 2011. Financial consequences of cross-compliance andflat-rate-per-ha subsidies: the case of olive farmers on sloping land. Land Use Policy28 (2), 388–394. Available from: http://www.sciencedirect.com/science/article/B6VB0-513F061-1/2/d8bf6599712b7e2de56b3322c945d32f.

Elbersen, B., Jongeneel, R., Kempen, M., Klein-Lankhorst, J.R., de Vries, W., Lesschen,J.-P., O nate, J.J., Alonso, P.M., Kasperczyk, N., Schramek, J., Mik, M., Peepson, A.,Annen, D., Bouma, F., Staritsky, I., Kros, H., 2010. Final report of ccat projectresults. Tech. rep., The Cross Compliance Assessment Tool project. Availablefrom: <http://www.ccat.wur.nl/NR/rdonlyres/14A64131-DD4E-46FD-953E-986DDDB2AEC1/113043/D2_8-Final_repor_V5_compr.pdf>.

European Union, 2011. Agriculture in the European Union – Statistical andeconomic information 2010.

Fielding, R.T., 2000. Architectural styles and the design of network-based softwarearchitectures. Ph.D. thesis, University of California, Irvine, Irvine, California.Available from: <http://www.ics.uci.edu/�fielding/pubs/dissertation/top.htm>.

Flanagan, D., Matsumoto, Y., 2008. The ruby programming language, 1st ed.O’Reilly.

Follador, M., Leip, A., Orlandini, L., 2011. Assessing the impact of cross compliancemeasures on nitrogen fluxes from european farmlands with dndc-europe.Environmental Pollution In Press, Corrected Proof. Available from: <http://www.sciencedirect.com/science/article/B6VB5-524XP76-1/2/0623890a4890effa7c20257ee40cc665>.

Gao, S., Mioc, D., Boley, H., Anton, F., Yi, X., 2008. A ruleml study on integratinggeographical and health information. In: Proceedings of the InternationalSymposium on Rule Representation, Interchange and Reasoning on the Web.RuleML ’08. Springer-Verlag, Berlin, Heidelberg, pp. 174–181. Available from:<http://dx.doi.org/10.1007/978-3-540-88808-6_19>.

Gardner, A.v.d.L., 1987. An artificial intelligence approach to legal reasoning. MITPress, Cambridge, MA, USA.

Gordon, T., Governatori, G., Rotolo, A., 2009. Rules and norms: requirements for ruleinterchange languages in the legal domain. In: Governatori, G., Hall, J., Paschke,

Page 9: A service infrastructure for the representation, discovery, distribution and evaluation of agricultural production standards for automated compliance control

88 R. Nikkilä et al. / Computers and Electronics in Agriculture 80 (2012) 80–88

A. (Eds.), 2010, Rule Interchange and Applications. Vol. 5858 of Lecture Notes inComputer Science. Springer, Berlin/Heidelberg, pp. 282–296. Available from:<http://dx.doi.org/10.1007/978-3-642-04985-9_26> .

Hoekstra, R., Winkels, R., Hupkes, E., 2009. Reasoning with spatial plans on thesemantic web. In: Proceedings of the 12th International Conference on ArtificialIntelligence and Law. ICAIL ’09. ACM, New York, NY, USA, pp. 185–193.Available from: <http://doi.acm.org/10.1145/1568234.1568255> .

Kunisch, M., Frisch, J., Martini, D., Böttinger, S., 2007. Agroxml – a standardizedlanguage for data exchange in agriculture. In: Proceedings of 6th BiennialConference of European Federation of IT in Agriculture Glasgow.

Louwagie, G., Gay, S., Sammeth, F., Ratinger, T., 2011. The potential of europeanunion policies to address soil degradation in agriculture. Land Degradation &Development 22, 5–17.

Lunetta, R.S., Congalton, R.G., Fenstermaker, L.K., Jensen, J.R., McGwire, K.C., Tinney,L.R., 1991. Remote sensing and geographic information system data integration:error sources and research issues. Photogrammetric engineering and remote.Sensing (57), 677–687.

Marques, C., Strauch, J.C.M., Monteiro, R.S., Azevedo, L.G., de Souza, J.M., Zimbrao, G.,Medeiros, S.P.J., Pinto, G.D.R.B., 2001. Environmental knowledge managementand spatial business rules in the specs collaborative framework. In: Proceedingsof the IV International Symposium on Knowledge Management DocumentManagement, Curitiba, Brazil.

McBratney, A., Whelan, B., Ancev, T., Bouma, J., 2005. Future directions of precisionagriculture. Precision Agriculture 6, 7–23. Available from: <http://dx.doi.org/10.1007/s11119-005-0681-8> .

Milanovic, M., Kaviani, N., Gasevic, D., Giurca, A., Wagner, G., Devedzic, V., Hatala,M., 2007. Business process integration by using general rule markup language.In: Enterprise Distributed Object Computing Conference, 2007. EDOC 2007.11th IEEE International. p. 353.

Murakami, E., Saraiva, A.M., Junior, L.C.R., Cugnasca, C.E., Hirakawa, A.R., Correa, P.L.,2007. An infrastructure for the development of distributed service-orientedinformation systems for precision agriculture. Computers and Electronicsin Agriculture (1), 37–48, precision Agriculture in Latin America. Availablefrom: http://www.sciencedirect.com/science/article/B6T5M-4NHM6FN-1/2/0d37620c5dc7226f24924289f 6e0a414.

Nash, E., Wiebensohn, J., Nikkilä, R., Vatsanidou, A., Fountas, S., Bill, R., 2011.Towards automated compliance checking based on a formal representation of

agricultural production standards. Computers and Electronics in Agriculture(Accepted by Editor).

Nikkilä, R., Seilonen, I., Koskinen, K., 2010. Software architecture for farm managementinformation systems in precision agriculture. Computers and Electronics inAgriculture 70 (2), 328–336. Available from: <http://www.sciencedirect.com/science/article/B6T5M-4XMC000-1/2/54b46b3c8aa2a9ee60d022eb392b017a> .

OpenGIS, Cox, S., Cuthberg, A., Lake, R., Martell, R. (Ed.), 2001. Geography MarkupLanguage (GML) v2.0. Document number 01–029.

Sørensen, C., Fountas, S., Nash, E., Pesonen, L., Bochtis, D., Pedersen, S., Basso, B.,Blackmore, S., 2010a. Conceptual model of a future farm managementinformation system. Computers and Electronics in Agriculture 72 (1), 37–47.Available from: <http://www.sciencedirect.com/science/article/B6T5M-4YNBRM7-1/2/6c058f91c71d2b065b1f9a13703de2ed> .

Sørensen, C., Pesonen, L., Bochtis, D., Vougioukas, S., Suomi, P., 2011. Functionalrequirements for a future farm management information system. Computersand Electronics in Agriculture 76 (2), 266–276.

Sørensen, C., Pesonen, L., Fountas, S., Suomi, P., Bochtis, D., Bildsoe, P., Pedersen, S., 2010b.A user-centric approach for information modelling in arable farming. Computers andElectronics in Agriculture 73 (1), 44–55. Available from: <http://www.sciencedirect.com/science/article/B6T5M-50156N4-1/2/c03a822a5436fc2d653ce36fe0e48d3a> .

Steinberger, G., Rothmund, M., Auernhammer, H., 2009. Mobile farm equipment as adata source in an agricultural service architecture. Computers and Electronics inAgriculture 65 (2), 238–246.

United Nations, May 2005. AGROVOC Multilingual Agricultural Thesaurus.ICTUpdate. Available from: <http://www.fao.org/agrovoc>.

Varela-Ortega, C., Calatrava, J., 2004. Evaluation of cross compliance: Perspectivesand implementation, report of seminar 4. In: The Oxford Handbook of PublicPolicy. University Press, pp. 109–123.

Vaz, D., Ferreira, M., Lopes, R., 2007. Spatial-yap: A logic-based geographicinformation system. In: Dahl, V., Niemelä, I., (Eds.), Logic Programming, Vol.4670 of Lecture Notes in Computer Science. Springer Berlin/Heidelberg, pp.195–208. Available from: <http://dx.doi.org/10.1007/978-3-540-74610-2_14>.

Wolfert, J., Verdouw, C., Verloop, C., Beulens, A., 2010. Organizing informationintegration in agri-food – a method based on a service-oriented architectureand living lab approach. Computers and Electronics in Agriculture 70 (2), 389–405. Available from: <http://www.sciencedirect.com/science/article/B6T5M-4X49MTS-1/2/a2ab3bbd798dc03b4cd9d3afa7c44576> .