Package org.geotools.gml3
Class GMLConfiguration
Object
Configuration
GMLConfiguration
Parser configuration for the gml3 schema.
- Author:
- Justin Deoliveira, The Open Planning Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final QName
Boolean property which controls whether the FeatureCollection should be encoded with multiple featureMember as opposed to a single featureMembersstatic final QName
Boolean property which controls whether encoded features should include bounds.static final QName
Boolean property which controls whether geometry and envelope objects are encoded with an srs dimension attribute.static final QName
Property which engages "fast" gml encoding.protected SrsSyntax
Srs name style to encode srsName URI's with -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureContext
(MutablePicoContainer container) Configures the gml3 context.boolean
Controls if coordinates measures should be included in WFS outputs.boolean
Returns true if decimal notation should always be used, and scientific notation always avoided.Retrieves the geometry factory used to build geometriesint
Returns the number of decimals that should be used for encoding coordinates (defaults to 6)boolean
Returns true if decimals of coordinates are padded with zeros up to the configured number of decimals.Returns the syntax to use for encoding srs uris.boolean
protected void
registerBindings
(MutablePicoContainer container) Registers the bindings for the configuration.void
setEncodeMeasures
(boolean encodeMeasures) Sets if coordinates measures should be included in WFS outputs.void
setExtendedArcSurfaceSupport
(boolean arcSurfaceSupport) Flag that when set triggers extended support for arcs and surfaces.void
setForceDecimalEncoding
(boolean forceDecimalEncoding) Forces usage of decimal notation, avoiding scientific notations to encode coordinates.void
setGeometryFactory
(GeometryFactory geometryFactory) Sets the geometry factory used to build geometryvoid
setNumDecimals
(int numDecimals) Sets the number of decimals that should be used for encoding coordinatesvoid
setPadWithZeros
(boolean padWithZeros) Formats decimals of coordinates padding with zeros up to the configured number of decimals.void
setSrsSyntax
(SrsSyntax srsSyntax) Sets the syntax to use for encoding srs uris.Methods inherited from class Configuration
addDependency, allDependencies, configureBindings, configureBindings, configureEncoder, configureParser, equals, getContext, getDependencies, getDependency, getNamespaceURI, getProperties, getXSD, hashCode, hasProperty, registerBindings, setupBindings, setupContext, setupEncoder, setupParser
-
Field Details
-
NO_FEATURE_BOUNDS
Boolean property which controls whether encoded features should include bounds. -
ENCODE_FEATURE_MEMBER
Boolean property which controls whether the FeatureCollection should be encoded with multiple featureMember as opposed to a single featureMembers -
NO_SRS_DIMENSION
Boolean property which controls whether geometry and envelope objects are encoded with an srs dimension attribute. -
OPTIMIZED_ENCODING
Property which engages "fast" gml encoding. -
srsSyntax
Srs name style to encode srsName URI's with
-
-
Constructor Details
-
GMLConfiguration
public GMLConfiguration() -
GMLConfiguration
public GMLConfiguration(boolean extArcSurfaceSupport)
-
-
Method Details
-
setSrsSyntax
Sets the syntax to use for encoding srs uris.If this method is not explicitly called
SrsSyntax#URN
is used as the default. -
getSrsSyntax
Returns the syntax to use for encoding srs uris. -
setExtendedArcSurfaceSupport
public void setExtendedArcSurfaceSupport(boolean arcSurfaceSupport) Flag that when set triggers extended support for arcs and surfaces. -
isExtendedArcSurfaceSupport
public boolean isExtendedArcSurfaceSupport() -
registerBindings
protected void registerBindings(MutablePicoContainer container) Description copied from class:Configuration
Registers the bindings for the configuration.This method is intended to provide the default bindings for a configuration and is intended to be subclassed by client code. Client code should use
Configuration.configureBindings(MutablePicoContainer)
. Subclasses should mark this method as final after implementing.- Overrides:
registerBindings
in classConfiguration
- Parameters:
container
- Container containing all bindings, keyed byQName
.
-
configureContext
public void configureContext(MutablePicoContainer container) Configures the gml3 context.The following factories are registered:
- Overrides:
configureContext
in classConfiguration
- Parameters:
container
- The container representing the context.
-
getNumDecimals
public int getNumDecimals()Returns the number of decimals that should be used for encoding coordinates (defaults to 6)- Returns:
- the numDecimals
-
setNumDecimals
public void setNumDecimals(int numDecimals) Sets the number of decimals that should be used for encoding coordinates- Parameters:
numDecimals
- the numDecimals to set
-
getGeometryFactory
Retrieves the geometry factory used to build geometries- Returns:
- the geometryFactory
-
setGeometryFactory
Sets the geometry factory used to build geometry- Parameters:
geometryFactory
- the geometryFactory to set
-
getEncodeMeasures
public boolean getEncodeMeasures()Controls if coordinates measures should be included in WFS outputs.- Returns:
- TRUE if measures should be encoded, otherwise FALSE
-
setEncodeMeasures
public void setEncodeMeasures(boolean encodeMeasures) Sets if coordinates measures should be included in WFS outputs.- Parameters:
encodeMeasures
- TRUE if measures should be encoded, otherwise FALSE
-
setPadWithZeros
public void setPadWithZeros(boolean padWithZeros) Formats decimals of coordinates padding with zeros up to the configured number of decimals.- Parameters:
padWithZeros
- right pad decimals with zeros
-
setForceDecimalEncoding
public void setForceDecimalEncoding(boolean forceDecimalEncoding) Forces usage of decimal notation, avoiding scientific notations to encode coordinates.- Parameters:
forceDecimalEncoding
- avoid scientific notation, always use decimal
-
getPadWithZeros
public boolean getPadWithZeros()Returns true if decimals of coordinates are padded with zeros up to the configured number of decimals.- Returns:
- true if decimals are right-padded with zeros
-
getForceDecimalEncoding
public boolean getForceDecimalEncoding()Returns true if decimal notation should always be used, and scientific notation always avoided.- Returns:
- true if decimal notation is always used for encoding coordinates
-