Package org.geotools.gml3.bindings
Class GML3ParsingUtils
- Object
-
- GML3ParsingUtils
-
public class GML3ParsingUtils extends Object
Utility class for gml3 parsing.- Author:
- Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
-
-
Constructor Summary
Constructors Constructor Description GML3ParsingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
dimensions(Node node)
Returns the number of dimensions for the specified node, eventually recursing up to find the parent node that has the indication of the dimensions (normally the top-most geometry element has it, not the posList).static SimpleFeatureType
featureType(XSDElementDeclaration element, BindingWalkerFactory bwFactory)
Turns a xml type definition into a geotools feature type.static CurvedGeometryFactory
getCurvedGeometryFactory(ArcParameters arcParameters, GeometryFactory gFactory, CoordinateSequence cs)
Returns a curved geometry factory given the linearization constraints, the original factory, and a coordinate sequence representing the control points of a curved geometrystatic SimpleFeature
parseFeature(ElementInstance instance, Node node, Object value, FeatureTypeCache ftCache, BindingWalkerFactory bwFactory)
Utility method to implement Binding.parse for a binding which parses into A feature.
-
-
-
Method Detail
-
parseFeature
public static SimpleFeature parseFeature(ElementInstance instance, Node node, Object value, FeatureTypeCache ftCache, BindingWalkerFactory bwFactory) throws Exception
Utility method to implement Binding.parse for a binding which parses into A feature.- Parameters:
instance
- The instance being parsed.node
- The parse tree.value
- The value from the last binding in the chain.ftCache
- The feature type cache.bwFactory
- Binding walker factory.- Returns:
- A feature.
- Throws:
Exception
-
featureType
public static SimpleFeatureType featureType(XSDElementDeclaration element, BindingWalkerFactory bwFactory) throws Exception
Turns a xml type definition into a geotools feature type.- Returns:
- The corresponding geotools feature type.
- Throws:
Exception
-
dimensions
public static int dimensions(Node node)
Returns the number of dimensions for the specified node, eventually recursing up to find the parent node that has the indication of the dimensions (normally the top-most geometry element has it, not the posList). If no srsDimension can be found, check the srsName the same way and return the srsDimensions instead. Returns 2 if no srsDimension or srsName attribute could be found.
-
getCurvedGeometryFactory
public static CurvedGeometryFactory getCurvedGeometryFactory(ArcParameters arcParameters, GeometryFactory gFactory, CoordinateSequence cs)
Returns a curved geometry factory given the linearization constraints, the original factory, and a coordinate sequence representing the control points of a curved geometry
-
-