public class SpatialArgsParser extends Object
SpatialArgs
object. The set of operations supported are defined in SpatialOperation, such
as "Intersects" being a common one. The shape portion is defined by SpatialContext.readShape(String). There are some optional name-value pair parameters
that follow the closing parenthesis. Example:
Intersects(-10,20,-8,22) distPec=0.025In the future it would be good to support something at least semi-standardized like a variant of [E]CQL.
| Constructor and Description |
|---|
SpatialArgsParser() |
| Modifier and Type | Method and Description |
|---|---|
SpatialArgs |
parse(String v,
com.spatial4j.core.context.SpatialContext ctx)
Parses a string such as "Intersects(-10,20,-8,22) distPec=0.025".
|
protected static Map<String,String> |
parseMap(String body) |
protected static boolean |
readBool(String v,
boolean defaultValue) |
protected static Double |
readDouble(String v) |
public SpatialArgs parse(String v, com.spatial4j.core.context.SpatialContext ctx) throws com.spatial4j.core.exception.InvalidSpatialArgument, com.spatial4j.core.exception.InvalidShapeException
v - The string to parse. Mandatory.ctx - The spatial context. Mandatory.com.spatial4j.core.exception.InvalidSpatialArgument - If there is a problem parsing the string.com.spatial4j.core.exception.InvalidShapeException - Thrown from SpatialContext.readShape(String)protected static boolean readBool(String v, boolean defaultValue)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.