repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java
KMLWriterDriver.writeKMZ
private void writeKMZ(ProgressVisitor progress, String fileNameWithExtension) throws SQLException { ZipOutputStream zos = null; try { zos = new ZipOutputStream(new FileOutputStream(fileName)); // Create a zip entry for the main KML file zos.putNextEntry(new ZipEntry(f...
java
private void writeKMZ(ProgressVisitor progress, String fileNameWithExtension) throws SQLException { ZipOutputStream zos = null; try { zos = new ZipOutputStream(new FileOutputStream(fileName)); // Create a zip entry for the main KML file zos.putNextEntry(new ZipEntry(f...
[ "private", "void", "writeKMZ", "(", "ProgressVisitor", "progress", ",", "String", "fileNameWithExtension", ")", "throws", "SQLException", "{", "ZipOutputStream", "zos", "=", "null", ";", "try", "{", "zos", "=", "new", "ZipOutputStream", "(", "new", "FileOutputStre...
Write the spatial table to a KMZ format @param progress @param fileNameWithExtension @throws SQLException
[ "Write", "the", "spatial", "table", "to", "a", "KMZ", "format" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java#L109-L140
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java
KMLWriterDriver.writeKMLDocument
private void writeKMLDocument(ProgressVisitor progress, OutputStream outputStream) throws SQLException { // Read Geometry Index and type List<String> spatialFieldNames = SFSUtilities.getGeometryFields(connection, TableLocation.parse(tableName, JDBCUtilities.isH2DataBase(connection.getMetaData()))); ...
java
private void writeKMLDocument(ProgressVisitor progress, OutputStream outputStream) throws SQLException { // Read Geometry Index and type List<String> spatialFieldNames = SFSUtilities.getGeometryFields(connection, TableLocation.parse(tableName, JDBCUtilities.isH2DataBase(connection.getMetaData()))); ...
[ "private", "void", "writeKMLDocument", "(", "ProgressVisitor", "progress", ",", "OutputStream", "outputStream", ")", "throws", "SQLException", "{", "// Read Geometry Index and type", "List", "<", "String", ">", "spatialFieldNames", "=", "SFSUtilities", ".", "getGeometryFi...
Write the KML document Note the document stores only the first geometry column in the placeMark element. The other geomtry columns are ignored. @param progress @param outputStream @throws SQLException
[ "Write", "the", "KML", "document", "Note", "the", "document", "stores", "only", "the", "first", "geometry", "column", "in", "the", "placeMark", "element", ".", "The", "other", "geomtry", "columns", "are", "ignored", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java#L150-L201
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java
KMLWriterDriver.writePlacemark
public void writePlacemark(XMLStreamWriter xmlOut, ResultSet rs, int geoFieldIndex, String spatialFieldName) throws XMLStreamException, SQLException { xmlOut.writeStartElement("Placemark"); if (columnCount > 1) { writeExtendedData(xmlOut, rs); } StringBuilder sb = new StringB...
java
public void writePlacemark(XMLStreamWriter xmlOut, ResultSet rs, int geoFieldIndex, String spatialFieldName) throws XMLStreamException, SQLException { xmlOut.writeStartElement("Placemark"); if (columnCount > 1) { writeExtendedData(xmlOut, rs); } StringBuilder sb = new StringB...
[ "public", "void", "writePlacemark", "(", "XMLStreamWriter", "xmlOut", ",", "ResultSet", "rs", ",", "int", "geoFieldIndex", ",", "String", "spatialFieldName", ")", "throws", "XMLStreamException", ",", "SQLException", "{", "xmlOut", ".", "writeStartElement", "(", "\"P...
A Placemark is a Feature with associated Geometry. Syntax : <Placemark id="ID"> <!-- inherited from Feature element --> <name>...</name> <!-- string --> <visibility>1</visibility> <!-- boolean --> <open>0</open> <!-- boolean --> <atom:author>...<atom:author> <!-- xmlns:atom --> <atom:link href=" "/> <!-- xmlns:atom -...
[ "A", "Placemark", "is", "a", "Feature", "with", "associated", "Geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java#L295-L313
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java
KMLWriterDriver.getKMLType
private static String getKMLType(int sqlTypeId, String sqlTypeName) throws SQLException { switch (sqlTypeId) { case Types.BOOLEAN: return "bool"; case Types.DOUBLE: return "double"; case Types.FLOAT: return "float"; ...
java
private static String getKMLType(int sqlTypeId, String sqlTypeName) throws SQLException { switch (sqlTypeId) { case Types.BOOLEAN: return "bool"; case Types.DOUBLE: return "double"; case Types.FLOAT: return "float"; ...
[ "private", "static", "String", "getKMLType", "(", "int", "sqlTypeId", ",", "String", "sqlTypeName", ")", "throws", "SQLException", "{", "switch", "(", "sqlTypeId", ")", "{", "case", "Types", ".", "BOOLEAN", ":", "return", "\"bool\"", ";", "case", "Types", "....
Return the kml type representation from SQL data type @param sqlTypeId @param sqlTypeName @return @throws SQLException
[ "Return", "the", "kml", "type", "representation", "from", "SQL", "data", "type" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java#L377-L398
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/predicates/ST_Touches.java
ST_Touches.geomTouches
public static Boolean geomTouches(Geometry a,Geometry b) { if(a==null || b==null) { return null; } return a.touches(b); }
java
public static Boolean geomTouches(Geometry a,Geometry b) { if(a==null || b==null) { return null; } return a.touches(b); }
[ "public", "static", "Boolean", "geomTouches", "(", "Geometry", "a", ",", "Geometry", "b", ")", "{", "if", "(", "a", "==", "null", "||", "b", "==", "null", ")", "{", "return", "null", ";", "}", "return", "a", ".", "touches", "(", "b", ")", ";", "}...
Return true if the geometry A touches the geometry B @param a Geometry Geometry. @param b Geometry instance @return true if the geometry A touches the geometry B
[ "Return", "true", "if", "the", "geometry", "A", "touches", "the", "geometry", "B" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/predicates/ST_Touches.java#L50-L55
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveDuplicatedCoordinates.java
ST_RemoveDuplicatedCoordinates.removeCoordinates
public static Geometry removeCoordinates(Geometry geom) { if(geom ==null){ return null; } else if (geom.isEmpty()) { return geom; } else if (geom instanceof Point){ return geom; } else if (geom instanceof MultiPoint) { retur...
java
public static Geometry removeCoordinates(Geometry geom) { if(geom ==null){ return null; } else if (geom.isEmpty()) { return geom; } else if (geom instanceof Point){ return geom; } else if (geom instanceof MultiPoint) { retur...
[ "public", "static", "Geometry", "removeCoordinates", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "geom", ".", "isEmpty", "(", ")", ")", "{", "return", "geom", ";", "}", ...
Removes duplicated coordinates within a geometry. @param geom @return
[ "Removes", "duplicated", "coordinates", "within", "a", "geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveDuplicatedCoordinates.java#L48-L70
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveDuplicatedCoordinates.java
ST_RemoveDuplicatedCoordinates.removeCoordinates
public static MultiPoint removeCoordinates(MultiPoint g) { Coordinate[] coords = CoordinateUtils.removeDuplicatedCoordinates(g.getCoordinates(),false); return FACTORY.createMultiPoint(coords); }
java
public static MultiPoint removeCoordinates(MultiPoint g) { Coordinate[] coords = CoordinateUtils.removeDuplicatedCoordinates(g.getCoordinates(),false); return FACTORY.createMultiPoint(coords); }
[ "public", "static", "MultiPoint", "removeCoordinates", "(", "MultiPoint", "g", ")", "{", "Coordinate", "[", "]", "coords", "=", "CoordinateUtils", ".", "removeDuplicatedCoordinates", "(", "g", ".", "getCoordinates", "(", ")", ",", "false", ")", ";", "return", ...
Removes duplicated coordinates within a MultiPoint. @param g @return
[ "Removes", "duplicated", "coordinates", "within", "a", "MultiPoint", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveDuplicatedCoordinates.java#L79-L82
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWrite.java
KMLWrite.writeKML
public static void writeKML(Connection connection, String fileName, String tableReference) throws SQLException, IOException { KMLDriverFunction kMLDriverFunction = new KMLDriverFunction(); kMLDriverFunction.exportTable(connection, tableReference, URIUtilities.fileFromString(fileName), new EmptyProgressV...
java
public static void writeKML(Connection connection, String fileName, String tableReference) throws SQLException, IOException { KMLDriverFunction kMLDriverFunction = new KMLDriverFunction(); kMLDriverFunction.exportTable(connection, tableReference, URIUtilities.fileFromString(fileName), new EmptyProgressV...
[ "public", "static", "void", "writeKML", "(", "Connection", "connection", ",", "String", "fileName", ",", "String", "tableReference", ")", "throws", "SQLException", ",", "IOException", "{", "KMLDriverFunction", "kMLDriverFunction", "=", "new", "KMLDriverFunction", "(",...
This method is used to write a spatial table into a KML file @param connection @param fileName @param tableReference @throws SQLException @throws IOException
[ "This", "method", "is", "used", "to", "write", "a", "spatial", "table", "into", "a", "KML", "file" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWrite.java#L56-L59
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/EditUtilities.java
EditUtilities.getVertexToSnap
public static GeometryLocation getVertexToSnap(Geometry g, Point p, double tolerance) { DistanceOp distanceOp = new DistanceOp(g, p); GeometryLocation snapedPoint = distanceOp.nearestLocations()[0]; if (tolerance == 0 || snapedPoint.getCoordinate().distance(p.getCoordinate()) <= tolerance) { ...
java
public static GeometryLocation getVertexToSnap(Geometry g, Point p, double tolerance) { DistanceOp distanceOp = new DistanceOp(g, p); GeometryLocation snapedPoint = distanceOp.nearestLocations()[0]; if (tolerance == 0 || snapedPoint.getCoordinate().distance(p.getCoordinate()) <= tolerance) { ...
[ "public", "static", "GeometryLocation", "getVertexToSnap", "(", "Geometry", "g", ",", "Point", "p", ",", "double", "tolerance", ")", "{", "DistanceOp", "distanceOp", "=", "new", "DistanceOp", "(", "g", ",", "p", ")", ";", "GeometryLocation", "snapedPoint", "="...
Gets the coordinate of a Geometry that is the nearest of a given Point, with a distance tolerance. @param g @param p @param tolerance @return
[ "Gets", "the", "coordinate", "of", "a", "Geometry", "that", "is", "the", "nearest", "of", "a", "given", "Point", "with", "a", "distance", "tolerance", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/EditUtilities.java#L44-L52
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_BoundingCircle.java
ST_BoundingCircle.computeBoundingCircle
public static Geometry computeBoundingCircle(Geometry geometry) { if (geometry == null) { return null; } return new MinimumBoundingCircle(geometry).getCircle(); }
java
public static Geometry computeBoundingCircle(Geometry geometry) { if (geometry == null) { return null; } return new MinimumBoundingCircle(geometry).getCircle(); }
[ "public", "static", "Geometry", "computeBoundingCircle", "(", "Geometry", "geometry", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "return", "new", "MinimumBoundingCircle", "(", "geometry", ")", ".", "getCircle", "(", ...
Computes the bounding circle @param geometry @return
[ "Computes", "the", "bounding", "circle" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_BoundingCircle.java#L50-L55
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/internal/DbaseFileWriter.java
DbaseFileWriter.write
public void write(Object[] record) throws IOException, DbaseFileException { if (record.length != header.getNumFields()) { throw new DbaseFileException("Wrong number of fields " + record.length + " expected " + header.getNumFields()); } buffer.position(0); // put the 'not-deleted' marker buffer.put(...
java
public void write(Object[] record) throws IOException, DbaseFileException { if (record.length != header.getNumFields()) { throw new DbaseFileException("Wrong number of fields " + record.length + " expected " + header.getNumFields()); } buffer.position(0); // put the 'not-deleted' marker buffer.put(...
[ "public", "void", "write", "(", "Object", "[", "]", "record", ")", "throws", "IOException", ",", "DbaseFileException", "{", "if", "(", "record", ".", "length", "!=", "header", ".", "getNumFields", "(", ")", ")", "{", "throw", "new", "DbaseFileException", "...
Write a single dbase record. @param record The entries to write. @throws java.io.IOException If IO error occurs. @throws DbaseFileException If the entry doesn't comply to the header.
[ "Write", "a", "single", "dbase", "record", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/internal/DbaseFileWriter.java#L130-L154
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_XMax.java
ST_XMax.getMaxX
public static Double getMaxX(Geometry geom) { if (geom != null) { return geom.getEnvelopeInternal().getMaxX(); } else { return null; } }
java
public static Double getMaxX(Geometry geom) { if (geom != null) { return geom.getEnvelopeInternal().getMaxX(); } else { return null; } }
[ "public", "static", "Double", "getMaxX", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "!=", "null", ")", "{", "return", "geom", ".", "getEnvelopeInternal", "(", ")", ".", "getMaxX", "(", ")", ";", "}", "else", "{", "return", "null", ";", "}"...
Returns the maximal x-value of the given geometry. @param geom Geometry @return The maximal x-value of the given geometry, or null if the geometry is null.
[ "Returns", "the", "maximal", "x", "-", "value", "of", "the", "given", "geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_XMax.java#L48-L54
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java
DelaunayData.put
public void put(Geometry geom, MODE mode) throws IllegalArgumentException { gf = geom.getFactory(); convertedInput = null; // Does not use instanceof here as we must not match for overload of GeometryCollection int dimension; if(geom.getClass().getName().equals(GeometryCollection...
java
public void put(Geometry geom, MODE mode) throws IllegalArgumentException { gf = geom.getFactory(); convertedInput = null; // Does not use instanceof here as we must not match for overload of GeometryCollection int dimension; if(geom.getClass().getName().equals(GeometryCollection...
[ "public", "void", "put", "(", "Geometry", "geom", ",", "MODE", "mode", ")", "throws", "IllegalArgumentException", "{", "gf", "=", "geom", ".", "getFactory", "(", ")", ";", "convertedInput", "=", "null", ";", "// Does not use instanceof here as we must not match for ...
Put a geometry into the data array. Set true to populate the list of points and edges, needed for the ContrainedDelaunayTriangulation. Set false to populate only the list of points. Note the z-value is forced to O when it's equal to NaN. @param geom Geometry @param mode Delaunay mode @throws IllegalArgumentException
[ "Put", "a", "geometry", "into", "the", "data", "array", ".", "Set", "true", "to", "populate", "the", "list", "of", "points", "and", "edges", "needed", "for", "the", "ContrainedDelaunayTriangulation", ".", "Set", "false", "to", "populate", "only", "the", "lis...
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java#L117-L176
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java
DelaunayData.get3DArea
public double get3DArea(){ if(convertedInput != null) { List<DelaunayTriangle> delaunayTriangle = convertedInput.getTriangles(); double sum = 0; for (DelaunayTriangle triangle : delaunayTriangle) { sum += computeTriangleArea3D(triangle); ...
java
public double get3DArea(){ if(convertedInput != null) { List<DelaunayTriangle> delaunayTriangle = convertedInput.getTriangles(); double sum = 0; for (DelaunayTriangle triangle : delaunayTriangle) { sum += computeTriangleArea3D(triangle); ...
[ "public", "double", "get3DArea", "(", ")", "{", "if", "(", "convertedInput", "!=", "null", ")", "{", "List", "<", "DelaunayTriangle", ">", "delaunayTriangle", "=", "convertedInput", ".", "getTriangles", "(", ")", ";", "double", "sum", "=", "0", ";", "for",...
Return the 3D area of all triangles @return
[ "Return", "the", "3D", "area", "of", "all", "triangles" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java#L204-L215
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java
DelaunayData.computeTriangleArea3D
private double computeTriangleArea3D(DelaunayTriangle triangle) { TriangulationPoint[] points = triangle.points; TriangulationPoint p1 = points[0]; TriangulationPoint p2 = points[1]; TriangulationPoint p3 = points[2]; /** * Uses the formula 1/2 * | u x v |...
java
private double computeTriangleArea3D(DelaunayTriangle triangle) { TriangulationPoint[] points = triangle.points; TriangulationPoint p1 = points[0]; TriangulationPoint p2 = points[1]; TriangulationPoint p3 = points[2]; /** * Uses the formula 1/2 * | u x v |...
[ "private", "double", "computeTriangleArea3D", "(", "DelaunayTriangle", "triangle", ")", "{", "TriangulationPoint", "[", "]", "points", "=", "triangle", ".", "points", ";", "TriangulationPoint", "p1", "=", "points", "[", "0", "]", ";", "TriangulationPoint", "p2", ...
Computes the 3D area of a triangle. @param triangle @return
[ "Computes", "the", "3D", "area", "of", "a", "triangle", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java#L223-L254
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java
DelaunayData.addGeometry
private void addGeometry(Geometry geom) throws IllegalArgumentException { if(!geom.isValid()) { throw new IllegalArgumentException("Provided geometry is not valid !"); } if(geom instanceof GeometryCollection) { Map<TriangulationPoint, Integer> pts = new HashMap<Triangulat...
java
private void addGeometry(Geometry geom) throws IllegalArgumentException { if(!geom.isValid()) { throw new IllegalArgumentException("Provided geometry is not valid !"); } if(geom instanceof GeometryCollection) { Map<TriangulationPoint, Integer> pts = new HashMap<Triangulat...
[ "private", "void", "addGeometry", "(", "Geometry", "geom", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "geom", ".", "isValid", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Provided geometry is not valid !\"", ")", ";"...
Add a geometry to the list of points and edges used by the triangulation. @param geom Any geometry @throws IllegalArgumentException
[ "Add", "a", "geometry", "to", "the", "list", "of", "points", "and", "edges", "used", "by", "the", "triangulation", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java#L288-L315
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXLine.java
GPXLine.setAttribute
public final void setAttribute(String currentElement, StringBuilder contentBuffer) { if (currentElement.equalsIgnoreCase(GPXTags.NAME)) { setName(contentBuffer); } else if (currentElement.equalsIgnoreCase(GPXTags.CMT)) { setCmt(contentBuffer); } else if (currentElement.eq...
java
public final void setAttribute(String currentElement, StringBuilder contentBuffer) { if (currentElement.equalsIgnoreCase(GPXTags.NAME)) { setName(contentBuffer); } else if (currentElement.equalsIgnoreCase(GPXTags.CMT)) { setCmt(contentBuffer); } else if (currentElement.eq...
[ "public", "final", "void", "setAttribute", "(", "String", "currentElement", ",", "StringBuilder", "contentBuffer", ")", "{", "if", "(", "currentElement", ".", "equalsIgnoreCase", "(", "GPXTags", ".", "NAME", ")", ")", "{", "setName", "(", "contentBuffer", ")", ...
Set an attribute for a line. The String currentElement gives the information of which attribute have to be setted. The attribute to set is given by the StringBuilder contentBuffer. @param currentElement a string presenting the text of the current markup. @param contentBuffer it contains all informations about the curr...
[ "Set", "an", "attribute", "for", "a", "line", ".", "The", "String", "currentElement", "gives", "the", "information", "of", "which", "attribute", "have", "to", "be", "setted", ".", "The", "attribute", "to", "set", "is", "given", "by", "the", "StringBuilder", ...
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXLine.java#L59-L75
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXLine.java
GPXLine.setLink
public final void setLink(Attributes attributes) { lineValues[GpxMetadata.LINELINK_HREF] = attributes.getValue(GPXTags.HREF); }
java
public final void setLink(Attributes attributes) { lineValues[GpxMetadata.LINELINK_HREF] = attributes.getValue(GPXTags.HREF); }
[ "public", "final", "void", "setLink", "(", "Attributes", "attributes", ")", "{", "lineValues", "[", "GpxMetadata", ".", "LINELINK_HREF", "]", "=", "attributes", ".", "getValue", "(", "GPXTags", ".", "HREF", ")", ";", "}" ]
Set a link to additional information about the route or the track. @param attributes The current attributes being parsed
[ "Set", "a", "link", "to", "additional", "information", "about", "the", "route", "or", "the", "track", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXLine.java#L122-L124
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXLine.java
GPXLine.setNumber
public final void setNumber(StringBuilder contentBuffer) { lineValues[GpxMetadata.LINENUMBER] = Integer.parseInt(contentBuffer.toString()); }
java
public final void setNumber(StringBuilder contentBuffer) { lineValues[GpxMetadata.LINENUMBER] = Integer.parseInt(contentBuffer.toString()); }
[ "public", "final", "void", "setNumber", "(", "StringBuilder", "contentBuffer", ")", "{", "lineValues", "[", "GpxMetadata", ".", "LINENUMBER", "]", "=", "Integer", ".", "parseInt", "(", "contentBuffer", ".", "toString", "(", ")", ")", ";", "}" ]
Set the GPS number to additional information about the route or the track. @param contentBuffer Contains the information to put in the table
[ "Set", "the", "GPS", "number", "to", "additional", "information", "about", "the", "route", "or", "the", "track", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXLine.java#L149-L151
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Densify.java
ST_Densify.densify
public static Geometry densify(Geometry geometry, double tolerance) { if(geometry == null){ return null; } return Densifier.densify(geometry, tolerance); }
java
public static Geometry densify(Geometry geometry, double tolerance) { if(geometry == null){ return null; } return Densifier.densify(geometry, tolerance); }
[ "public", "static", "Geometry", "densify", "(", "Geometry", "geometry", ",", "double", "tolerance", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "return", "Densifier", ".", "densify", "(", "geometry", ",", "tolerance...
Densify a geometry using the given distance tolerance. @param geometry Geometry @param tolerance Distance tolerance @return Densified geometry
[ "Densify", "a", "geometry", "using", "the", "given", "distance", "tolerance", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Densify.java#L51-L56
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/TableUtilities.java
TableUtilities.parseInputTable
public static TableLocation parseInputTable(Connection connection, String inputTable) throws SQLException { return TableLocation.parse(inputTable, JDBCUtilities.isH2DataBase(connection.getMetaData())); }
java
public static TableLocation parseInputTable(Connection connection, String inputTable) throws SQLException { return TableLocation.parse(inputTable, JDBCUtilities.isH2DataBase(connection.getMetaData())); }
[ "public", "static", "TableLocation", "parseInputTable", "(", "Connection", "connection", ",", "String", "inputTable", ")", "throws", "SQLException", "{", "return", "TableLocation", ".", "parse", "(", "inputTable", ",", "JDBCUtilities", ".", "isH2DataBase", "(", "con...
Convert an input table String to a TableLocation @param connection Connection @param inputTable Input table @return corresponding TableLocation @throws SQLException
[ "Convert", "an", "input", "table", "String", "to", "a", "TableLocation" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableUtilities.java#L104-L107
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/TableUtilities.java
TableUtilities.suffixTableLocation
public static TableLocation suffixTableLocation(TableLocation inputTable, String suffix) { return new TableLocation(inputTable.getCatalog(), inputTable.getSchema(), inputTable.getTable() + suffix); }
java
public static TableLocation suffixTableLocation(TableLocation inputTable, String suffix) { return new TableLocation(inputTable.getCatalog(), inputTable.getSchema(), inputTable.getTable() + suffix); }
[ "public", "static", "TableLocation", "suffixTableLocation", "(", "TableLocation", "inputTable", ",", "String", "suffix", ")", "{", "return", "new", "TableLocation", "(", "inputTable", ".", "getCatalog", "(", ")", ",", "inputTable", ".", "getSchema", "(", ")", ",...
Suffix a TableLocation @param inputTable Input table @param suffix Suffix @return suffixed TableLocation
[ "Suffix", "a", "TableLocation" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableUtilities.java#L118-L122
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/TableUtilities.java
TableUtilities.caseIdentifier
public static String caseIdentifier(TableLocation requestedTable, String tableName, boolean isH2) { return new TableLocation(requestedTable.getCatalog(), requestedTable.getSchema(), TableLocation.parse(tableName, isH2).getTable()).toString(); }
java
public static String caseIdentifier(TableLocation requestedTable, String tableName, boolean isH2) { return new TableLocation(requestedTable.getCatalog(), requestedTable.getSchema(), TableLocation.parse(tableName, isH2).getTable()).toString(); }
[ "public", "static", "String", "caseIdentifier", "(", "TableLocation", "requestedTable", ",", "String", "tableName", ",", "boolean", "isH2", ")", "{", "return", "new", "TableLocation", "(", "requestedTable", ".", "getCatalog", "(", ")", ",", "requestedTable", ".", ...
Return the table identifier in the best fit depending on database type @param requestedTable Catalog and schema used @param tableName Table without quotes @param isH2 True if H2, false if PostGRES @return Find table identifier
[ "Return", "the", "table", "identifier", "in", "the", "best", "fit", "depending", "on", "database", "type" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableUtilities.java#L133-L136
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateSequenceDimensionFilter.java
CoordinateSequenceDimensionFilter.apply
public static CoordinateSequenceDimensionFilter apply(Geometry geometry) { CoordinateSequenceDimensionFilter cd = new CoordinateSequenceDimensionFilter(); geometry.apply(cd); return cd; }
java
public static CoordinateSequenceDimensionFilter apply(Geometry geometry) { CoordinateSequenceDimensionFilter cd = new CoordinateSequenceDimensionFilter(); geometry.apply(cd); return cd; }
[ "public", "static", "CoordinateSequenceDimensionFilter", "apply", "(", "Geometry", "geometry", ")", "{", "CoordinateSequenceDimensionFilter", "cd", "=", "new", "CoordinateSequenceDimensionFilter", "(", ")", ";", "geometry", ".", "apply", "(", "cd", ")", ";", "return",...
Init CoordinateSequenceDimensionFilter object. @param geometry Geometry instance @return CoordinateSequenceDimensionFilter instance
[ "Init", "CoordinateSequenceDimensionFilter", "object", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateSequenceDimensionFilter.java#L76-L80
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/internal/DbaseFileHeader.java
DbaseFileHeader.removeColumn
public int removeColumn(String inFieldName) { int retCol = -1; int tempLength = 1; DbaseField[] tempFieldDescriptors = new DbaseField[fields.length - 1]; for (int i = 0, j = 0; i < fields.length; i++) { if (!inFieldName.equalsIgnoreCase(fields[i].fieldName.trim())) { // if this is the last field and we ...
java
public int removeColumn(String inFieldName) { int retCol = -1; int tempLength = 1; DbaseField[] tempFieldDescriptors = new DbaseField[fields.length - 1]; for (int i = 0, j = 0; i < fields.length; i++) { if (!inFieldName.equalsIgnoreCase(fields[i].fieldName.trim())) { // if this is the last field and we ...
[ "public", "int", "removeColumn", "(", "String", "inFieldName", ")", "{", "int", "retCol", "=", "-", "1", ";", "int", "tempLength", "=", "1", ";", "DbaseField", "[", "]", "tempFieldDescriptors", "=", "new", "DbaseField", "[", "fields", ".", "length", "-", ...
Remove a column from this DbaseFileHeader. @todo This is really ugly, don't know who wrote it, but it needs fixin... @param inFieldName The name of the field, will ignore case and trim. @return index of the removed column, -1 if no found
[ "Remove", "a", "column", "from", "this", "DbaseFileHeader", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/internal/DbaseFileHeader.java#L319-L348
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/internal/DbaseFileHeader.java
DbaseFileHeader.setEncoding
public boolean setEncoding(String encoding) { for(Map.Entry<Byte, String> entry : CODE_PAGE_ENCODING.entrySet()) { if(entry.getValue().equalsIgnoreCase(encoding)) { this.fileEncoding = entry.getValue(); return true; } } return false; }
java
public boolean setEncoding(String encoding) { for(Map.Entry<Byte, String> entry : CODE_PAGE_ENCODING.entrySet()) { if(entry.getValue().equalsIgnoreCase(encoding)) { this.fileEncoding = entry.getValue(); return true; } } return false; }
[ "public", "boolean", "setEncoding", "(", "String", "encoding", ")", "{", "for", "(", "Map", ".", "Entry", "<", "Byte", ",", "String", ">", "entry", ":", "CODE_PAGE_ENCODING", ".", "entrySet", "(", ")", ")", "{", "if", "(", "entry", ".", "getValue", "("...
Set file encoding @param encoding Encoding to set @return True if the encoding can be set to DBF file
[ "Set", "file", "encoding" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/internal/DbaseFileHeader.java#L599-L607
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/internal/DbaseFileHeader.java
DbaseFileHeader.writeHeader
public void writeHeader(WritableByteChannel out) throws IOException { // take care of the annoying case where no records have been added... if (headerLength == -1) { headerLength = MINIMUM_HEADER; } ByteBuffer buffer = ByteBuffer.allocateDirect(headerLength); buffer.order(ByteOrder.LITTLE_ENDIAN); // wr...
java
public void writeHeader(WritableByteChannel out) throws IOException { // take care of the annoying case where no records have been added... if (headerLength == -1) { headerLength = MINIMUM_HEADER; } ByteBuffer buffer = ByteBuffer.allocateDirect(headerLength); buffer.order(ByteOrder.LITTLE_ENDIAN); // wr...
[ "public", "void", "writeHeader", "(", "WritableByteChannel", "out", ")", "throws", "IOException", "{", "// take care of the annoying case where no records have been added...", "if", "(", "headerLength", "==", "-", "1", ")", "{", "headerLength", "=", "MINIMUM_HEADER", ";",...
Write the header data to the DBF file. @param out A channel to write to. If you have an OutputStream you can obtain the correct channel by using java.nio.Channels.newChannel(OutputStream out). @throws java.io.IOException If errors occur.
[ "Write", "the", "header", "data", "to", "the", "DBF", "file", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/internal/DbaseFileHeader.java#L628-L704
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_ZMax.java
ST_ZMax.getMaxZ
public static Double getMaxZ(Geometry geom) { if (geom != null) { return CoordinateUtils.zMinMax(geom.getCoordinates())[1]; } else { return null; } }
java
public static Double getMaxZ(Geometry geom) { if (geom != null) { return CoordinateUtils.zMinMax(geom.getCoordinates())[1]; } else { return null; } }
[ "public", "static", "Double", "getMaxZ", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "!=", "null", ")", "{", "return", "CoordinateUtils", ".", "zMinMax", "(", "geom", ".", "getCoordinates", "(", ")", ")", "[", "1", "]", ";", "}", "else", "{...
Returns the maximal z-value of the given geometry. @param geom Geometry @return The maximal z-value of the given geometry, or null if the geometry is null.
[ "Returns", "the", "maximal", "z", "-", "value", "of", "the", "given", "geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_ZMax.java#L49-L55
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/SHPDriverFunction.java
SHPDriverFunction.exportTable
@Override public void exportTable(Connection connection, String tableReference, File fileName, ProgressVisitor progress, String encoding) throws SQLException, IOException { final boolean isH2 = JDBCUtilities.isH2DataBase(connection.getMetaData()); String regex = ".*(?i)\\b(select|from)\\b.*"; ...
java
@Override public void exportTable(Connection connection, String tableReference, File fileName, ProgressVisitor progress, String encoding) throws SQLException, IOException { final boolean isH2 = JDBCUtilities.isH2DataBase(connection.getMetaData()); String regex = ".*(?i)\\b(select|from)\\b.*"; ...
[ "@", "Override", "public", "void", "exportTable", "(", "Connection", "connection", ",", "String", "tableReference", ",", "File", "fileName", ",", "ProgressVisitor", "progress", ",", "String", "encoding", ")", "throws", "SQLException", ",", "IOException", "{", "fin...
Save a table or a query to a shpfile @param connection Active connection, do not close this connection. @param tableReference [[catalog.]schema.]table reference @param fileName File path to write, if exists it may be replaced @param progress to display the IO progress @param encoding File encoding, null will use defaul...
[ "Save", "a", "table", "or", "a", "query", "to", "a", "shpfile" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/SHPDriverFunction.java#L75-L122
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/SHPDriverFunction.java
SHPDriverFunction.doExport
private int doExport(String tableReference, List<String> spatialFieldNames, ResultSet rs, int recordCount, File fileName, ProgressVisitor progress, String encoding) throws SQLException, IOException { if (spatialFieldNames.isEmpty()) { throw new SQLException(String.format("The table or the query %s d...
java
private int doExport(String tableReference, List<String> spatialFieldNames, ResultSet rs, int recordCount, File fileName, ProgressVisitor progress, String encoding) throws SQLException, IOException { if (spatialFieldNames.isEmpty()) { throw new SQLException(String.format("The table or the query %s d...
[ "private", "int", "doExport", "(", "String", "tableReference", ",", "List", "<", "String", ">", "spatialFieldNames", ",", "ResultSet", "rs", ",", "int", "recordCount", ",", "File", "fileName", ",", "ProgressVisitor", "progress", ",", "String", "encoding", ")", ...
Method to export a resulset into a shapefile @param connection Active connection, do not close this connection. @param selectQuery the select query to export @param fileName File path to write, if exists it may be replaced @param progress to display the IO progress @param encoding File encoding, null will use default e...
[ "Method", "to", "export", "a", "resulset", "into", "a", "shapefile" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/SHPDriverFunction.java#L133-L187
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/SHPDriverFunction.java
SHPDriverFunction.getShapeTypeFromGeometryMetaData
private static ShapeType getShapeTypeFromGeometryMetaData(GeometryMetaData meta) throws SQLException { ShapeType shapeType; switch (meta.geometryType) { case GeometryTypeCodes.MULTILINESTRING: case GeometryTypeCodes.LINESTRING: case GeometryTypeCodes.MULTILINESTRINGM:...
java
private static ShapeType getShapeTypeFromGeometryMetaData(GeometryMetaData meta) throws SQLException { ShapeType shapeType; switch (meta.geometryType) { case GeometryTypeCodes.MULTILINESTRING: case GeometryTypeCodes.LINESTRING: case GeometryTypeCodes.MULTILINESTRINGM:...
[ "private", "static", "ShapeType", "getShapeTypeFromGeometryMetaData", "(", "GeometryMetaData", "meta", ")", "throws", "SQLException", "{", "ShapeType", "shapeType", ";", "switch", "(", "meta", ".", "geometryType", ")", "{", "case", "GeometryTypeCodes", ".", "MULTILINE...
Return the shape type supported by the shapefile format @param meta @return @throws SQLException
[ "Return", "the", "shape", "type", "supported", "by", "the", "shapefile", "format" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/SHPDriverFunction.java#L333-L358
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseGeoJson
private void parseGeoJson(ProgressVisitor progress) throws SQLException, IOException { this.progress = progress.subProcess(100); init(); if (parseMetadata()) { GF = new GeometryFactory(new PrecisionModel(), parsedSRID); parseData(); setGeometryTypeConstraints(...
java
private void parseGeoJson(ProgressVisitor progress) throws SQLException, IOException { this.progress = progress.subProcess(100); init(); if (parseMetadata()) { GF = new GeometryFactory(new PrecisionModel(), parsedSRID); parseData(); setGeometryTypeConstraints(...
[ "private", "void", "parseGeoJson", "(", "ProgressVisitor", "progress", ")", "throws", "SQLException", ",", "IOException", "{", "this", ".", "progress", "=", "progress", ".", "subProcess", "(", "100", ")", ";", "init", "(", ")", ";", "if", "(", "parseMetadata...
Parses a GeoJSON 1.0 file and writes it to a table. A GeoJSON file is structured as follows: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": [102.0, 0.5]}, "properties": {"prop0": "value0"} }, { "type": "Feature", "geometry": { "type": "LineString", "coor...
[ "Parses", "a", "GeoJSON", "1", ".", "0", "file", "and", "writes", "it", "to", "a", "table", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L151-L161
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseMetadata
private boolean parseMetadata() throws SQLException, IOException { FileInputStream fis = null; try { fis = new FileInputStream(fileName); this.fc = fis.getChannel(); this.fileSize = fc.size(); // Given the file size and ...
java
private boolean parseMetadata() throws SQLException, IOException { FileInputStream fis = null; try { fis = new FileInputStream(fileName); this.fc = fis.getChannel(); this.fileSize = fc.size(); // Given the file size and ...
[ "private", "boolean", "parseMetadata", "(", ")", "throws", "SQLException", ",", "IOException", "{", "FileInputStream", "fis", "=", "null", ";", "try", "{", "fis", "=", "new", "FileInputStream", "(", "fileName", ")", ";", "this", ".", "fc", "=", "fis", ".",...
Parses the all GeoJSON feature to create the PreparedStatement. @throws SQLException @throws IOException
[ "Parses", "the", "all", "GeoJSON", "feature", "to", "create", "the", "PreparedStatement", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L170-L246
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseFeaturesMetadata
private void parseFeaturesMetadata(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME features // Passes all the properties until "Feature" object is found while(!jp.getText().equalsIgnoreCase(GeoJsonField.FEATURES) && !jp.getText().equalsIgnoreCase(G...
java
private void parseFeaturesMetadata(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME features // Passes all the properties until "Feature" object is found while(!jp.getText().equalsIgnoreCase(GeoJsonField.FEATURES) && !jp.getText().equalsIgnoreCase(G...
[ "private", "void", "parseFeaturesMetadata", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "jp", ".", "nextToken", "(", ")", ";", "// FIELD_NAME features", "// Passes all the properties until \"Feature\" object is found", "while", "(", "!...
Parses the featureCollection to collect the field properties @param jp @throws IOException @throws SQLException
[ "Parses", "the", "featureCollection", "to", "collect", "the", "field", "properties" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L255-L300
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseFeatureMetadata
private void parseFeatureMetadata(JsonParser jp) throws IOException, SQLException { jp.nextToken(); String field = jp.getText(); //Avoid all token which are not 'properties', 'geometry', 'type' while (!field.equalsIgnoreCase(GeoJsonField.GEOMETRY) && !field.equalsIgnoreCa...
java
private void parseFeatureMetadata(JsonParser jp) throws IOException, SQLException { jp.nextToken(); String field = jp.getText(); //Avoid all token which are not 'properties', 'geometry', 'type' while (!field.equalsIgnoreCase(GeoJsonField.GEOMETRY) && !field.equalsIgnoreCa...
[ "private", "void", "parseFeatureMetadata", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "jp", ".", "nextToken", "(", ")", ";", "String", "field", "=", "jp", ".", "getText", "(", ")", ";", "//Avoid all token which are not 'prop...
Features in GeoJSON contain a geometry object and additional properties This method is used to collect metadata Syntax: { "type": "Feature", "geometry":{"type": "Point", "coordinates": [102.0, 0.5]}, "properties": {"prop0": "value0"} } @param jp
[ "Features", "in", "GeoJSON", "contain", "a", "geometry", "object", "and", "additional", "properties", "This", "method", "is", "used", "to", "collect", "metadata" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L313-L362
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseParentGeometryMetadata
private void parseParentGeometryMetadata(JsonParser jp) throws IOException, SQLException { if(jp.nextToken()!=JsonToken.VALUE_NULL){//START_OBJECT { in case of null geometry jp.nextToken(); // FIELD_NAME type jp.nextToken(); //VALUE_STRING Point String geometryType = jp.getText(); ...
java
private void parseParentGeometryMetadata(JsonParser jp) throws IOException, SQLException { if(jp.nextToken()!=JsonToken.VALUE_NULL){//START_OBJECT { in case of null geometry jp.nextToken(); // FIELD_NAME type jp.nextToken(); //VALUE_STRING Point String geometryType = jp.getText(); ...
[ "private", "void", "parseParentGeometryMetadata", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "if", "(", "jp", ".", "nextToken", "(", ")", "!=", "JsonToken", ".", "VALUE_NULL", ")", "{", "//START_OBJECT { in case of null geometry...
Parses the geometries to return its properties @param jp @throws IOException @throws SQLException
[ "Parses", "the", "geometries", "to", "return", "its", "properties" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L372-L380
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseGeometryMetadata
private void parseGeometryMetadata(JsonParser jp, String geometryType) throws IOException, SQLException { if (geometryType.equalsIgnoreCase(GeoJsonField.POINT)) { parsePointMetadata(jp); finalGeometryTypes.add(GeoJsonField.POINT); } else if (geometryType.equalsIgnoreCas...
java
private void parseGeometryMetadata(JsonParser jp, String geometryType) throws IOException, SQLException { if (geometryType.equalsIgnoreCase(GeoJsonField.POINT)) { parsePointMetadata(jp); finalGeometryTypes.add(GeoJsonField.POINT); } else if (geometryType.equalsIgnoreCas...
[ "private", "void", "parseGeometryMetadata", "(", "JsonParser", "jp", ",", "String", "geometryType", ")", "throws", "IOException", ",", "SQLException", "{", "if", "(", "geometryType", ".", "equalsIgnoreCase", "(", "GeoJsonField", ".", "POINT", ")", ")", "{", "par...
Parses a all type of geometries and check if the geojson is wellformed. Syntax: "geometry":{"type": "Point", "coordinates": [102.0,0.5]} @param jp @throws IOException
[ "Parses", "a", "all", "type", "of", "geometries", "and", "check", "if", "the", "geojson", "is", "wellformed", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L392-L417
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parsePointMetadata
private void parsePointMetadata(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME coordinates String coordinatesField = jp.getText(); if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) { jp.nextToken(); // START_ARRAY [ to parse the...
java
private void parsePointMetadata(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME coordinates String coordinatesField = jp.getText(); if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) { jp.nextToken(); // START_ARRAY [ to parse the...
[ "private", "void", "parsePointMetadata", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "jp", ".", "nextToken", "(", ")", ";", "// FIELD_NAME coordinates ", "String", "coordinatesField", "=", "jp", ".", "getText", "(", ")",...
Parses a point and check if it's wellformated Syntax: { "type": "Point", "coordinates": [100.0, 0.0] } @param jp @throws IOException
[ "Parses", "a", "point", "and", "check", "if", "it", "s", "wellformated" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L429-L438
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseCoordinateMetadata
private void parseCoordinateMetadata(JsonParser jp) throws IOException { jp.nextToken(); jp.nextToken(); // second value //We look for a z value jp.nextToken(); if (jp.getCurrentToken() != JsonToken.END_ARRAY) { jp.nextToken(); // exit array } jp.nextT...
java
private void parseCoordinateMetadata(JsonParser jp) throws IOException { jp.nextToken(); jp.nextToken(); // second value //We look for a z value jp.nextToken(); if (jp.getCurrentToken() != JsonToken.END_ARRAY) { jp.nextToken(); // exit array } jp.nextT...
[ "private", "void", "parseCoordinateMetadata", "(", "JsonParser", "jp", ")", "throws", "IOException", "{", "jp", ".", "nextToken", "(", ")", ";", "jp", ".", "nextToken", "(", ")", ";", "// second value", "//We look for a z value", "jp", ".", "nextToken", "(", "...
Parses a GeoJSON coordinate array and check if it's wellformed. The first token corresponds to the first X value. The last token correponds to the end of the coordinate array "]". Parsed syntax: 100.0, 0.0] @param jp @throws IOException @return Coordinate
[ "Parses", "a", "GeoJSON", "coordinate", "array", "and", "check", "if", "it", "s", "wellformed", ".", "The", "first", "token", "corresponds", "to", "the", "first", "X", "value", ".", "The", "last", "token", "correponds", "to", "the", "end", "of", "the", "...
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L640-L649
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.init
private void init() { jsFactory = new JsonFactory(); jsFactory.configure(JsonParser.Feature.ALLOW_COMMENTS, true); jsFactory.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); jsFactory.configure(JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS, true); }
java
private void init() { jsFactory = new JsonFactory(); jsFactory.configure(JsonParser.Feature.ALLOW_COMMENTS, true); jsFactory.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); jsFactory.configure(JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS, true); }
[ "private", "void", "init", "(", ")", "{", "jsFactory", "=", "new", "JsonFactory", "(", ")", ";", "jsFactory", ".", "configure", "(", "JsonParser", ".", "Feature", ".", "ALLOW_COMMENTS", ",", "true", ")", ";", "jsFactory", ".", "configure", "(", "JsonParser...
Creates the JsonFactory.
[ "Creates", "the", "JsonFactory", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L719-L724
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseFeature
private Object[] parseFeature(JsonParser jp) throws IOException, SQLException { jp.nextToken(); String field = jp.getText(); //Avoid all token which are not 'properties', 'geometry', 'type' while (!field.equalsIgnoreCase(GeoJsonField.GEOMETRY) && !field.equalsIgnoreCase(G...
java
private Object[] parseFeature(JsonParser jp) throws IOException, SQLException { jp.nextToken(); String field = jp.getText(); //Avoid all token which are not 'properties', 'geometry', 'type' while (!field.equalsIgnoreCase(GeoJsonField.GEOMETRY) && !field.equalsIgnoreCase(G...
[ "private", "Object", "[", "]", "parseFeature", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "jp", ".", "nextToken", "(", ")", ";", "String", "field", "=", "jp", ".", "getText", "(", ")", ";", "//Avoid all token which are n...
Features in GeoJSON contain a geometry object and additional properties This method returns all values stored in a feature. Syntax: { "type": "Feature", "geometry":{"type": "Point", "coordinates": [102.0, 0.5]}, "properties": {"prop0": "value0"} } @param jp
[ "Features", "in", "GeoJSON", "contain", "a", "geometry", "object", "and", "additional", "properties", "This", "method", "returns", "all", "values", "stored", "in", "a", "feature", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L739-L787
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseFeatures
private void parseFeatures(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME features // Passes all the properties until "Feature" object is found while(!jp.getText().equalsIgnoreCase(GeoJsonField.FEATURES) && !jp.getText().equalsIgnoreCase(GeoJsonFi...
java
private void parseFeatures(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME features // Passes all the properties until "Feature" object is found while(!jp.getText().equalsIgnoreCase(GeoJsonField.FEATURES) && !jp.getText().equalsIgnoreCase(GeoJsonFi...
[ "private", "void", "parseFeatures", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "jp", ".", "nextToken", "(", ")", ";", "// FIELD_NAME features", "// Passes all the properties until \"Feature\" object is found", "while", "(", "!", "jp...
Parses the featureCollection @param jp @throws IOException @throws SQLException
[ "Parses", "the", "featureCollection" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L883-L946
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseData
private void parseData() throws IOException, SQLException { FileInputStream fis = null; try { fis = new FileInputStream(fileName); try (JsonParser jp = jsFactory.createParser(fis)) { jp.nextToken();//START_OBJECT jp.nextToken(); // field_name (type...
java
private void parseData() throws IOException, SQLException { FileInputStream fis = null; try { fis = new FileInputStream(fileName); try (JsonParser jp = jsFactory.createParser(fis)) { jp.nextToken();//START_OBJECT jp.nextToken(); // field_name (type...
[ "private", "void", "parseData", "(", ")", "throws", "IOException", ",", "SQLException", "{", "FileInputStream", "fis", "=", "null", ";", "try", "{", "fis", "=", "new", "FileInputStream", "(", "fileName", ")", ";", "try", "(", "JsonParser", "jp", "=", "jsFa...
Parses the GeoJSON data and set the values to the table. @throws IOException @throws SQLException
[ "Parses", "the", "GeoJSON", "data", "and", "set", "the", "values", "to", "the", "table", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L1243-L1270
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.readCRS
private int readCRS(JsonParser jp) throws IOException, SQLException { int srid = 0; jp.nextToken(); //START_OBJECT { jp.nextToken();// crs type jp.nextToken(); // crs name String firstField = jp.getText(); if(firstField.equalsIgnoreCase(GeoJsonField.NAME)){ jp...
java
private int readCRS(JsonParser jp) throws IOException, SQLException { int srid = 0; jp.nextToken(); //START_OBJECT { jp.nextToken();// crs type jp.nextToken(); // crs name String firstField = jp.getText(); if(firstField.equalsIgnoreCase(GeoJsonField.NAME)){ jp...
[ "private", "int", "readCRS", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "int", "srid", "=", "0", ";", "jp", ".", "nextToken", "(", ")", ";", "//START_OBJECT {", "jp", ".", "nextToken", "(", ")", ";", "// crs type", "...
Reads the CRS element and return the database SRID. Parsed syntax: "crs":{ "type":"name", "properties": {"name":"urn:ogc:def:crs:EPSG::4326" } } @param jp @return
[ "Reads", "the", "CRS", "element", "and", "return", "the", "database", "SRID", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L1287-L1322
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.skipCRS
private String skipCRS(JsonParser jp) throws IOException { jp.nextToken(); //START_OBJECT { jp.skipChildren(); jp.nextToken(); //Go to features return jp.getText(); }
java
private String skipCRS(JsonParser jp) throws IOException { jp.nextToken(); //START_OBJECT { jp.skipChildren(); jp.nextToken(); //Go to features return jp.getText(); }
[ "private", "String", "skipCRS", "(", "JsonParser", "jp", ")", "throws", "IOException", "{", "jp", ".", "nextToken", "(", ")", ";", "//START_OBJECT {", "jp", ".", "skipChildren", "(", ")", ";", "jp", ".", "nextToken", "(", ")", ";", "//Go to features", "ret...
We skip the CRS because it has been already parsed. @param jp
[ "We", "skip", "the", "CRS", "because", "it", "has", "been", "already", "parsed", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L1330-L1335
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.setGeometryTypeConstraints
private void setGeometryTypeConstraints() throws SQLException { String finalGeometryType = GeoJsonField.GEOMETRY; if (finalGeometryTypes.size() == 1) { finalGeometryType = (String) finalGeometryTypes.iterator().next(); } if(isH2){ finalGeometryType = GeoJ...
java
private void setGeometryTypeConstraints() throws SQLException { String finalGeometryType = GeoJsonField.GEOMETRY; if (finalGeometryTypes.size() == 1) { finalGeometryType = (String) finalGeometryTypes.iterator().next(); } if(isH2){ finalGeometryType = GeoJ...
[ "private", "void", "setGeometryTypeConstraints", "(", ")", "throws", "SQLException", "{", "String", "finalGeometryType", "=", "GeoJsonField", ".", "GEOMETRY", ";", "if", "(", "finalGeometryTypes", ".", "size", "(", ")", "==", "1", ")", "{", "finalGeometryType", ...
Adds the geometry type constraint and the SRID
[ "Adds", "the", "geometry", "type", "constraint", "and", "the", "SRID" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L1340-L1352
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java
ST_Split.split
public static Geometry split(Geometry geomA, Geometry geomB, double tolerance) throws SQLException { if (geomA instanceof Polygon) { throw new SQLException("Split a Polygon by a line is not supported using a tolerance. \n" + "Please used ST_Split(geom1, geom2)"); } else i...
java
public static Geometry split(Geometry geomA, Geometry geomB, double tolerance) throws SQLException { if (geomA instanceof Polygon) { throw new SQLException("Split a Polygon by a line is not supported using a tolerance. \n" + "Please used ST_Split(geom1, geom2)"); } else i...
[ "public", "static", "Geometry", "split", "(", "Geometry", "geomA", ",", "Geometry", "geomB", ",", "double", "tolerance", ")", "throws", "SQLException", "{", "if", "(", "geomA", "instanceof", "Polygon", ")", "{", "throw", "new", "SQLException", "(", "\"Split a ...
Split a geometry a according a geometry b using a snapping tolerance. This function support only the operations : - split a line or a multiline with a point. @param geomA the geometry to be splited @param geomB the geometry used to split @param tolerance a distance tolerance to snap the split geometry @return @throw...
[ "Split", "a", "geometry", "a", "according", "a", "geometry", "b", "using", "a", "snapping", "tolerance", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java#L109-L129
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java
ST_Split.splitLineWithPoint
private static MultiLineString splitLineWithPoint(LineString line, Point pointToSplit, double tolerance) { return FACTORY.createMultiLineString(splitLineStringWithPoint(line, pointToSplit, tolerance)); }
java
private static MultiLineString splitLineWithPoint(LineString line, Point pointToSplit, double tolerance) { return FACTORY.createMultiLineString(splitLineStringWithPoint(line, pointToSplit, tolerance)); }
[ "private", "static", "MultiLineString", "splitLineWithPoint", "(", "LineString", "line", ",", "Point", "pointToSplit", ",", "double", "tolerance", ")", "{", "return", "FACTORY", ".", "createMultiLineString", "(", "splitLineStringWithPoint", "(", "line", ",", "pointToS...
Split a linestring with a point The point must be on the linestring @param line @param pointToSplit @return
[ "Split", "a", "linestring", "with", "a", "point", "The", "point", "must", "be", "on", "the", "linestring" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java#L138-L140
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java
ST_Split.splitLineStringWithPoint
private static LineString[] splitLineStringWithPoint(LineString line, Point pointToSplit, double tolerance) { Coordinate[] coords = line.getCoordinates(); Coordinate firstCoord = coords[0]; Coordinate lastCoord = coords[coords.length - 1]; Coordinate coordToSplit = pointToSplit.getCoordi...
java
private static LineString[] splitLineStringWithPoint(LineString line, Point pointToSplit, double tolerance) { Coordinate[] coords = line.getCoordinates(); Coordinate firstCoord = coords[0]; Coordinate lastCoord = coords[coords.length - 1]; Coordinate coordToSplit = pointToSplit.getCoordi...
[ "private", "static", "LineString", "[", "]", "splitLineStringWithPoint", "(", "LineString", "line", ",", "Point", "pointToSplit", ",", "double", "tolerance", ")", "{", "Coordinate", "[", "]", "coords", "=", "line", ".", "getCoordinates", "(", ")", ";", "Coordi...
Splits a LineString using a Point, with a distance tolerance. @param line @param pointToSplit @param tolerance @return
[ "Splits", "a", "LineString", "using", "a", "Point", "with", "a", "distance", "tolerance", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java#L150-L187
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java
ST_Split.splitMultiLineStringWithPoint
private static MultiLineString splitMultiLineStringWithPoint(MultiLineString multiLineString, Point pointToSplit, double tolerance) { ArrayList<LineString> linestrings = new ArrayList<LineString>(); boolean notChanged = true; int nb = multiLineString.getNumGeometries(); for (int i = 0; i...
java
private static MultiLineString splitMultiLineStringWithPoint(MultiLineString multiLineString, Point pointToSplit, double tolerance) { ArrayList<LineString> linestrings = new ArrayList<LineString>(); boolean notChanged = true; int nb = multiLineString.getNumGeometries(); for (int i = 0; i...
[ "private", "static", "MultiLineString", "splitMultiLineStringWithPoint", "(", "MultiLineString", "multiLineString", ",", "Point", "pointToSplit", ",", "double", "tolerance", ")", "{", "ArrayList", "<", "LineString", ">", "linestrings", "=", "new", "ArrayList", "<", "L...
Splits a MultilineString using a point. @param multiLineString @param pointToSplit @param tolerance @return
[ "Splits", "a", "MultilineString", "using", "a", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java#L197-L215
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java
ST_Split.splitPolygonizer
private static Collection<Polygon> splitPolygonizer(Polygon polygon, LineString lineString) throws SQLException { LinkedList<LineString> result = new LinkedList<LineString>(); ST_ToMultiSegments.createSegments(polygon.getExteriorRing(), result); result.add(lineString); int holes = polygo...
java
private static Collection<Polygon> splitPolygonizer(Polygon polygon, LineString lineString) throws SQLException { LinkedList<LineString> result = new LinkedList<LineString>(); ST_ToMultiSegments.createSegments(polygon.getExteriorRing(), result); result.add(lineString); int holes = polygo...
[ "private", "static", "Collection", "<", "Polygon", ">", "splitPolygonizer", "(", "Polygon", "polygon", ",", "LineString", "lineString", ")", "throws", "SQLException", "{", "LinkedList", "<", "LineString", ">", "result", "=", "new", "LinkedList", "<", "LineString",...
Splits a Polygon with a LineString. @param polygon @param lineString @return
[ "Splits", "a", "Polygon", "with", "a", "LineString", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java#L224-L245
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java
ST_Split.splitMultiPolygonWithLine
private static Geometry splitMultiPolygonWithLine(MultiPolygon multiPolygon, LineString lineString) throws SQLException { ArrayList<Polygon> allPolygons = new ArrayList<Polygon>(); for (int i = 0; i < multiPolygon.getNumGeometries(); i++) { Collection<Polygon> polygons = splitPolygonizer((Po...
java
private static Geometry splitMultiPolygonWithLine(MultiPolygon multiPolygon, LineString lineString) throws SQLException { ArrayList<Polygon> allPolygons = new ArrayList<Polygon>(); for (int i = 0; i < multiPolygon.getNumGeometries(); i++) { Collection<Polygon> polygons = splitPolygonizer((Po...
[ "private", "static", "Geometry", "splitMultiPolygonWithLine", "(", "MultiPolygon", "multiPolygon", ",", "LineString", "lineString", ")", "throws", "SQLException", "{", "ArrayList", "<", "Polygon", ">", "allPolygons", "=", "new", "ArrayList", "<", "Polygon", ">", "("...
Splits a MultiPolygon using a LineString. @param multiPolygon @param lineString @return
[ "Splits", "a", "MultiPolygon", "using", "a", "LineString", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java#L290-L302
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java
ST_Split.splitMultiLineStringWithLine
private static Geometry splitMultiLineStringWithLine(MultiLineString input, LineString cut) { Geometry lines = input.difference(cut); //Only to preserve SQL constrains if (lines instanceof LineString) { return FACTORY.createMultiLineString(new LineString[]{(LineString) lines.getGeome...
java
private static Geometry splitMultiLineStringWithLine(MultiLineString input, LineString cut) { Geometry lines = input.difference(cut); //Only to preserve SQL constrains if (lines instanceof LineString) { return FACTORY.createMultiLineString(new LineString[]{(LineString) lines.getGeome...
[ "private", "static", "Geometry", "splitMultiLineStringWithLine", "(", "MultiLineString", "input", ",", "LineString", "cut", ")", "{", "Geometry", "lines", "=", "input", ".", "difference", "(", "cut", ")", ";", "//Only to preserve SQL constrains", "if", "(", "lines",...
Splits the specified MultiLineString with another lineString. @param MultiLineString @param lineString
[ "Splits", "the", "specified", "MultiLineString", "with", "another", "lineString", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java#L322-L329
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_NumInteriorRings.java
ST_NumInteriorRings.getHoles
public static Integer getHoles(Geometry g) { if(g == null) { return null; } if (g instanceof MultiPolygon) { Polygon p = (Polygon) g.getGeometryN(0); if(p!=null){ return p.getNumInteriorRing(); } } el...
java
public static Integer getHoles(Geometry g) { if(g == null) { return null; } if (g instanceof MultiPolygon) { Polygon p = (Polygon) g.getGeometryN(0); if(p!=null){ return p.getNumInteriorRing(); } } el...
[ "public", "static", "Integer", "getHoles", "(", "Geometry", "g", ")", "{", "if", "(", "g", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "g", "instanceof", "MultiPolygon", ")", "{", "Polygon", "p", "=", "(", "Polygon", ")", "g", "....
Return the number of holes in a Polygon or MultiPolygon @param g Geometry instance @return Number of holes or null if geometry is null
[ "Return", "the", "number", "of", "holes", "in", "a", "Polygon", "or", "MultiPolygon" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_NumInteriorRings.java#L51-L64
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMParser.java
OSMParser.checkOSMTables
private void checkOSMTables(Connection connection, boolean isH2, TableLocation requestedTable, String osmTableName) throws SQLException { String[] omsTables = new String[]{OSMTablesFactory.TAG, OSMTablesFactory.NODE, OSMTablesFactory.NODE_TAG, OSMTablesFactory.WAY, OSMTablesFactory.WAY_NODE, OSMTab...
java
private void checkOSMTables(Connection connection, boolean isH2, TableLocation requestedTable, String osmTableName) throws SQLException { String[] omsTables = new String[]{OSMTablesFactory.TAG, OSMTablesFactory.NODE, OSMTablesFactory.NODE_TAG, OSMTablesFactory.WAY, OSMTablesFactory.WAY_NODE, OSMTab...
[ "private", "void", "checkOSMTables", "(", "Connection", "connection", ",", "boolean", "isH2", ",", "TableLocation", "requestedTable", ",", "String", "osmTableName", ")", "throws", "SQLException", "{", "String", "[", "]", "omsTables", "=", "new", "String", "[", "...
Check if one table already exists @param connection @param isH2 @param requestedTable @param osmTableName @throws SQLException
[ "Check", "if", "one", "table", "already", "exists" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMParser.java#L212-L221
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMParser.java
OSMParser.createOSMDatabaseModel
private void createOSMDatabaseModel(Connection connection, boolean isH2, TableLocation requestedTable, String osmTableName) throws SQLException { String tagTableName = TableUtilities.caseIdentifier(requestedTable, osmTableName + OSMTablesFactory.TAG, isH2); tagPreparedStmt = OSMTablesFactory.createTagT...
java
private void createOSMDatabaseModel(Connection connection, boolean isH2, TableLocation requestedTable, String osmTableName) throws SQLException { String tagTableName = TableUtilities.caseIdentifier(requestedTable, osmTableName + OSMTablesFactory.TAG, isH2); tagPreparedStmt = OSMTablesFactory.createTagT...
[ "private", "void", "createOSMDatabaseModel", "(", "Connection", "connection", ",", "boolean", "isH2", ",", "TableLocation", "requestedTable", ",", "String", "osmTableName", ")", "throws", "SQLException", "{", "String", "tagTableName", "=", "TableUtilities", ".", "case...
Create the OMS data model to store the content of the file @param connection @param isH2 @param requestedTable @param osmTableName @throws SQLException
[ "Create", "the", "OMS", "data", "model", "to", "store", "the", "content", "of", "the", "file" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMParser.java#L235-L258
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/VisibilityAlgorithm.java
VisibilityAlgorithm.fixSegments
private static List<SegmentString> fixSegments(List<SegmentString> segments) { MCIndexNoder mCIndexNoder = new MCIndexNoder(); RobustLineIntersector robustLineIntersector = new RobustLineIntersector(); mCIndexNoder.setSegmentIntersector(new IntersectionAdder(robustLineIntersector)); mCIndexNoder.compute...
java
private static List<SegmentString> fixSegments(List<SegmentString> segments) { MCIndexNoder mCIndexNoder = new MCIndexNoder(); RobustLineIntersector robustLineIntersector = new RobustLineIntersector(); mCIndexNoder.setSegmentIntersector(new IntersectionAdder(robustLineIntersector)); mCIndexNoder.compute...
[ "private", "static", "List", "<", "SegmentString", ">", "fixSegments", "(", "List", "<", "SegmentString", ">", "segments", ")", "{", "MCIndexNoder", "mCIndexNoder", "=", "new", "MCIndexNoder", "(", ")", ";", "RobustLineIntersector", "robustLineIntersector", "=", "...
Split originalSegments that intersects. Run this method after calling the last addSegment before calling getIsoVist
[ "Split", "originalSegments", "that", "intersects", ".", "Run", "this", "method", "after", "calling", "the", "last", "addSegment", "before", "calling", "getIsoVist" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/VisibilityAlgorithm.java#L82-L93
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/VisibilityAlgorithm.java
VisibilityAlgorithm.addSegment
public void addSegment(Coordinate p0, Coordinate p1) { if (p0.distance(p1) < epsilon) { return; } addSegment(originalSegments, p0, p1); }
java
public void addSegment(Coordinate p0, Coordinate p1) { if (p0.distance(p1) < epsilon) { return; } addSegment(originalSegments, p0, p1); }
[ "public", "void", "addSegment", "(", "Coordinate", "p0", ",", "Coordinate", "p1", ")", "{", "if", "(", "p0", ".", "distance", "(", "p1", ")", "<", "epsilon", ")", "{", "return", ";", "}", "addSegment", "(", "originalSegments", ",", "p0", ",", "p1", "...
Add occlusion segment in isovist @param p0 segment origin @param p1 segment destination
[ "Add", "occlusion", "segment", "in", "isovist" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/VisibilityAlgorithm.java#L116-L121
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/VisibilityAlgorithm.java
VisibilityAlgorithm.addGeometry
public void addGeometry(Geometry geometry) { if (geometry instanceof LineString) { addLineString(originalSegments, (LineString) geometry); } else if (geometry instanceof Polygon) { addPolygon(originalSegments, (Polygon) geometry); } else if (geometry instanceof GeometryCollection) { addGeo...
java
public void addGeometry(Geometry geometry) { if (geometry instanceof LineString) { addLineString(originalSegments, (LineString) geometry); } else if (geometry instanceof Polygon) { addPolygon(originalSegments, (Polygon) geometry); } else if (geometry instanceof GeometryCollection) { addGeo...
[ "public", "void", "addGeometry", "(", "Geometry", "geometry", ")", "{", "if", "(", "geometry", "instanceof", "LineString", ")", "{", "addLineString", "(", "originalSegments", ",", "(", "LineString", ")", "geometry", ")", ";", "}", "else", "if", "(", "geometr...
Explode geometry and add occlusion segments in isovist @param geometry Geometry collection, LineString or Polygon instance
[ "Explode", "geometry", "and", "add", "occlusion", "segments", "in", "isovist" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/VisibilityAlgorithm.java#L435-L443
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/system/H2GISversion.java
H2GISversion.geth2gisVersion
public static String geth2gisVersion() { try (InputStream fs = H2GISFunctions.class.getResourceAsStream("/org/h2gis/functions/system/version.txt")) { BufferedReader bufRead = new BufferedReader(new InputStreamReader(fs)); StringBuilder builder = new StringBuilder(); String li...
java
public static String geth2gisVersion() { try (InputStream fs = H2GISFunctions.class.getResourceAsStream("/org/h2gis/functions/system/version.txt")) { BufferedReader bufRead = new BufferedReader(new InputStreamReader(fs)); StringBuilder builder = new StringBuilder(); String li...
[ "public", "static", "String", "geth2gisVersion", "(", ")", "{", "try", "(", "InputStream", "fs", "=", "H2GISFunctions", ".", "class", ".", "getResourceAsStream", "(", "\"/org/h2gis/functions/system/version.txt\"", ")", ")", "{", "BufferedReader", "bufRead", "=", "ne...
Return the H2GIS version available in the version txt file Otherwise return unknown @return
[ "Return", "the", "H2GIS", "version", "available", "in", "the", "version", "txt", "file", "Otherwise", "return", "unknown" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/system/H2GISversion.java#L54-L67
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java
ST_Graph.firstFirstLastLast
private static void firstFirstLastLast(Statement st, TableLocation tableName, String pkCol, String geomCol, double tolerance) throws SQLException { ...
java
private static void firstFirstLastLast(Statement st, TableLocation tableName, String pkCol, String geomCol, double tolerance) throws SQLException { ...
[ "private", "static", "void", "firstFirstLastLast", "(", "Statement", "st", ",", "TableLocation", "tableName", ",", "String", "pkCol", ",", "String", "geomCol", ",", "double", "tolerance", ")", "throws", "SQLException", "{", "LOGGER", ".", "info", "(", "\"Selecti...
Return the first and last coordinates table @param st @param tableName @param pkCol @param geomCol @param tolerance @throws SQLException
[ "Return", "the", "first", "and", "last", "coordinates", "table" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java#L355-L384
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java
ST_Graph.makeEnvelopes
private static void makeEnvelopes(Statement st, double tolerance, boolean isH2, int srid) throws SQLException { st.execute("DROP TABLE IF EXISTS"+ PTS_TABLE + ";"); if (tolerance > 0) { LOGGER.info("Calculating envelopes around coordinates..."); if (isH2) { ...
java
private static void makeEnvelopes(Statement st, double tolerance, boolean isH2, int srid) throws SQLException { st.execute("DROP TABLE IF EXISTS"+ PTS_TABLE + ";"); if (tolerance > 0) { LOGGER.info("Calculating envelopes around coordinates..."); if (isH2) { ...
[ "private", "static", "void", "makeEnvelopes", "(", "Statement", "st", ",", "double", "tolerance", ",", "boolean", "isH2", ",", "int", "srid", ")", "throws", "SQLException", "{", "st", ".", "execute", "(", "\"DROP TABLE IF EXISTS\"", "+", "PTS_TABLE", "+", "\";...
Make a big table of all points in the coords table with an envelope around each point. We will use this table to remove duplicate points.
[ "Make", "a", "big", "table", "of", "all", "points", "in", "the", "coords", "table", "with", "an", "envelope", "around", "each", "point", ".", "We", "will", "use", "this", "table", "to", "remove", "duplicate", "points", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java#L390-L446
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java
ST_Graph.nodesTable
private static void nodesTable(Statement st, TableLocation nodesName, double tolerance, boolean isH2, int srid) throws SQLException { LOGGER.info("Creating the nodes table..."); // Creating nodes table by removing copies from the pts ...
java
private static void nodesTable(Statement st, TableLocation nodesName, double tolerance, boolean isH2, int srid) throws SQLException { LOGGER.info("Creating the nodes table..."); // Creating nodes table by removing copies from the pts ...
[ "private", "static", "void", "nodesTable", "(", "Statement", "st", ",", "TableLocation", "nodesName", ",", "double", "tolerance", ",", "boolean", "isH2", ",", "int", "srid", ")", "throws", "SQLException", "{", "LOGGER", ".", "info", "(", "\"Creating the nodes ta...
Create the nodes table.
[ "Create", "the", "nodes", "table", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java#L451-L506
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java
ST_Graph.edgesTable
private static void edgesTable(Statement st, TableLocation nodesName, TableLocation edgesName, double tolerance, boolean isH2) throws SQLException { LOGGER.info("Creating the edges table..."); if (to...
java
private static void edgesTable(Statement st, TableLocation nodesName, TableLocation edgesName, double tolerance, boolean isH2) throws SQLException { LOGGER.info("Creating the edges table..."); if (to...
[ "private", "static", "void", "edgesTable", "(", "Statement", "st", ",", "TableLocation", "nodesName", ",", "TableLocation", "edgesName", ",", "double", "tolerance", ",", "boolean", "isH2", ")", "throws", "SQLException", "{", "LOGGER", ".", "info", "(", "\"Creati...
Create the edges table.
[ "Create", "the", "edges", "table", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java#L511-L556
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java
CoordinateUtils.zMinMax
public static double[] zMinMax(final Coordinate[] cs) { double zmin; double zmax; boolean validZFound = false; double[] result = new double[2]; zmin = Double.NaN; zmax = Double.NaN; double z; for (int t = cs.length - 1; t >= 0; t--) { z = cs...
java
public static double[] zMinMax(final Coordinate[] cs) { double zmin; double zmax; boolean validZFound = false; double[] result = new double[2]; zmin = Double.NaN; zmax = Double.NaN; double z; for (int t = cs.length - 1; t >= 0; t--) { z = cs...
[ "public", "static", "double", "[", "]", "zMinMax", "(", "final", "Coordinate", "[", "]", "cs", ")", "{", "double", "zmin", ";", "double", "zmax", ";", "boolean", "validZFound", "=", "false", ";", "double", "[", "]", "result", "=", "new", "double", "[",...
Determine the min and max "z" values in an array of Coordinates. @param cs The array to search. @return An array of size 2, index 0 is min, index 1 is max.
[ "Determine", "the", "min", "and", "max", "z", "values", "in", "an", "array", "of", "Coordinates", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java#L44-L77
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java
CoordinateUtils.contains2D
public static boolean contains2D(Coordinate[] coords, Coordinate coord) { for (Coordinate coordinate : coords) { if (coordinate.equals2D(coord)) { return true; } } return false; }
java
public static boolean contains2D(Coordinate[] coords, Coordinate coord) { for (Coordinate coordinate : coords) { if (coordinate.equals2D(coord)) { return true; } } return false; }
[ "public", "static", "boolean", "contains2D", "(", "Coordinate", "[", "]", "coords", ",", "Coordinate", "coord", ")", "{", "for", "(", "Coordinate", "coordinate", ":", "coords", ")", "{", "if", "(", "coordinate", ".", "equals2D", "(", "coord", ")", ")", "...
Checks if a coordinate array contains a specific coordinate. The equality is done only in 2D (z values are not checked). @param coords @param coord @return
[ "Checks", "if", "a", "coordinate", "array", "contains", "a", "specific", "coordinate", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java#L107-L114
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java
CoordinateUtils.vectorIntersection
public static Coordinate vectorIntersection(Coordinate p1, Vector3D v1, Coordinate p2, Vector3D v2) { double delta; Coordinate i = null; // Cramer's rule for compute intersection of two planes delta = v1.getX() * (-v2.getY()) - (-v1.getY()) * v2.getX(); if (delta != 0) { ...
java
public static Coordinate vectorIntersection(Coordinate p1, Vector3D v1, Coordinate p2, Vector3D v2) { double delta; Coordinate i = null; // Cramer's rule for compute intersection of two planes delta = v1.getX() * (-v2.getY()) - (-v1.getY()) * v2.getX(); if (delta != 0) { ...
[ "public", "static", "Coordinate", "vectorIntersection", "(", "Coordinate", "p1", ",", "Vector3D", "v1", ",", "Coordinate", "p2", ",", "Vector3D", "v2", ")", "{", "double", "delta", ";", "Coordinate", "i", "=", "null", ";", "// Cramer's rule for compute intersectio...
Compute intersection point of two vectors @param p1 Origin point @param v1 Direction from p1 @param p2 Origin point 2 @param v2 Direction of p2 @return Null if vectors are collinear or if intersection is done behind one of origin point
[ "Compute", "intersection", "point", "of", "two", "vectors" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java#L124-L139
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java
CoordinateUtils.removeRepeatedCoordinates
public static Coordinate[] removeRepeatedCoordinates(Coordinate[] coords, double tolerance, boolean duplicateFirstLast) { ArrayList<Coordinate> finalCoords = new ArrayList<Coordinate>(); Coordinate prevCoord = coords[0]; finalCoords.add(prevCoord); Coordinate firstCoord =prevCoor...
java
public static Coordinate[] removeRepeatedCoordinates(Coordinate[] coords, double tolerance, boolean duplicateFirstLast) { ArrayList<Coordinate> finalCoords = new ArrayList<Coordinate>(); Coordinate prevCoord = coords[0]; finalCoords.add(prevCoord); Coordinate firstCoord =prevCoor...
[ "public", "static", "Coordinate", "[", "]", "removeRepeatedCoordinates", "(", "Coordinate", "[", "]", "coords", ",", "double", "tolerance", ",", "boolean", "duplicateFirstLast", ")", "{", "ArrayList", "<", "Coordinate", ">", "finalCoords", "=", "new", "ArrayList",...
Remove repeated coordinates according a given tolerance @param coords the input coordinates @param tolerance to delete the coordinates @param duplicateFirstLast false to delete the last coordinate if there are equals @return
[ "Remove", "repeated", "coordinates", "according", "a", "given", "tolerance" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java#L183-L207
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVDriverFunction.java
TSVDriverFunction.exportTable
@Override public void exportTable(Connection connection, String tableReference, File fileName, ProgressVisitor progress, String encoding) throws SQLException, IOException { String regex = ".*(?i)\\b(select|from)\\b.*"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.match...
java
@Override public void exportTable(Connection connection, String tableReference, File fileName, ProgressVisitor progress, String encoding) throws SQLException, IOException { String regex = ".*(?i)\\b(select|from)\\b.*"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.match...
[ "@", "Override", "public", "void", "exportTable", "(", "Connection", "connection", ",", "String", "tableReference", ",", "File", "fileName", ",", "ProgressVisitor", "progress", ",", "String", "encoding", ")", "throws", "SQLException", ",", "IOException", "{", "Str...
Export a table or a query to as TSV file @param connection Active connection, do not close this connection. @param tableReference [[catalog.]schema.]table reference @param fileName File path to read @param progress @param encoding @throws SQLException @throws IOException
[ "Export", "a", "table", "or", "a", "query", "to", "as", "TSV", "file" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVDriverFunction.java#L109-L140
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVDriverFunction.java
TSVDriverFunction.exportFromResultSet
public void exportFromResultSet(Connection connection, ResultSet res, File fileName, ProgressVisitor progress, String encoding) throws SQLException { Csv csv = new Csv(); String csvOptions = "charset=UTF-8 fieldSeparator=\t fieldDelimiter=\t"; if (encoding != null) { csvOptions = Str...
java
public void exportFromResultSet(Connection connection, ResultSet res, File fileName, ProgressVisitor progress, String encoding) throws SQLException { Csv csv = new Csv(); String csvOptions = "charset=UTF-8 fieldSeparator=\t fieldDelimiter=\t"; if (encoding != null) { csvOptions = Str...
[ "public", "void", "exportFromResultSet", "(", "Connection", "connection", ",", "ResultSet", "res", ",", "File", "fileName", ",", "ProgressVisitor", "progress", ",", "String", "encoding", ")", "throws", "SQLException", "{", "Csv", "csv", "=", "new", "Csv", "(", ...
Export a resultset to a TSV file @param connection @param res @param fileName @param progress @param encoding @throws java.sql.SQLException
[ "Export", "a", "resultset", "to", "a", "TSV", "file" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVDriverFunction.java#L152-L160
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_OSMMapLink.java
ST_OSMMapLink.generateLink
public static String generateLink(Geometry geom, boolean withMarker) { if (geom == null) { return null; } Envelope env = geom.getEnvelopeInternal(); StringBuilder sb = new StringBuilder("http://www.openstreetmap.org/?"); sb.append("minlon=").append(env.getMinX()); ...
java
public static String generateLink(Geometry geom, boolean withMarker) { if (geom == null) { return null; } Envelope env = geom.getEnvelopeInternal(); StringBuilder sb = new StringBuilder("http://www.openstreetmap.org/?"); sb.append("minlon=").append(env.getMinX()); ...
[ "public", "static", "String", "generateLink", "(", "Geometry", "geom", ",", "boolean", "withMarker", ")", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "Envelope", "env", "=", "geom", ".", "getEnvelopeInternal", "(", ")", ";...
Create the OSM map link based on the bounding box of the geometry. @param geom the input geometry. @param withMarker true to place a marker on the center of the BBox. @return
[ "Create", "the", "OSM", "map", "link", "based", "on", "the", "bounding", "box", "of", "the", "geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_OSMMapLink.java#L63-L79
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePolygon.java
ST_MakePolygon.makePolygon
public static Polygon makePolygon(Geometry shell) throws IllegalArgumentException { if(shell == null) { return null; } LinearRing outerLine = checkLineString(shell); return shell.getFactory().createPolygon(outerLine, null); }
java
public static Polygon makePolygon(Geometry shell) throws IllegalArgumentException { if(shell == null) { return null; } LinearRing outerLine = checkLineString(shell); return shell.getFactory().createPolygon(outerLine, null); }
[ "public", "static", "Polygon", "makePolygon", "(", "Geometry", "shell", ")", "throws", "IllegalArgumentException", "{", "if", "(", "shell", "==", "null", ")", "{", "return", "null", ";", "}", "LinearRing", "outerLine", "=", "checkLineString", "(", "shell", ")"...
Creates a Polygon formed by the given shell. @param shell @return
[ "Creates", "a", "Polygon", "formed", "by", "the", "given", "shell", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePolygon.java#L52-L58
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePolygon.java
ST_MakePolygon.makePolygon
public static Polygon makePolygon(Geometry shell, Geometry... holes) throws IllegalArgumentException { if(shell == null) { return null; } LinearRing outerLine = checkLineString(shell); LinearRing[] interiorlinestrings = new LinearRing[holes.length]; for (int i = 0; i ...
java
public static Polygon makePolygon(Geometry shell, Geometry... holes) throws IllegalArgumentException { if(shell == null) { return null; } LinearRing outerLine = checkLineString(shell); LinearRing[] interiorlinestrings = new LinearRing[holes.length]; for (int i = 0; i ...
[ "public", "static", "Polygon", "makePolygon", "(", "Geometry", "shell", ",", "Geometry", "...", "holes", ")", "throws", "IllegalArgumentException", "{", "if", "(", "shell", "==", "null", ")", "{", "return", "null", ";", "}", "LinearRing", "outerLine", "=", "...
Creates a Polygon formed by the given shell and holes. @param shell @param holes @return
[ "Creates", "a", "Polygon", "formed", "by", "the", "given", "shell", "and", "holes", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePolygon.java#L67-L77
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePolygon.java
ST_MakePolygon.checkLineString
private static LinearRing checkLineString(Geometry geometry) throws IllegalArgumentException { if (geometry instanceof LinearRing) { return (LinearRing) geometry; } else if (geometry instanceof LineString) { LineString lineString = (LineString) geometry; if (lineStri...
java
private static LinearRing checkLineString(Geometry geometry) throws IllegalArgumentException { if (geometry instanceof LinearRing) { return (LinearRing) geometry; } else if (geometry instanceof LineString) { LineString lineString = (LineString) geometry; if (lineStri...
[ "private", "static", "LinearRing", "checkLineString", "(", "Geometry", "geometry", ")", "throws", "IllegalArgumentException", "{", "if", "(", "geometry", "instanceof", "LinearRing", ")", "{", "return", "(", "LinearRing", ")", "geometry", ";", "}", "else", "if", ...
Check if a geometry is a linestring and if its closed. @param geometry @return @throws IllegalArgumentException
[ "Check", "if", "a", "geometry", "is", "a", "linestring", "and", "if", "its", "closed", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePolygon.java#L86-L100
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/crs/ST_Transform.java
ST_Transform.ST_Transform
public static Geometry ST_Transform(Connection connection, Geometry geom, Integer codeEpsg) throws SQLException, CoordinateOperationException { if (geom == null) { return null; } if (codeEpsg == null) { throw new IllegalArgumentException("The SRID code cannot be null."); ...
java
public static Geometry ST_Transform(Connection connection, Geometry geom, Integer codeEpsg) throws SQLException, CoordinateOperationException { if (geom == null) { return null; } if (codeEpsg == null) { throw new IllegalArgumentException("The SRID code cannot be null."); ...
[ "public", "static", "Geometry", "ST_Transform", "(", "Connection", "connection", ",", "Geometry", "geom", ",", "Integer", "codeEpsg", ")", "throws", "SQLException", ",", "CoordinateOperationException", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "n...
Returns a new geometry transformed to the SRID referenced by the integer parameter available in the spatial_ref_sys table @param connection @param geom @param codeEpsg @return @throws SQLException
[ "Returns", "a", "new", "geometry", "transformed", "to", "the", "SRID", "referenced", "by", "the", "integer", "parameter", "available", "in", "the", "spatial_ref_sys", "table" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/crs/ST_Transform.java#L82-L140
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Node.java
ST_Node.node
public static Geometry node(Geometry geom) { if (geom == null) { return null; } Noder noder = new MCIndexNoder(new IntersectionAdder(new RobustLineIntersector())); noder.computeNodes(SegmentStringUtil.extractNodedSegmentStrings(geom)); return SegmentStringUtil...
java
public static Geometry node(Geometry geom) { if (geom == null) { return null; } Noder noder = new MCIndexNoder(new IntersectionAdder(new RobustLineIntersector())); noder.computeNodes(SegmentStringUtil.extractNodedSegmentStrings(geom)); return SegmentStringUtil...
[ "public", "static", "Geometry", "node", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "Noder", "noder", "=", "new", "MCIndexNoder", "(", "new", "IntersectionAdder", "(", "new", "RobustLineIntersec...
Nodes a geometry using a monotone chain and a spatial index @param geom @return
[ "Nodes", "a", "geometry", "using", "a", "monotone", "chain", "and", "a", "spatial", "index" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Node.java#L50-L57
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserWpt.java
AbstractGpxParserWpt.initialise
public void initialise(XMLReader reader, AbstractGpxParserDefault parent) { setReader(reader); setParent(parent); setContentBuffer(parent.getContentBuffer()); setWptPreparedStmt(parent.getWptPreparedStmt()); setElementNames(parent.getElementNames()); setCurrentPoint(paren...
java
public void initialise(XMLReader reader, AbstractGpxParserDefault parent) { setReader(reader); setParent(parent); setContentBuffer(parent.getContentBuffer()); setWptPreparedStmt(parent.getWptPreparedStmt()); setElementNames(parent.getElementNames()); setCurrentPoint(paren...
[ "public", "void", "initialise", "(", "XMLReader", "reader", ",", "AbstractGpxParserDefault", "parent", ")", "{", "setReader", "(", "reader", ")", ";", "setParent", "(", "parent", ")", ";", "setContentBuffer", "(", "parent", ".", "getContentBuffer", "(", ")", "...
Create a new specific parser. It has in memory the default parser, the contentBuffer, the elementNames and the currentPoint. @param reader The XMLReader used in the default class @param parent The parser used in the default class
[ "Create", "a", "new", "specific", "parser", ".", "It", "has", "in", "memory", "the", "default", "parser", "the", "contentBuffer", "the", "elementNames", "and", "the", "currentPoint", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserWpt.java#L48-L55
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserWpt.java
AbstractGpxParserWpt.startElement
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { // Clear content buffer getContentBuffer().delete(0, getContentBuffer().length()); // Store name of current element in stack getElementNames().push(qName); ...
java
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { // Clear content buffer getContentBuffer().delete(0, getContentBuffer().length()); // Store name of current element in stack getElementNames().push(qName); ...
[ "@", "Override", "public", "void", "startElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "Attributes", "attributes", ")", "throws", "SAXException", "{", "// Clear content buffer", "getContentBuffer", "(", ")", ".", "delete"...
Fires whenever an XML start markup is encountered. @param uri URI of the local element @param localName Name of the local element (without prefix) @param qName qName of the local element (with prefix) @param attributes Attributes of the local element (contained in the markup) @throws SAXException Any SAX exception, po...
[ "Fires", "whenever", "an", "XML", "start", "markup", "is", "encountered", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserWpt.java#L68-L74
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveRepeatedPoints.java
ST_RemoveRepeatedPoints.removeRepeatedPoints
public static Geometry removeRepeatedPoints(Geometry geometry) throws SQLException, SQLException, SQLException, SQLException { return removeDuplicateCoordinates(geometry, 0); }
java
public static Geometry removeRepeatedPoints(Geometry geometry) throws SQLException, SQLException, SQLException, SQLException { return removeDuplicateCoordinates(geometry, 0); }
[ "public", "static", "Geometry", "removeRepeatedPoints", "(", "Geometry", "geometry", ")", "throws", "SQLException", ",", "SQLException", ",", "SQLException", ",", "SQLException", "{", "return", "removeDuplicateCoordinates", "(", "geometry", ",", "0", ")", ";", "}" ]
Returns a version of the given geometry with duplicated points removed. @param geometry @return @throws java.sql.SQLException
[ "Returns", "a", "version", "of", "the", "given", "geometry", "with", "duplicated", "points", "removed", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveRepeatedPoints.java#L56-L58
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveRepeatedPoints.java
ST_RemoveRepeatedPoints.removeDuplicateCoordinates
public static Geometry removeDuplicateCoordinates(Geometry geom, double tolerance) throws SQLException { if (geom == null) { return null; } else if (geom.isEmpty()) { return geom; } else if (geom instanceof Point) { return geom; } else if (geom instanc...
java
public static Geometry removeDuplicateCoordinates(Geometry geom, double tolerance) throws SQLException { if (geom == null) { return null; } else if (geom.isEmpty()) { return geom; } else if (geom instanceof Point) { return geom; } else if (geom instanc...
[ "public", "static", "Geometry", "removeDuplicateCoordinates", "(", "Geometry", "geom", ",", "double", "tolerance", ")", "throws", "SQLException", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "geom", ".", "i...
Removes duplicated points within a geometry. @param geom @param tolerance to delete the coordinates @return @throws java.sql.SQLException
[ "Removes", "duplicated", "points", "within", "a", "geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveRepeatedPoints.java#L80-L101
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java
H2GISDBFactory.openSpatialDataBase
public static Connection openSpatialDataBase(String dbName) throws SQLException, ClassNotFoundException { String dbFilePath = getDataBasePath(dbName); String databasePath = "jdbc:h2:"+ dbFilePath + H2_PARAMETERS; org.h2.Driver.load(); // Keep a connection alive to not close the Da...
java
public static Connection openSpatialDataBase(String dbName) throws SQLException, ClassNotFoundException { String dbFilePath = getDataBasePath(dbName); String databasePath = "jdbc:h2:"+ dbFilePath + H2_PARAMETERS; org.h2.Driver.load(); // Keep a connection alive to not close the Da...
[ "public", "static", "Connection", "openSpatialDataBase", "(", "String", "dbName", ")", "throws", "SQLException", ",", "ClassNotFoundException", "{", "String", "dbFilePath", "=", "getDataBasePath", "(", "dbName", ")", ";", "String", "databasePath", "=", "\"jdbc:h2:\"",...
Open the connection to an existing database @param dbName @return @throws SQLException @throws ClassNotFoundException
[ "Open", "the", "connection", "to", "an", "existing", "database" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java#L54-L61
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java
H2GISDBFactory.getDataBasePath
private static String getDataBasePath(String dbName) { if(dbName.startsWith("file://")) { return new File(URI.create(dbName)).getAbsolutePath(); } else { return new File("target/test-resources/dbH2" + dbName).getAbsolutePath(); } }
java
private static String getDataBasePath(String dbName) { if(dbName.startsWith("file://")) { return new File(URI.create(dbName)).getAbsolutePath(); } else { return new File("target/test-resources/dbH2" + dbName).getAbsolutePath(); } }
[ "private", "static", "String", "getDataBasePath", "(", "String", "dbName", ")", "{", "if", "(", "dbName", ".", "startsWith", "(", "\"file://\"", ")", ")", "{", "return", "new", "File", "(", "URI", ".", "create", "(", "dbName", ")", ")", ".", "getAbsolute...
Return the path of the file database @param dbName @return
[ "Return", "the", "path", "of", "the", "file", "database" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java#L78-L84
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java
H2GISDBFactory.createSpatialDataBase
public static Connection createSpatialDataBase(String dbName,boolean initSpatial, String h2Parameters )throws SQLException, ClassNotFoundException { String databasePath = initDBFile(dbName, h2Parameters); org.h2.Driver.load(); // Keep a connection alive to not close the DataBase on each unit tes...
java
public static Connection createSpatialDataBase(String dbName,boolean initSpatial, String h2Parameters )throws SQLException, ClassNotFoundException { String databasePath = initDBFile(dbName, h2Parameters); org.h2.Driver.load(); // Keep a connection alive to not close the DataBase on each unit tes...
[ "public", "static", "Connection", "createSpatialDataBase", "(", "String", "dbName", ",", "boolean", "initSpatial", ",", "String", "h2Parameters", ")", "throws", "SQLException", ",", "ClassNotFoundException", "{", "String", "databasePath", "=", "initDBFile", "(", "dbNa...
Create a spatial database @param dbName filename @param initSpatial If true add spatial features to the database @param h2Parameters Additional h2 parameters @return Connection @throws java.sql.SQLException @throws java.lang.ClassNotFoundException
[ "Create", "a", "spatial", "database" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java#L154-L165
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java
H2GISDBFactory.createSpatialDataBase
public static Connection createSpatialDataBase(String dbName, boolean initSpatial )throws SQLException, ClassNotFoundException { return createSpatialDataBase(dbName, initSpatial, H2_PARAMETERS); }
java
public static Connection createSpatialDataBase(String dbName, boolean initSpatial )throws SQLException, ClassNotFoundException { return createSpatialDataBase(dbName, initSpatial, H2_PARAMETERS); }
[ "public", "static", "Connection", "createSpatialDataBase", "(", "String", "dbName", ",", "boolean", "initSpatial", ")", "throws", "SQLException", ",", "ClassNotFoundException", "{", "return", "createSpatialDataBase", "(", "dbName", ",", "initSpatial", ",", "H2_PARAMETER...
Create a spatial database and register all H2GIS functions @param dbName filename @param initSpatial If true add spatial features to the database @return Connection @throws java.sql.SQLException @throws java.lang.ClassNotFoundException
[ "Create", "a", "spatial", "database", "and", "register", "all", "H2GIS", "functions" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java#L175-L177
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ClosestPoint.java
ST_ClosestPoint.closestPoint
public static Point closestPoint(Geometry geomA, Geometry geomB) { if (geomA == null || geomB == null) { return null; } // Return the closest point on geomA. (We would have used index // 1 to return the closest point on geomB.) return geomA.getFactory().createPoint(Di...
java
public static Point closestPoint(Geometry geomA, Geometry geomB) { if (geomA == null || geomB == null) { return null; } // Return the closest point on geomA. (We would have used index // 1 to return the closest point on geomB.) return geomA.getFactory().createPoint(Di...
[ "public", "static", "Point", "closestPoint", "(", "Geometry", "geomA", ",", "Geometry", "geomB", ")", "{", "if", "(", "geomA", "==", "null", "||", "geomB", "==", "null", ")", "{", "return", "null", ";", "}", "// Return the closest point on geomA. (We would have ...
Returns the 2D point on geometry A that is closest to geometry B. @param geomA Geometry A @param geomB Geometry B @return The 2D point on geometry A that is closest to geometry B
[ "Returns", "the", "2D", "point", "on", "geometry", "A", "that", "is", "closest", "to", "geometry", "B", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ClosestPoint.java#L55-L62
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_ToMultiSegments.java
ST_ToMultiSegments.createSegments
public static MultiLineString createSegments(Geometry geom) throws SQLException { if (geom != null) { List<LineString> result; if (geom.getDimension() > 0) { result = new LinkedList<LineString>(); createSegments(geom, result); return GEOMET...
java
public static MultiLineString createSegments(Geometry geom) throws SQLException { if (geom != null) { List<LineString> result; if (geom.getDimension() > 0) { result = new LinkedList<LineString>(); createSegments(geom, result); return GEOMET...
[ "public", "static", "MultiLineString", "createSegments", "(", "Geometry", "geom", ")", "throws", "SQLException", "{", "if", "(", "geom", "!=", "null", ")", "{", "List", "<", "LineString", ">", "result", ";", "if", "(", "geom", ".", "getDimension", "(", ")"...
Converts a geometry into a set of distinct segments stored in a MultiLineString. @param geom Geometry @return A MultiLineString of the geometry's distinct segments @throws SQLException
[ "Converts", "a", "geometry", "into", "a", "set", "of", "distinct", "segments", "stored", "in", "a", "MultiLineString", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_ToMultiSegments.java#L60-L73
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonWrite.java
GeoJsonWrite.writeGeoJson
public static void writeGeoJson(Connection connection, String fileName, String tableReference, String encoding) throws IOException, SQLException { GeoJsonDriverFunction geoJsonDriver = new GeoJsonDriverFunction(); geoJsonDriver.exportTable(connection,tableReference, URIUtilities.fileFromString(fileName)...
java
public static void writeGeoJson(Connection connection, String fileName, String tableReference, String encoding) throws IOException, SQLException { GeoJsonDriverFunction geoJsonDriver = new GeoJsonDriverFunction(); geoJsonDriver.exportTable(connection,tableReference, URIUtilities.fileFromString(fileName)...
[ "public", "static", "void", "writeGeoJson", "(", "Connection", "connection", ",", "String", "fileName", ",", "String", "tableReference", ",", "String", "encoding", ")", "throws", "IOException", ",", "SQLException", "{", "GeoJsonDriverFunction", "geoJsonDriver", "=", ...
Write the GeoJSON file. @param connection @param fileName @param tableReference @param encoding @throws IOException @throws SQLException
[ "Write", "the", "GeoJSON", "file", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonWrite.java#L59-L62
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveHoles.java
ST_RemoveHoles.removeHoles
public static Geometry removeHoles(Geometry geometry) { if(geometry == null){ return null; } if (geometry instanceof Polygon) { return removeHolesPolygon((Polygon) geometry); } else if (geometry instanceof MultiPolygon) { return removeHolesMultiPolygon...
java
public static Geometry removeHoles(Geometry geometry) { if(geometry == null){ return null; } if (geometry instanceof Polygon) { return removeHolesPolygon((Polygon) geometry); } else if (geometry instanceof MultiPolygon) { return removeHolesMultiPolygon...
[ "public", "static", "Geometry", "removeHoles", "(", "Geometry", "geometry", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "geometry", "instanceof", "Polygon", ")", "{", "return", "removeHolesPolygon", "(", ...
Remove any holes from the geometry. If the geometry doesn't contain any holes, return it unchanged. @param geometry Geometry @return Geometry with no holes *
[ "Remove", "any", "holes", "from", "the", "geometry", ".", "If", "the", "geometry", "doesn", "t", "contain", "any", "holes", "return", "it", "unchanged", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveHoles.java#L53-L76
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveHoles.java
ST_RemoveHoles.removeHolesMultiPolygon
public static MultiPolygon removeHolesMultiPolygon(MultiPolygon multiPolygon) { int num = multiPolygon.getNumGeometries(); Polygon[] polygons = new Polygon[num]; for (int i = 0; i < num; i++) { polygons[i] = removeHolesPolygon((Polygon) multiPolygon.getGeometryN(i)); } ...
java
public static MultiPolygon removeHolesMultiPolygon(MultiPolygon multiPolygon) { int num = multiPolygon.getNumGeometries(); Polygon[] polygons = new Polygon[num]; for (int i = 0; i < num; i++) { polygons[i] = removeHolesPolygon((Polygon) multiPolygon.getGeometryN(i)); } ...
[ "public", "static", "MultiPolygon", "removeHolesMultiPolygon", "(", "MultiPolygon", "multiPolygon", ")", "{", "int", "num", "=", "multiPolygon", ".", "getNumGeometries", "(", ")", ";", "Polygon", "[", "]", "polygons", "=", "new", "Polygon", "[", "num", "]", ";...
Create a new multiPolygon without hole. @param multiPolygon @return
[ "Create", "a", "new", "multiPolygon", "without", "hole", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveHoles.java#L84-L91
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveHoles.java
ST_RemoveHoles.removeHolesPolygon
public static Polygon removeHolesPolygon(Polygon polygon) { return new Polygon((LinearRing) polygon.getExteriorRing(), null, polygon.getFactory()); }
java
public static Polygon removeHolesPolygon(Polygon polygon) { return new Polygon((LinearRing) polygon.getExteriorRing(), null, polygon.getFactory()); }
[ "public", "static", "Polygon", "removeHolesPolygon", "(", "Polygon", "polygon", ")", "{", "return", "new", "Polygon", "(", "(", "LinearRing", ")", "polygon", ".", "getExteriorRing", "(", ")", ",", "null", ",", "polygon", ".", "getFactory", "(", ")", ")", "...
Create a new polygon without hole. @param polygon @return
[ "Create", "a", "new", "polygon", "without", "hole", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveHoles.java#L99-L101
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Interpolate3DLine.java
ST_Interpolate3DLine.linearZInterpolation
private static LineString linearZInterpolation(LineString lineString) { double startz = lineString.getStartPoint().getCoordinate().z; double endz = lineString.getEndPoint().getCoordinate().z; if (Double.isNaN(startz) || Double.isNaN(endz)) { return lineString; } else { ...
java
private static LineString linearZInterpolation(LineString lineString) { double startz = lineString.getStartPoint().getCoordinate().z; double endz = lineString.getEndPoint().getCoordinate().z; if (Double.isNaN(startz) || Double.isNaN(endz)) { return lineString; } else { ...
[ "private", "static", "LineString", "linearZInterpolation", "(", "LineString", "lineString", ")", "{", "double", "startz", "=", "lineString", ".", "getStartPoint", "(", ")", ".", "getCoordinate", "(", ")", ".", "z", ";", "double", "endz", "=", "lineString", "."...
Interpolate a linestring according the start and the end coordinates z value. If the start or the end z is NaN return the input linestring @param lineString @return
[ "Interpolate", "a", "linestring", "according", "the", "start", "and", "the", "end", "coordinates", "z", "value", ".", "If", "the", "start", "or", "the", "end", "z", "is", "NaN", "return", "the", "input", "linestring" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Interpolate3DLine.java#L70-L80
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Interpolate3DLine.java
ST_Interpolate3DLine.linearZInterpolation
private static MultiLineString linearZInterpolation(MultiLineString multiLineString) { int nbGeom = multiLineString.getNumGeometries(); LineString[] lines = new LineString[nbGeom]; for (int i = 0; i < nbGeom; i++) { LineString subGeom = (LineString) multiLineString.getGeometryN(i); ...
java
private static MultiLineString linearZInterpolation(MultiLineString multiLineString) { int nbGeom = multiLineString.getNumGeometries(); LineString[] lines = new LineString[nbGeom]; for (int i = 0; i < nbGeom; i++) { LineString subGeom = (LineString) multiLineString.getGeometryN(i); ...
[ "private", "static", "MultiLineString", "linearZInterpolation", "(", "MultiLineString", "multiLineString", ")", "{", "int", "nbGeom", "=", "multiLineString", ".", "getNumGeometries", "(", ")", ";", "LineString", "[", "]", "lines", "=", "new", "LineString", "[", "n...
Interpolate each linestring of the multilinestring. @param multiLineString @return
[ "Interpolate", "each", "linestring", "of", "the", "multilinestring", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Interpolate3DLine.java#L88-L101
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/ShapeType.java
ShapeType.isMultiPoint
public boolean isMultiPoint() { boolean mp = true; if (this == UNDEFINED) { mp = false; } else if (this == NULL) { mp = false; } else if (this == POINT) { mp = false; } return mp; }
java
public boolean isMultiPoint() { boolean mp = true; if (this == UNDEFINED) { mp = false; } else if (this == NULL) { mp = false; } else if (this == POINT) { mp = false; } return mp; }
[ "public", "boolean", "isMultiPoint", "(", ")", "{", "boolean", "mp", "=", "true", ";", "if", "(", "this", "==", "UNDEFINED", ")", "{", "mp", "=", "false", ";", "}", "else", "if", "(", "this", "==", "NULL", ")", "{", "mp", "=", "false", ";", "}", ...
Is this a multipoint shape? Hint- all shapes are multipoint except NULL, UNDEFINED, and the POINTs. @return true if multipoint, false otherwise.
[ "Is", "this", "a", "multipoint", "shape?", "Hint", "-", "all", "shapes", "are", "multipoint", "except", "NULL", "UNDEFINED", "and", "the", "POINTs", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/ShapeType.java#L86-L92
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/ShapeType.java
ShapeType.forID
public static ShapeType forID(int id) { ShapeType t; switch (id) { case 0: t = NULL; break; case 1: t = POINT; break; case 11: t = POINTZ; break; case 21: t = POINTM; break; case 3: t = ARC; break; ...
java
public static ShapeType forID(int id) { ShapeType t; switch (id) { case 0: t = NULL; break; case 1: t = POINT; break; case 11: t = POINTZ; break; case 21: t = POINTM; break; case 3: t = ARC; break; ...
[ "public", "static", "ShapeType", "forID", "(", "int", "id", ")", "{", "ShapeType", "t", ";", "switch", "(", "id", ")", "{", "case", "0", ":", "t", "=", "NULL", ";", "break", ";", "case", "1", ":", "t", "=", "POINT", ";", "break", ";", "case", "...
Determine the ShapeType for the id. @param id The id to search for. @return The ShapeType for the id.
[ "Determine", "the", "ShapeType", "for", "the", "id", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/ShapeType.java#L114-L161
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/ShapeType.java
ShapeType.getShapeHandler
public ShapeHandler getShapeHandler() throws ShapefileException { ShapeHandler handler; switch (id) { case 1: case 11: case 21: handler = new PointHandler(this); break; case 3: case 13: case 23: handler = new MultiLineHandler(this); break; case 5: case 15: case ...
java
public ShapeHandler getShapeHandler() throws ShapefileException { ShapeHandler handler; switch (id) { case 1: case 11: case 21: handler = new PointHandler(this); break; case 3: case 13: case 23: handler = new MultiLineHandler(this); break; case 5: case 15: case ...
[ "public", "ShapeHandler", "getShapeHandler", "(", ")", "throws", "ShapefileException", "{", "ShapeHandler", "handler", ";", "switch", "(", "id", ")", "{", "case", "1", ":", "case", "11", ":", "case", "21", ":", "handler", "=", "new", "PointHandler", "(", "...
Each ShapeType corresponds to a handler. In the future this should probably go else where to allow different handlers, or something... @throws ShapefileException If the ShapeType is bogus. @return The correct handler for this ShapeType. Returns a new one.
[ "Each", "ShapeType", "corresponds", "to", "a", "handler", ".", "In", "the", "future", "this", "should", "probably", "go", "else", "where", "to", "allow", "different", "handlers", "or", "something", "..." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/ShapeType.java#L168-L187
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createTagTable
public static PreparedStatement createTagTable(Connection connection, String tagTableName) throws SQLException { // PostgreSQL and H2 will automatically create an index on TAG_KEY,TAG_VALUE when UNIQUE constraint is set try (Statement stmt = connection.createStatement()) { // PostgreSQL and ...
java
public static PreparedStatement createTagTable(Connection connection, String tagTableName) throws SQLException { // PostgreSQL and H2 will automatically create an index on TAG_KEY,TAG_VALUE when UNIQUE constraint is set try (Statement stmt = connection.createStatement()) { // PostgreSQL and ...
[ "public", "static", "PreparedStatement", "createTagTable", "(", "Connection", "connection", ",", "String", "tagTableName", ")", "throws", "SQLException", "{", "// PostgreSQL and H2 will automatically create an index on TAG_KEY,TAG_VALUE when UNIQUE constraint is set", "try", "(", "...
Create the tag table to store all key and value @param connection @param tagTableName @return @throws SQLException
[ "Create", "the", "tag", "table", "to", "store", "all", "key", "and", "value" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L79-L87
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createWayTagTable
public static PreparedStatement createWayTagTable(Connection connection, String wayTagTableName, String tagTableName) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(wayTagTableName); ...
java
public static PreparedStatement createWayTagTable(Connection connection, String wayTagTableName, String tagTableName) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(wayTagTableName); ...
[ "public", "static", "PreparedStatement", "createWayTagTable", "(", "Connection", "connection", ",", "String", "wayTagTableName", ",", "String", "tagTableName", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatemen...
Create a table to store the way tags. @param connection @param wayTagTableName @param tagTableName @return @throws SQLException
[ "Create", "a", "table", "to", "store", "the", "way", "tags", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L181-L195
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createWayNodeTable
public static PreparedStatement createWayNodeTable(Connection connection, String wayNodeTableName) throws SQLException{ try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(wayNodeTableName); sb.append("(ID_WAY...
java
public static PreparedStatement createWayNodeTable(Connection connection, String wayNodeTableName) throws SQLException{ try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(wayNodeTableName); sb.append("(ID_WAY...
[ "public", "static", "PreparedStatement", "createWayNodeTable", "(", "Connection", "connection", ",", "String", "wayNodeTableName", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatement", "(", ")", ")", "{", "...
Create a table to store the list of nodes for each way. @param connection @param wayNodeTableName @return @throws SQLException
[ "Create", "a", "table", "to", "store", "the", "list", "of", "nodes", "for", "each", "way", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L205-L213
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createRelationTable
public static PreparedStatement createRelationTable(Connection connection, String relationTable) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(relationTable); sb.append("(ID_RELATIO...
java
public static PreparedStatement createRelationTable(Connection connection, String relationTable) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(relationTable); sb.append("(ID_RELATIO...
[ "public", "static", "PreparedStatement", "createRelationTable", "(", "Connection", "connection", ",", "String", "relationTable", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatement", "(", ")", ")", "{", "St...
Create the relation table. @param connection @param relationTable @return @throws SQLException
[ "Create", "the", "relation", "table", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L223-L237
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createNodeMemberTable
public static PreparedStatement createNodeMemberTable(Connection connection, String nodeMemberTable) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(nodeMemberTable); sb.append("(ID_R...
java
public static PreparedStatement createNodeMemberTable(Connection connection, String nodeMemberTable) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(nodeMemberTable); sb.append("(ID_R...
[ "public", "static", "PreparedStatement", "createNodeMemberTable", "(", "Connection", "connection", ",", "String", "nodeMemberTable", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatement", "(", ")", ")", "{", ...
Create the node members table @param connection @param nodeMemberTable @return @throws SQLException
[ "Create", "the", "node", "members", "table" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L272-L280
train