Center-point-radius search Proximity searches .1 Introduction

OpenGIS ® Engineering Report OGC 12-104r1 Copyright © 2012 Open Geospatial Consortium. 18

7.1.4.6.1 Parameter discussion

The mandatory ValueReference parameter shall reference a value to be tested see OGC 09-026r1, clause 7.4.1. The mandatory MatchString parameter shall contain the value against which the value referenced using the ValueReference parameter shall be tested. The optional method parameter is used to identify the algorithm that shall be used to evaluate the reference value and the match string. All servers shall implement the Levenshtein algorithm see http:www.levenshtein.net and the Jaro-Winkler algorithm see http:en.wikipedia.orgwikiJaroE28093Winkler_distance. Additional vendor-specific algorithms may also be specified using the pattern “vendor:{name}” but this standard does not describe what these methods might be. The optional strength parameter is used to indicate a matching threshold beyond which the PropertyMatches operator shall evaluate to true. The value of strength parameter shall be a value between 1 and 100 with 100 indicating that the arguments must be identical in order for the PropertyMatches operator evaluates to true. Lower values allow for increasingly “fuzzier” matches. Example: The following example searches for alternative geographic identifiers that are a 90 match for the string “Albeon” using the Jaro-Winkler algorithm. ogc:PropertyMatches method=jaro-winkler ogc:PropertyNamealternativeGeographicIdentifierogc:PropertyName ogc:MatchString strength=”90”Albeonogc:MatchString ogc:PropertyMatches This predicate would, for example, match the string Ablion. 7.1.5 Proximity searches 7.1.5.1 Introduction A common class of queries performed on gazetteers is proximity searches. In the OWS-9 test bed two types of proximity searches were implemented and tested; centre-point- radius searches and nearest neighbour searches.

7.1.5.2 Center-point-radius search

A centre-point-radius search involves the client specifying a centre point and a radius and the server finding all objects that spatially interact with the defined circle. The specific spatial interaction is specified by the client in the query predicate. OpenGIS ® Engineering Report OGC 12-104r1 Copyright © 2012 Open Geospatial Consortium. 19 No changes are required to the XML-encoding of the FES see 09-026r1 in order to support centre-point-radius searches. The only requirements are t: ฀ the server support circular geometries ฀ the server, in its capabilities document, advertise that the circular geometry that it understands is a valid operand for spatial operators. The following XML-fragment show part of the FilterCapabilities section of a capabilities document advertising that gml:CircleByCenterPoint is a valid spatial operator arguments: fes:Spatial_Capabilities fes:GeometryOperands fes:GeometryOperandgml:Pointfes:GeometryOperand fes:GeometryOperandgml:LineStringfes:GeometryOperand fes:GeometryOperandgml:CircleByCenterPointfes:GeometryOperand fes:GeometryOperandgml:Polygonfes:GeometryOperand fes:GeometryOperandgml:Envelopefes:GeometryOperand fes:GeometryOperands … fes:Spatial_Capabilities The following XML-encoded request illustrate a GetRecords request using gml:CircleByCenterPoint: wfs:GetFeature service=WFS version=2.0.0 outputFormat=applicationgml+xml; version=3.2 xmlns:iso19112=http:www.isotc211.org19112 xmlns:wfs=http:www.opengis.netwfs2.0 xmlns:fes=http:www.opengis.netfes2.0 xmlns:xsi=http:www.w3.org2001XMLSchema-instance xsi:schemaLocation=http:www.opengis.netwfs2.0 ....wfs.xsd wfs:Query typeNames=iso19112:SI_LocationInstance fes:Filter fes:Intersects fes:PropertyNamepositionfes:PropertyName gml:Curve srsName=urn:ogc:def:EPSG::4326 gml:segments gml:CircleByCenterPoint numArc=1 gml:pos38.895111 -77.036667gml:pos gml:radius uom=m20000gml:radius gml:CircleByCenterPoint gml:segments gml:Curve fes:Intersects fes:Filter OpenGIS ® Engineering Report OGC 12-104r1 Copyright © 2012 Open Geospatial Consortium. 20 wfs:Query wfs:GetFeature For KVP-encoded requests, Table 3, defined additional parameters that may be implemented in order to conveniently express centre-point-radius queries: Table 3 – KVP parameters for centre-point-radius search Keyword Description Data type and value Optionality LAT Latitude expressed in WGS84. Number Zero or one Optional LON Longitude expression in WGS84. Number Zero or one Optional RADIUS Search radius expressed in meters along the surface of the Earth. Number Zero or one Optional For KVP-encoded requests, the implied spatial operator is Intersects. The following is an example of a KVP-encoded center-point-radius search: http:cubewerx.pvretano.comusgsgazetteercubeserv.cgi?config=litedatastore=litese rvice=WFSrequest=GetFeaturetypeName=SI_LocationInstancelat=38.895111lon =-77.036667radius=500maxFeatures=1000srsName=urn:ogc:def:crs:EPSG::4326

7.1.5.3 Nearest Neighbour