Package org.geotools.gml2.bindings
Class GML2EncodingUtils
Object
GML2EncodingUtils
Utility methods used by gml2 bindigns when encodding.
- Author:
- Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org, Ben Caradoc-Davies, CSIRO Exploration and Mining
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ElementAbstractFeatureType_encode(Object object, Document document, Element value) AbstractFeatureType_getProperties(Object object, XSDElementDeclaration element, SchemaIndex schemaIndex, Set<String> toFilter, Configuration configuration) static XSDTypeDefinitioncreateXmlTypeFromFeatureType(SimpleFeatureType featureType, SchemaIndex schemaIndex, Set<String> toFilter) static StringUsetoURI(CoordinateReferenceSystem, SrsSyntax, boolean)instead, orSrsSyntaxdirectlyGeometryPropertyType_getProperties(Geometry geometry) static ObjectGeometryPropertyType_getProperty(Geometry geometry, QName name) static ObjectGeometryPropertyType_getProperty(Geometry geometry, QName name, boolean includeAbstractGeometry) static CoordinateReferenceSystemDeprecated.static StringDetermines the name (gml:name) of the geometry by checkingGeometry.getUserData().static IntegergetEnvelopeDimension(ReferencedEnvelope e, Configuration configuration) static IntegergetGeometryDimension(Geometry geometry, Configuration config) Returns the geometry dimension, either as forced in the configuration, or the geometry natural onestatic StringDetermines the identifier (gml:id) of the geometry by checkingGeometry.getUserData().static StringDetermines the description (gml:description) of the geometry by checkingGeometry.getUserData().static voidsetDescription(Geometry g, String description) Set the description (gml:description) of the geometry as a key in the user data mapGeometry.getUserData()(creating it withGeometry.getUserData()if it does not already exist).static voidSet the identifier (gml:id) of the geometry as a key in the user data mapGeometry.getUserData()(creating it withGeometry.getUserData()if it does not already exist).static voidSet the name (gml:name) of the geometry as a key in the user data mapGeometry.getUserData()(creating it withGeometry.getUserData()if it does not already exist).static StringEncodes the crs object as a uri.static StringtoURI(CoordinateReferenceSystem crs, boolean forceOldStyle) Encodes the crs object as a uri.static StringtoURI(CoordinateReferenceSystem crs, SrsSyntax srsSyntax, boolean switchCode) Encodes the crs object as a uri using the specified syntax.
-
Constructor Details
-
GML2EncodingUtils
public GML2EncodingUtils()
-
-
Method Details
-
epsgCode
UsetoURI(CoordinateReferenceSystem, SrsSyntax, boolean)instead, orSrsSyntaxdirectly -
toURI
Encodes the crs object as a uri. -
toURI
Encodes the crs object as a uri.The axis order of the crs determines which form of uri is used.
-
toURI
Encodes the crs object as a uri using the specified syntax.- Parameters:
crs- The CRS to be evaluatedsrsSyntax- The syntax to useswitchCode- If true, the authority and code will be switched to HTTP URI automatically if the CRS axis order is east/north or inapplicable
-
getCRS
Deprecated.please useJTS.getCRS(Geometry) -
getID
Determines the identifier (gml:id) of the geometry by checkingGeometry.getUserData().This method returns
nullwhen no id can be found. -
setID
Set the identifier (gml:id) of the geometry as a key in the user data mapGeometry.getUserData()(creating it withGeometry.getUserData()if it does not already exist). If the user data exists and is not aMap, this method has no effect.- Parameters:
g- the geometryid- the gml:id to be set
-
getName
Determines the description (gml:description) of the geometry by checkingGeometry.getUserData().This method returns
nullwhen no name can be found. -
setName
Set the name (gml:name) of the geometry as a key in the user data mapGeometry.getUserData()(creating it withGeometry.getUserData()if it does not already exist). If the user data exists and is not aMap, this method has no effect.- Parameters:
g- the geometryname- the gml:name to be set
-
getDescription
Determines the name (gml:name) of the geometry by checkingGeometry.getUserData().This method returns
nullwhen no description can be found. -
setDescription
Set the description (gml:description) of the geometry as a key in the user data mapGeometry.getUserData()(creating it withGeometry.getUserData()if it does not already exist). If the user data exists and is not aMap, this method has no effect.- Parameters:
g- the geometrydescription- the gml:description to be set
-
AbstractFeatureType_encode
-
AbstractFeatureType_getProperties
public static List<Object[]> AbstractFeatureType_getProperties(Object object, XSDElementDeclaration element, SchemaIndex schemaIndex, Set<String> toFilter, Configuration configuration) -
createXmlTypeFromFeatureType
public static XSDTypeDefinition createXmlTypeFromFeatureType(SimpleFeatureType featureType, SchemaIndex schemaIndex, Set<String> toFilter) -
GeometryPropertyType_getProperty
-
GeometryPropertyType_getProperty
-
GeometryPropertyType_getProperties
-
getGeometryDimension
Returns the geometry dimension, either as forced in the configuration, or the geometry natural one -
getEnvelopeDimension
-
JTS.getCRS(Geometry)