Class GeoUtils

    • Method Detail

      • createTopoJson

        public static TopoJson createTopoJson​(AbstractInjectableResource topojson)
        Creates the TopoJson object definition from a topoJson text definition.
        Parameters:
        topojson - topoJson definition.
        Returns:
        the TopoJson object definition
      • createTopoJson

        public static TopoJson createTopoJson​(String topojson)
        Creates the TopoJson object definition from a topoJson text definition.
        Parameters:
        topojson - topoJson definition.
        Returns:
        the TopoJson object definition
      • features

        public static List<Feature> features​(AbstractInjectableResource topojson,
                                             String featureProperty)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(AbstractInjectableResource topojson,
                                             Key featureProperty)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(AbstractInjectableResource topojson,
                                             String featureProperty,
                                             FeatureFilterCallback filterCallback)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined
        filterCallback - callback instance to filter the features to draw
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(AbstractInjectableResource topojson,
                                             Key featureProperty,
                                             FeatureFilterCallback filterCallback)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        filterCallback - callback instance to filter the features to draw
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(String topojson,
                                             Key featureProperty)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(String topojson,
                                             String featureProperty)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(String topojson,
                                             Key featureProperty,
                                             FeatureFilterCallback filterCallback)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        filterCallback - callback instance to filter the features to draw
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(String topojson,
                                             String featureProperty,
                                             FeatureFilterCallback filterCallback)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        filterCallback - callback instance to filter the features to draw
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(TopoJson topojson,
                                             Key featureProperty)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(TopoJson topojson,
                                             String featureProperty)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(TopoJson topojson,
                                             Key featureProperty,
                                             FeatureFilterCallback filterCallback)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        filterCallback - callback instance to filter the features to draw
        Returns:
        a list of features to enable regions drawing
      • features

        public static List<Feature> features​(TopoJson topojson,
                                             String featureProperty,
                                             FeatureFilterCallback filterCallback)
        Reads the topoJson definition and creates a list of features to enable regions drawing.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined.
        filterCallback - callback instance to filter the features to draw
        Returns:
        a list of features to enable regions drawing
      • feature

        public static Feature feature​(AbstractInjectableResource topojson,
                                      String featureProperty,
                                      FeatureFindCallback findCallback)
        Reads the topoJson definition and find a specific feature to enable outline.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined
        findCallback - callback instance to find the features to outline
        Returns:
        a features instance to enable outline or null
      • feature

        public static Feature feature​(AbstractInjectableResource topojson,
                                      Key featureProperty,
                                      FeatureFindCallback findCallback)
        Reads the topoJson definition and find a specific feature to enable outline.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined
        findCallback - callback instance to find the features to outline
        Returns:
        a features instance to enable outline or null
      • feature

        public static Feature feature​(String topojson,
                                      Key featureProperty,
                                      FeatureFindCallback findCallback)
        Reads the topoJson definition and find a specific feature to enable outline.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined
        findCallback - callback instance to find the features to outline
        Returns:
        a features instance to enable outline or null
      • feature

        public static Feature feature​(String topojson,
                                      String featureProperty,
                                      FeatureFindCallback findCallback)
        Reads the topoJson definition and find a specific feature to enable outline.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined
        findCallback - callback instance to find the features to outline
        Returns:
        a features instance to enable outline or null
      • feature

        public static Feature feature​(TopoJson topojson,
                                      Key featureProperty,
                                      FeatureFindCallback findCallback)
        Reads the topoJson definition and find a specific feature to enable outline.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined
        findCallback - callback instance to find the features to outline
        Returns:
        a features instance to enable outline or null
      • feature

        public static Feature feature​(TopoJson topojson,
                                      String featureProperty,
                                      FeatureFindCallback findCallback)
        Reads the topoJson definition and find a specific feature to enable outline.
        Parameters:
        topojson - topoJson definition.
        featureProperty - property in the objects node of topoJson definition where all regions are defined
        findCallback - callback instance to find the features to outline
        Returns:
        a features instance to enable outline or null
      • loadLabels

        public static Labels loadLabels​(List<Feature> features,
                                        Key property)
        Creates and loads a Labels object with the label of feature object by the property.
        Parameters:
        features - list of features to draw
        property - property in the Feature to identify it
        Returns:
        a Labels loaded with all features labels
      • loadLabels

        public static Labels loadLabels​(List<Feature> features,
                                        String property)
        Creates and loads a Labels object with the label of feature object by the property.
        Parameters:
        features - list of features to draw
        property - property in the Feature to identify it
        Returns:
        a Labels loaded with all features labels
      • loadLabels

        public static Labels loadLabels​(List<Feature> features,
                                        FeatureLabelCallback labelCallback)
        Creates and loads a Labels object with the label of feature object by the callback.
        Parameters:
        features - list of features to draw
        labelCallback - callback invoked in order to get the label of the feature
        Returns:
        a Labels loaded with all features labels