Class JtsSpatialContextFactory
java.lang.Object
org.locationtech.spatial4j.context.SpatialContextFactory
org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory
See
SpatialContextFactory.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
FieldsModifier and TypeFieldDescriptionboolean
boolean
org.locationtech.jts.geom.CoordinateSequenceFactory
protected static final org.locationtech.jts.geom.PrecisionModel
org.locationtech.jts.geom.PrecisionModel
int
boolean
boolean
boolean
Fields inherited from class org.locationtech.spatial4j.context.SpatialContextFactory
args, binaryCodecClass, classLoader, distCalc, geo, hasFormatConfig, normWrapLongitude, readers, shapeFactoryClass, worldBounds, writers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
If no formats were defined in the config, this will make sure GeoJSON and WKT are registeredorg.locationtech.jts.geom.GeometryFactory
protected void
init
(Map<String, String> args, ClassLoader classLoader) 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 Details
-
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
-
validationRule
-
autoIndex
public boolean autoIndex -
allowMultiOverlap
public boolean allowMultiOverlap -
useJtsPoint
public boolean useJtsPoint -
useJtsLineString
public boolean useJtsLineString -
useJtsMulti
public boolean useJtsMulti
-
-
Constructor Details
-
JtsSpatialContextFactory
public JtsSpatialContextFactory()
-
-
Method Details
-
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
- Overrides:
init
in classSpatialContextFactory
-
getGeometryFactory
public org.locationtech.jts.geom.GeometryFactory getGeometryFactory() -
newSpatialContext
Description copied from class:SpatialContextFactory
Subclasses should simply construct the instance from the initialized configuration.- Overrides:
newSpatialContext
in classSpatialContextFactory
-