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
. Iffixed
then 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 boolean
allowMultiOverlap
boolean
autoIndex
org.locationtech.jts.geom.CoordinateSequenceFactory
coordinateSequenceFactory
DatelineRule
datelineRule
protected static org.locationtech.jts.geom.PrecisionModel
defaultPrecisionModel
org.locationtech.jts.geom.PrecisionModel
precisionModel
int
srid
boolean
useJtsLineString
boolean
useJtsMulti
boolean
useJtsPoint
ValidationRule
validationRule
-
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 void
checkDefaultFormats()
If no formats were defined in the config, this will make sure GeoJSON and WKT are registeredorg.locationtech.jts.geom.GeometryFactory
getGeometryFactory()
protected void
init(java.util.Map<java.lang.String,java.lang.String> args, java.lang.ClassLoader classLoader)
JtsSpatialContext
newSpatialContext()
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 org.locationtech.jts.geom.PrecisionModel defaultPrecisionModel
-
precisionModel
public org.locationtech.jts.geom.PrecisionModel precisionModel
-
srid
public int srid
-
coordinateSequenceFactory
public org.locationtech.jts.geom.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:SpatialContextFactory
If no formats were defined in the config, this will make sure GeoJSON and WKT are registered- Overrides:
checkDefaultFormats
in classSpatialContextFactory
-
init
protected void init(java.util.Map<java.lang.String,java.lang.String> args, java.lang.ClassLoader classLoader)
- Overrides:
init
in classSpatialContextFactory
-
getGeometryFactory
public org.locationtech.jts.geom.GeometryFactory getGeometryFactory()
-
newSpatialContext
public JtsSpatialContext newSpatialContext()
Description copied from class:SpatialContextFactory
Subclasses should simply construct the instance from the initialized configuration.- Overrides:
newSpatialContext
in classSpatialContextFactory
-
-