Class JtsSpatialContextFactory
- java.lang.Object
-
- org.locationtech.spatial4j.context.SpatialContextFactory
-
- org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory
-
public class JtsSpatialContextFactory extends SpatialContextFactory
SeeSpatialContextFactory.makeSpatialContext(java.util.Map, ClassLoader).The following keys are looked up in the args map, in addition to those in the superclass:
- datelineRule
- width180(default)|ccwRect|none
-- see
DatelineRule - validationRule
- error(default)|none|repairConvexHull|repairBuffer0
-- see
ValidationRule - autoIndex
- true|false(default) -- see
JtsShapeFactory.isAutoIndex() - allowMultiOverlap
- true|false(default) -- see
JtsSpatialContext.isAllowMultiOverlap() - precisionModel
- floating(default) | floating_single | fixed
-- see
PrecisionModel. Iffixedthen you must also provideprecisionScale-- seePrecisionModel.getScale() - useJtsPoint, useJtsLineString, useJtsMulti
- All default to true. See corresponding methods on
JtsShapeFactory.
-
-
Field Summary
Fields Modifier and Type Field Description booleanallowMultiOverlapbooleanautoIndexCoordinateSequenceFactorycoordinateSequenceFactoryDatelineRuledatelineRuleprotected static PrecisionModeldefaultPrecisionModelPrecisionModelprecisionModelintsridbooleanuseJtsLineStringbooleanuseJtsMultibooleanuseJtsPointValidationRulevalidationRule-
Fields inherited from class org.locationtech.spatial4j.context.SpatialContextFactory
args, binaryCodecClass, classLoader, distCalc, geo, hasFormatConfig, normWrapLongitude, readers, shapeFactoryClass, worldBounds, writers
-
-
Constructor Summary
Constructors Constructor Description JtsSpatialContextFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckDefaultFormats()If no formats were defined in the config, this will make sure GeoJSON and WKT are registeredGeometryFactorygetGeometryFactory()protected voidinit(Map<String,String> args, ClassLoader classLoader)JtsSpatialContextnewSpatialContext()Subclasses should simply construct the instance from the initialized configuration.-
Methods inherited from class org.locationtech.spatial4j.context.SpatialContextFactory
addReaderIfNoggitExists, initCalculator, initField, initFormats, initWorldBounds, makeBinaryCodec, makeFormats, makeShapeFactory, makeSpatialContext
-
-
-
-
Field Detail
-
defaultPrecisionModel
protected static final PrecisionModel defaultPrecisionModel
-
precisionModel
public PrecisionModel precisionModel
-
srid
public int srid
-
coordinateSequenceFactory
public CoordinateSequenceFactory coordinateSequenceFactory
-
datelineRule
public DatelineRule datelineRule
-
validationRule
public ValidationRule validationRule
-
autoIndex
public boolean autoIndex
-
allowMultiOverlap
public boolean allowMultiOverlap
-
useJtsPoint
public boolean useJtsPoint
-
useJtsLineString
public boolean useJtsLineString
-
useJtsMulti
public boolean useJtsMulti
-
-
Method Detail
-
checkDefaultFormats
protected void checkDefaultFormats()
Description copied from class:SpatialContextFactoryIf no formats were defined in the config, this will make sure GeoJSON and WKT are registered- Overrides:
checkDefaultFormatsin classSpatialContextFactory
-
init
protected void init(Map<String,String> args, ClassLoader classLoader)
- Overrides:
initin classSpatialContextFactory
-
getGeometryFactory
public GeometryFactory getGeometryFactory()
-
newSpatialContext
public JtsSpatialContext newSpatialContext()
Description copied from class:SpatialContextFactorySubclasses should simply construct the instance from the initialized configuration.- Overrides:
newSpatialContextin classSpatialContextFactory
-
-