@TeiidFunction(name=SourceSystemFunctions.ST_GEOMFROMGML, category=FunctionCategoryConstants.GEOMETRY, nullOnNull=true) public static GeometryType geomFromGml(ClobType gml) throws FunctionExecutionException { return GeometryUtils.geometryFromGml(gml, null); }
@TeiidFunction(name=SourceSystemFunctions.ST_GEOMFROMGML, category=FunctionCategoryConstants.GEOMETRY, nullOnNull=true) public static GeometryType geomFromGml(ClobType gml) throws FunctionExecutionException { return GeometryUtils.geometryFromGml(gml, null); }
@TeiidFunction(name=SourceSystemFunctions.ST_GEOMFROMGML, category=FunctionCategoryConstants.GEOMETRY, nullOnNull=true) public static GeometryType geomFromGml(ClobType gml) throws FunctionExecutionException { return GeometryUtils.geometryFromGml(gml, null); }
@TeiidFunction(name=SourceSystemFunctions.ST_GEOMFROMGML, category=FunctionCategoryConstants.GEOMETRY, pushdown=PushDown.CAN_PUSHDOWN, nullOnNull=true) public static GeometryType geomFromGml(ClobType gml, int srid) throws FunctionExecutionException { return GeometryUtils.geometryFromGml(gml, srid); }
@TeiidFunction(name=SourceSystemFunctions.ST_GEOMFROMGML, category=FunctionCategoryConstants.GEOMETRY, pushdown=PushDown.CAN_PUSHDOWN, nullOnNull=true) public static GeometryType geomFromGml(ClobType gml, int srid) throws FunctionExecutionException { return GeometryUtils.geometryFromGml(gml, srid); }
@TeiidFunction(name=SourceSystemFunctions.ST_GEOMFROMGML, category=FunctionCategoryConstants.GEOMETRY, pushdown=PushDown.CAN_PUSHDOWN, nullOnNull=true) public static GeometryType geomFromGml(ClobType gml, int srid) throws FunctionExecutionException { return GeometryUtils.geometryFromGml(gml, srid); }
public static GeometryType geometryFromGml(ClobType gml, Integer srid) throws FunctionExecutionException { try { return geometryFromGml(gml.getCharacterStream(), srid); } catch (SQLException e) { throw new FunctionExecutionException(e); } }
public static GeometryType geometryFromGml(ClobType gml, Integer srid) throws FunctionExecutionException { try { Geometry geom = geometryFromGml(gml.getCharacterStream(), srid); return getGeometryType(geom); } catch (SQLException e) { throw new FunctionExecutionException(e); } }
public static GeometryType geometryFromGml(ClobType gml, Integer srid) throws FunctionExecutionException { try { Geometry geom = geometryFromGml(gml.getCharacterStream(), srid); return getGeometryType(geom); } catch (SQLException e) { throw new FunctionExecutionException(e); } }
@Test public void testGmlParseSrid() throws Exception { String gml = "<gml:Polygon srsName=\"SDO:8307\" xmlns:gml=\"http://www.opengis.net/gml\"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates decimal=\".\" cs=\",\" ts=\" \">5,1 8,1 8,6 5,7 5,1 </gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon>"; GeometryType gt = GeometryUtils.geometryFromGml(new ClobType(ClobImpl.createClob(gml.toCharArray())), null); assertEquals(8307, gt.getSrid()); //oracle will leave of the int with unknown gml = "<gml:Polygon srsName=\"SDO:\" xmlns:gml=\"http://www.opengis.net/gml\"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates decimal=\".\" cs=\",\" ts=\" \">5,1 8,1 8,6 5,7 5,1 </gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon>"; gt = GeometryUtils.geometryFromGml(new ClobType(ClobImpl.createClob(gml.toCharArray())), null); assertEquals(GeometryType.UNKNOWN_SRID, gt.getSrid()); }
if (r != null) { if (desiredType == GeographyType.class) { return GeometryUtils.getGeographyType(GeometryUtils.geometryFromGml(r, gis.getSrid())); return GeometryUtils.geometryFromGml(r, gis.getSrid());
if (r != null) { if (desiredType == GeographyType.class) { return GeometryUtils.getGeographyType(GeometryUtils.geometryFromGml(r, gis.getSrid())); return GeometryUtils.geometryFromGml(r, gis.getSrid());
Reader r = gis.getGml(); if (r != null) { return GeometryUtils.geometryFromGml(r, gis.getSrid());