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. Iffixedthen you must also provideprecisionScale-- seePrecisionModel.getScale() - useJtsPoint, useJtsLineString, useJtsMulti
- All default to true. See corresponding methods on
JtsShapeFactory.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanorg.locationtech.jts.geom.CoordinateSequenceFactoryprotected static final org.locationtech.jts.geom.PrecisionModelorg.locationtech.jts.geom.PrecisionModelintbooleanbooleanbooleanFields inherited from class SpatialContextFactory
args, binaryCodecClass, classLoader, distCalc, geo, hasFormatConfig, normWrapLongitude, readers, shapeFactoryClass, worldBounds, writers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidIf no formats were defined in the config, this will make sure GeoJSON and WKT are registeredorg.locationtech.jts.geom.GeometryFactoryprotected voidinit(Map<String, String> args, ClassLoader classLoader) Subclasses should simply construct the instance from the initialized configuration.Methods inherited from class 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:SpatialContextFactoryIf no formats were defined in the config, this will make sure GeoJSON and WKT are registered- Overrides:
checkDefaultFormatsin classSpatialContextFactory
-
init
- Overrides:
initin classSpatialContextFactory
-
getGeometryFactory
public org.locationtech.jts.geom.GeometryFactory getGeometryFactory() -
newSpatialContext
Description copied from class:SpatialContextFactorySubclasses should simply construct the instance from the initialized configuration.- Overrides:
newSpatialContextin classSpatialContextFactory
-