Package oracle.spatial.util
Class GML
- java.lang.Object
-
- oracle.spatial.util.GML
-
public class GML extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.sql.Connection_connprotected static java.lang.String_srsNameSpaceprotected static java.util.SetgmlTypes
-
Constructor Summary
Constructors Constructor Description GML()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static voidaddCoords(java.util.Vector coordVector, java.lang.String newCoords)static JGeometryfromNodeToEnvelope(org.w3c.dom.Node nd)Example:
<pre>
<Box srsname="EPSG_4326">
<coordinates>
0.0,0.0 100.0,100.0
</coordinates>
</Box>
</pre>
Note: Each Box Element encloses a single coordinates element or four Coord, the latter containing precisely two coordinate tuples.static JGeometryfromNodeToGeometry(org.w3c.dom.Node nd)static JGeometryfromNodeToGeometry(org.w3c.dom.Node nd, int coordOrder)static JGeometryfromNodeToGeometryCollection(org.w3c.dom.Node nd)static JGeometryfromNodeToLinearRing(org.w3c.dom.Node nd)static JGeometryfromNodeToLineString(org.w3c.dom.Node nd)Example:
<pre>
<LineString srsname="EPSG_4326">
<coordinates>
0.0,0.0 100.0,100.0
</coordinates>
</LineString>
</pre>static JGeometryfromNodeToMultiLineString(org.w3c.dom.Node nd)Example:
<pre>
<MultiLineString srsname="EPSG_4326">
<lineStringMember>
<LineString>
<coordinates>56.1,0.45 67.23,0.67</coordinates>
</LineString>
</lineStringMember>
<lineStringMember>
<LineString>
<coordinates>46.71,9.25 56.88,10.44</coordinates>
</LineString>
</lineStringMember>
<lineStringMember>
<LineString>
<coordinates>324.1,219.7 0.45,0.56</coordinates>
</LineString>
</lineStringMember>
</MultiLineString>
</pre>static JGeometryfromNodeToMultiPoint(org.w3c.dom.Node nd)Example:
<pre>
<MultiPoint srsname="EPSG_4326">
<pointMember>
<Point>
<coordinates>56.1,0.45</coordinates>
</Point>
</pointMember>
<pointMember>
<Point>
<coordinates>46.71,9.25</coordinates>
</Point>
</pointMember>
<pointMember>
<Point>
<coordinates>56.88,10.44</coordinates>
</Point>
</pointMember>
</MultiPoint >
</pre>static JGeometryfromNodeToMultiPolygon(org.w3c.dom.Node nd)Example:
<pre>
<MultiPolygon srsname="EPSG_4326">
<PolygonMember>
<Polygon srsname="EPSG_4326">
<outerBoundaryIs>
<LinearRing>
<coordinates>
0.0,0.0 100.0,0.0 100.0,100.0 0.0,100.0 0.0,0.0
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
10.0,10.0 10.0,40.0 40.0,40.0 40.0,10.0 10.0,10.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
60.0,60.0 60.0,90.0 90.0,90.0 90.0,60.0 60.0,60.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</PolygonMember>
<PolygonMember>
<Polygon srsname="EPSG_4326">
<outerBoundaryIs>
<LinearRing>
<coordinates>
1000.0,0.0 1100.0,0.0 1100.0,100.0 1000.0,100.0 1000.0,0.0
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
1010.0,10.0 1010.0,40.0 1040.0,40.0 1040.0,10.0 1010.0,10.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
1060.0,60.0 1060.0,90.0 1090.0,90.0 1090.0,60.0 1060.0,60.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</PolygonMember>
<PolygonMember>
<Polygon srsname="EPSG_4326">
<outerBoundaryIs>
<LinearRing>
<coordinates>
2000.0,0.0 2100.0,0.0 2100.0,100.0 2000.0,100.0 2000.0,0.0
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
2010.0,10.0 2010.0,40.0 2040.0,40.0 2040.0,10.0 2010.0,10.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
2060.0,60.0 2060.0,90.0 2090.0,90.0 2090.0,60.0 2060.0,60.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</PolygonMember>
</MultiPolygon>
</pre>static JGeometryfromNodeToPoint(org.w3c.dom.Node nd)Example 1:
<pre>
<Point srsname="EPSG_4326">
<coordinates>
56.1,0.45
</coordinates>
</Point>
</pre>
Example 2:
<pre>
<Point srsname="8265">
<coord>
<x>56.1</x>
<y>0.45</y>
</coord>
</Point>
</pre>static JGeometryfromNodeToPolygon(org.w3c.dom.Node nd)Example:
<pre>
<Polygon srsname="EPSG_4326">
<outerBoundaryIs>
<LinearRing>
<coordinates>
0.0,0.0 100.0,0.0 100.0,100.0 0.0,100.0 0.0,0.0
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
10.0,10.0 10.0,40.0 40.0,40.0 40.0,10.0 10.0,10.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
60.0,60.0 60.0,90.0 90.0,90.0 90.0,60.0 60.0,60.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</pre>static JGeometryfromNodeToSurface(org.w3c.dom.Node nd)static java.util.VectorgetAll(org.w3c.dom.Node start, java.lang.String[] path)static voidgetAll(org.w3c.dom.Node start, java.lang.String[] path, int posInPath, java.util.Vector result)protected static org.w3c.dom.NodegetFirst(org.w3c.dom.Node start, java.lang.String[] path)protected static org.w3c.dom.NodegetFirst(org.w3c.dom.Node start, java.lang.String[] path, int posInPath)static java.lang.StringgetNameSpace()protected static java.lang.Stringnormalize(java.lang.String nodeName)static voidsetConnection(java.sql.Connection conn)static voidsetsrsNameSpace(java.lang.String srsNameSpace)
-
-
-
Method Detail
-
setConnection
public static void setConnection(java.sql.Connection conn)
-
setsrsNameSpace
public static void setsrsNameSpace(java.lang.String srsNameSpace)
-
getNameSpace
public static java.lang.String getNameSpace()
-
fromNodeToPoint
public static JGeometry fromNodeToPoint(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
Example 1:
<pre>
<Point srsname="EPSG_4326">
<coordinates>
56.1,0.45
</coordinates>
</Point>
</pre>
Example 2:
<pre>
<Point srsname="8265">
<coord>
<x>56.1</x>
<y>0.45</y>
</coord>
</Point>
</pre>- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToEnvelope
public static final JGeometry fromNodeToEnvelope(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
Example:
<pre>
<Box srsname="EPSG_4326">
<coordinates>
0.0,0.0 100.0,100.0
</coordinates>
</Box>
</pre>
Note: Each Box Element encloses a single coordinates element or four Coord, the latter containing precisely two coordinate tuples. The first of these is constructued from the minimum values measured along for all the axes, and the second is constructed from the maximum values measured along all the axes.- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToLineString
public static JGeometry fromNodeToLineString(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
Example:
<pre>
<LineString srsname="EPSG_4326">
<coordinates>
0.0,0.0 100.0,100.0
</coordinates>
</LineString>
</pre>- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToPolygon
public static JGeometry fromNodeToPolygon(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
Example:
<pre>
<Polygon srsname="EPSG_4326">
<outerBoundaryIs>
<LinearRing>
<coordinates>
0.0,0.0 100.0,0.0 100.0,100.0 0.0,100.0 0.0,0.0
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
10.0,10.0 10.0,40.0 40.0,40.0 40.0,10.0 10.0,10.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
60.0,60.0 60.0,90.0 90.0,90.0 90.0,60.0 60.0,60.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</pre>- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToSurface
public static JGeometry fromNodeToSurface(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToMultiLineString
public static JGeometry fromNodeToMultiLineString(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
Example:
<pre>
<MultiLineString srsname="EPSG_4326">
<lineStringMember>
<LineString>
<coordinates>56.1,0.45 67.23,0.67</coordinates>
</LineString>
</lineStringMember>
<lineStringMember>
<LineString>
<coordinates>46.71,9.25 56.88,10.44</coordinates>
</LineString>
</lineStringMember>
<lineStringMember>
<LineString>
<coordinates>324.1,219.7 0.45,0.56</coordinates>
</LineString>
</lineStringMember>
</MultiLineString>
</pre>- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToMultiPoint
public static JGeometry fromNodeToMultiPoint(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
Example:
<pre>
<MultiPoint srsname="EPSG_4326">
<pointMember>
<Point>
<coordinates>56.1,0.45</coordinates>
</Point>
</pointMember>
<pointMember>
<Point>
<coordinates>46.71,9.25</coordinates>
</Point>
</pointMember>
<pointMember>
<Point>
<coordinates>56.88,10.44</coordinates>
</Point>
</pointMember>
</MultiPoint >
</pre>- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToGeometry
public static JGeometry fromNodeToGeometry(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToGeometry
public static JGeometry fromNodeToGeometry(org.w3c.dom.Node nd, int coordOrder) throws DataException, java.lang.Exception
- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToGeometryCollection
public static JGeometry fromNodeToGeometryCollection(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToLinearRing
public static JGeometry fromNodeToLinearRing(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
- Throws:
DataExceptionjava.lang.Exception
-
fromNodeToMultiPolygon
public static JGeometry fromNodeToMultiPolygon(org.w3c.dom.Node nd) throws DataException, java.lang.Exception
Example:
<pre>
<MultiPolygon srsname="EPSG_4326">
<PolygonMember>
<Polygon srsname="EPSG_4326">
<outerBoundaryIs>
<LinearRing>
<coordinates>
0.0,0.0 100.0,0.0 100.0,100.0 0.0,100.0 0.0,0.0
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
10.0,10.0 10.0,40.0 40.0,40.0 40.0,10.0 10.0,10.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
60.0,60.0 60.0,90.0 90.0,90.0 90.0,60.0 60.0,60.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</PolygonMember>
<PolygonMember>
<Polygon srsname="EPSG_4326">
<outerBoundaryIs>
<LinearRing>
<coordinates>
1000.0,0.0 1100.0,0.0 1100.0,100.0 1000.0,100.0 1000.0,0.0
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
1010.0,10.0 1010.0,40.0 1040.0,40.0 1040.0,10.0 1010.0,10.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
1060.0,60.0 1060.0,90.0 1090.0,90.0 1090.0,60.0 1060.0,60.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</PolygonMember>
<PolygonMember>
<Polygon srsname="EPSG_4326">
<outerBoundaryIs>
<LinearRing>
<coordinates>
2000.0,0.0 2100.0,0.0 2100.0,100.0 2000.0,100.0 2000.0,0.0
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
2010.0,10.0 2010.0,40.0 2040.0,40.0 2040.0,10.0 2010.0,10.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
2060.0,60.0 2060.0,90.0 2090.0,90.0 2090.0,60.0 2060.0,60.0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</PolygonMember>
</MultiPolygon>
</pre>- Parameters:
nd- A Node representing the input GML- Returns:
- The resulting JGeometry
- Throws:
DataExceptionjava.lang.Exception
-
addCoords
protected static void addCoords(java.util.Vector coordVector, java.lang.String newCoords)
-
getAll
public static java.util.Vector getAll(org.w3c.dom.Node start, java.lang.String[] path)
-
getAll
public static void getAll(org.w3c.dom.Node start, java.lang.String[] path, int posInPath, java.util.Vector result)
-
getFirst
protected static org.w3c.dom.Node getFirst(org.w3c.dom.Node start, java.lang.String[] path)
-
getFirst
protected static org.w3c.dom.Node getFirst(org.w3c.dom.Node start, java.lang.String[] path, int posInPath)
-
normalize
protected static java.lang.String normalize(java.lang.String nodeName)
-
-