Class FeatureSchema

    • Constructor Detail

      • FeatureSchema

        public FeatureSchema()
    • Method Detail

      • getAttributeIndex

        public int getAttributeIndex​(String attributeName)
        Returns the zero-based index of the attribute with the given name (case-sensitive)
        Throws:
        IllegalArgumentException - if attributeName is unrecognized
      • hasAttribute

        public boolean hasAttribute​(String attributeName)
        Returns whether this FeatureSchema has an attribute with this name
        Parameters:
        attributeName - the name to look up
        Returns:
        whether this FeatureSchema has an attribute with this name
      • getGeometryIndex

        public int getGeometryIndex()
        Returns the attribute index of the Geometry, or -1 if there is no Geometry attribute
      • getAttributeName

        public String getAttributeName​(int attributeIndex)
        Returns the (case-sensitive) name of the attribute at the given zero-based index.
      • getAttributeType

        public AttributeType getAttributeType​(int attributeIndex)
        Returns whether the attribute at the given zero-based index is a string, integer, double, etc.
      • getAttributeType

        public AttributeType getAttributeType​(String attributeName)
        Returns whether the attribute with the given name (case-sensitive) is a string, integer, double, etc.
      • getAttributeCount

        public int getAttributeCount()
        Returns the total number of spatial and non-spatial attributes in this FeatureSchema. There are 0 or 1 spatial attributes and 0 or more non-spatial attributes.
      • addAttribute

        public void addAttribute​(String attributeName,
                                 AttributeType attributeType)
        Adds an attribute with the given case-sensitive name.
        Throws:
        AssertionFailedException - if a second Geometry is being added
      • equals

        public boolean equals​(Object other)
        Returns whether the two FeatureSchemas have the same attribute names with the same types and in the same order.
        Overrides:
        equals in class Object
      • equals

        public boolean equals​(Object other,
                              boolean orderMatters)
        Returns whether the two FeatureSchemas have the same attribute names with the same types and (optionally) in the same order.
      • setCoordinateSystem

        public FeatureSchema setCoordinateSystem​(CoordinateSystem coordinateSystem)
        Sets the CoordinateSystem associated with this FeatureSchema, but does not perform any reprojection.
        Returns:
        this FeatureSchema