Class SpatialContextFactory

    • Constructor Detail

      • SpatialContextFactory

        public SpatialContextFactory()
    • Method Detail

      • makeSpatialContext

        public static SpatialContext makeSpatialContext​(java.util.Map<java.lang.String,​java.lang.String> args,
                                                        java.lang.ClassLoader classLoader)
        Creates a new SpatialContext based on configuration in args. See the class definition for what keys are looked up in it. The factory class is looked up via "spatialContextFactory" in args then falling back to a Java system property (with initial caps). If neither are specified then SpatialContextFactory is chosen.
        Parameters:
        args - Non-null map of name-value pairs.
        classLoader - Optional, except when a class name is provided to an argument.
      • init

        protected void init​(java.util.Map<java.lang.String,​java.lang.String> args,
                            java.lang.ClassLoader classLoader)
      • initField

        protected void initField​(java.lang.String name)
        Gets name from args and populates a field by the same name with the value.
      • initCalculator

        protected void initCalculator()
      • initFormats

        protected void initFormats()
        Check args for 'readers' and 'writers'. The value should be a comma separated list of class names. The legacy parameter 'wktShapeParserClass' is also supported to add a specific WKT prarser
      • checkDefaultFormats

        protected void checkDefaultFormats()
        If no formats were defined in the config, this will make sure GeoJSON and WKT are registered
      • addReaderIfNoggitExists

        public void addReaderIfNoggitExists​(java.lang.Class<? extends ShapeReader> reader)
      • initWorldBounds

        protected void initWorldBounds()
      • newSpatialContext

        public SpatialContext newSpatialContext()
        Subclasses should simply construct the instance from the initialized configuration.
      • makeClassInstance

        private <T> T makeClassInstance​(java.lang.Class<? extends T> clazz,
                                        java.lang.Object... ctorArgs)