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-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java
GraphFunctionParser.parseEdgeOrientation
protected String parseEdgeOrientation(String v) { if (v == null) { return null; } if (!v.contains(SEPARATOR)) { throw new IllegalArgumentException(ORIENTATION_ERROR); } // Extract the global and edge orientations. String[] s = v.split(SEPARATOR); ...
java
protected String parseEdgeOrientation(String v) { if (v == null) { return null; } if (!v.contains(SEPARATOR)) { throw new IllegalArgumentException(ORIENTATION_ERROR); } // Extract the global and edge orientations. String[] s = v.split(SEPARATOR); ...
[ "protected", "String", "parseEdgeOrientation", "(", "String", "v", ")", "{", "if", "(", "v", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "!", "v", ".", "contains", "(", "SEPARATOR", ")", ")", "{", "throw", "new", "IllegalArgumentExce...
Recovers the edge orientation from a string. @param v String @return The edge orientation
[ "Recovers", "the", "edge", "orientation", "from", "a", "string", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java#L125-L141
train
orbisgis/h2gis
h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java
GraphFunctionParser.parseDestinationsString
public static int[] parseDestinationsString(String s) { if (!s.contains(",")) { return new int[]{Integer.valueOf(s.trim())}; } String[] array = s.split(","); int[] destinations = new int[array.length]; for (int i = 0; i < destinations.length; i++) { final ...
java
public static int[] parseDestinationsString(String s) { if (!s.contains(",")) { return new int[]{Integer.valueOf(s.trim())}; } String[] array = s.split(","); int[] destinations = new int[array.length]; for (int i = 0; i < destinations.length; i++) { final ...
[ "public", "static", "int", "[", "]", "parseDestinationsString", "(", "String", "s", ")", "{", "if", "(", "!", "s", ".", "contains", "(", "\",\"", ")", ")", "{", "return", "new", "int", "[", "]", "{", "Integer", ".", "valueOf", "(", "s", ".", "trim"...
Returns an array of destination ids from a comma-separated list of destinations. @param s Comma-separated list of destinations @return An array of destination ids
[ "Returns", "an", "array", "of", "destination", "ids", "from", "a", "comma", "-", "separated", "list", "of", "destinations", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java#L225-L239
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserTrk.java
AbstractGpxParserTrk.initialise
public void initialise(XMLReader reader, AbstractGpxParserDefault parent) { setReader(reader); setParent(parent); setContentBuffer(parent.getContentBuffer()); setTrkPreparedStmt(parent.getTrkPreparedStmt()); setTrkSegmentsPreparedStmt(parent.getTrkSegmentsPreparedStmt()); ...
java
public void initialise(XMLReader reader, AbstractGpxParserDefault parent) { setReader(reader); setParent(parent); setContentBuffer(parent.getContentBuffer()); setTrkPreparedStmt(parent.getTrkPreparedStmt()); setTrkSegmentsPreparedStmt(parent.getTrkSegmentsPreparedStmt()); ...
[ "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, the currentLine and the trkID. @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", "the", "currentLine", "and", "the", "trkID", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserTrk.java#L66-L77
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_GeomFromGeoJSON.java
ST_GeomFromGeoJSON.geomFromGeoJSON
public static Geometry geomFromGeoJSON(String geojson) throws IOException, SQLException { if (geojson == null) { return null; } if (jsFactory == null) { jsFactory = new JsonFactory(); jsFactory.configure(JsonParser.Feature.ALLOW_COMMENTS, true); js...
java
public static Geometry geomFromGeoJSON(String geojson) throws IOException, SQLException { if (geojson == null) { return null; } if (jsFactory == null) { jsFactory = new JsonFactory(); jsFactory.configure(JsonParser.Feature.ALLOW_COMMENTS, true); js...
[ "public", "static", "Geometry", "geomFromGeoJSON", "(", "String", "geojson", ")", "throws", "IOException", ",", "SQLException", "{", "if", "(", "geojson", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "jsFactory", "==", "null", ")", "{", ...
Convert a geojson geometry to geometry. @param geojson @return @throws java.io.IOException @throws java.sql.SQLException
[ "Convert", "a", "geojson", "geometry", "to", "geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_GeomFromGeoJSON.java#L58-L71
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_Perimeter.java
ST_Perimeter.perimeter
public static Double perimeter(Geometry geometry){ if(geometry==null){ return null; } if(geometry.getDimension()<2){ return 0d; } return computePerimeter(geometry); }
java
public static Double perimeter(Geometry geometry){ if(geometry==null){ return null; } if(geometry.getDimension()<2){ return 0d; } return computePerimeter(geometry); }
[ "public", "static", "Double", "perimeter", "(", "Geometry", "geometry", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "geometry", ".", "getDimension", "(", ")", "<", "2", ")", "{", "return", "0d", ";"...
Compute the perimeter of a polygon or a multipolygon. @param geometry @return
[ "Compute", "the", "perimeter", "of", "a", "polygon", "or", "a", "multipolygon", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_Perimeter.java#L50-L58
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_Perimeter.java
ST_Perimeter.computePerimeter
private static double computePerimeter(Geometry geometry) { double sum = 0; for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if (subGeom instanceof Polygon) { sum += ((Polygon) subGeom).getExteriorRing().getLengt...
java
private static double computePerimeter(Geometry geometry) { double sum = 0; for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if (subGeom instanceof Polygon) { sum += ((Polygon) subGeom).getExteriorRing().getLengt...
[ "private", "static", "double", "computePerimeter", "(", "Geometry", "geometry", ")", "{", "double", "sum", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "geometry", ".", "getNumGeometries", "(", ")", ";", "i", "++", ")", "{", "Geome...
Compute the perimeter @param geometry @return
[ "Compute", "the", "perimeter" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_Perimeter.java#L65-L74
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_YMin.java
ST_YMin.getMinY
public static Double getMinY(Geometry geom) { if (geom != null) { return geom.getEnvelopeInternal().getMinY(); } else { return null; } }
java
public static Double getMinY(Geometry geom) { if (geom != null) { return geom.getEnvelopeInternal().getMinY(); } else { return null; } }
[ "public", "static", "Double", "getMinY", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "!=", "null", ")", "{", "return", "geom", ".", "getEnvelopeInternal", "(", ")", ".", "getMinY", "(", ")", ";", "}", "else", "{", "return", "null", ";", "}"...
Returns the minimal y-value of the given geometry. @param geom Geometry @return The minimal y-value of the given geometry, or null if the geometry is null.
[ "Returns", "the", "minimal", "y", "-", "value", "of", "the", "given", "geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_YMin.java#L48-L54
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_SimplifyPreserveTopology.java
ST_SimplifyPreserveTopology.simplyPreserve
public static Geometry simplyPreserve(Geometry geometry, double distance) { if(geometry == null){ return null; } return TopologyPreservingSimplifier.simplify(geometry, distance); }
java
public static Geometry simplyPreserve(Geometry geometry, double distance) { if(geometry == null){ return null; } return TopologyPreservingSimplifier.simplify(geometry, distance); }
[ "public", "static", "Geometry", "simplyPreserve", "(", "Geometry", "geometry", ",", "double", "distance", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "return", "TopologyPreservingSimplifier", ".", "simplify", "(", "geom...
Simplifies a geometry and ensures that the result is a valid geometry having the same dimension and number of components as the input, and with the components having the same topological relationship. @param geometry @param distance @return
[ "Simplifies", "a", "geometry", "and", "ensures", "that", "the", "result", "is", "a", "valid", "geometry", "having", "the", "same", "dimension", "and", "number", "of", "components", "as", "the", "input", "and", "with", "the", "components", "having", "the", "s...
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_SimplifyPreserveTopology.java#L51-L56
train
orbisgis/h2gis
h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunction.java
GraphFunction.prepareGraph
protected static KeyedGraph prepareGraph(Connection connection, String inputTable, String orientation, String weight, Class vertexClass, ...
java
protected static KeyedGraph prepareGraph(Connection connection, String inputTable, String orientation, String weight, Class vertexClass, ...
[ "protected", "static", "KeyedGraph", "prepareGraph", "(", "Connection", "connection", ",", "String", "inputTable", ",", "String", "orientation", ",", "String", "weight", ",", "Class", "vertexClass", ",", "Class", "edgeClass", ")", "throws", "SQLException", "{", "G...
Return a JGraphT graph from the input edges table. @param connection Connection @param inputTable Input table name @param orientation Orientation string @param weight Weight column name, null for unweighted graphs @param vertexClass @param edgeClass @return Graph @throws java.sql.SQLException
[ "Return", "a", "JGraphT", "graph", "from", "the", "input", "edges", "table", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunction.java#L50-L64
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java
GridRowSet.getCellPolygon
private Polygon getCellPolygon() { final Coordinate[] summits = new Coordinate[5]; double x1 = minX + cellI * deltaX; double y1 = minY + cellJ * deltaY; double x2 = minX + (cellI + 1) * deltaX; double y2 = minY + (cellJ + 1) * deltaY; summits[0] = new Coordinate(x1, y1); ...
java
private Polygon getCellPolygon() { final Coordinate[] summits = new Coordinate[5]; double x1 = minX + cellI * deltaX; double y1 = minY + cellJ * deltaY; double x2 = minX + (cellI + 1) * deltaX; double y2 = minY + (cellJ + 1) * deltaY; summits[0] = new Coordinate(x1, y1); ...
[ "private", "Polygon", "getCellPolygon", "(", ")", "{", "final", "Coordinate", "[", "]", "summits", "=", "new", "Coordinate", "[", "5", "]", ";", "double", "x1", "=", "minX", "+", "cellI", "*", "deltaX", ";", "double", "y1", "=", "minY", "+", "cellJ", ...
Compute the polygon corresponding to the cell @return Polygon of the cell
[ "Compute", "the", "polygon", "corresponding", "to", "the", "cell" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L143-L158
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java
GridRowSet.getCellPoint
private Point getCellPoint() { double x1 = (minX + cellI * deltaX) + (deltaX / 2d); double y1 = (minY + cellJ * deltaY) + (deltaY / 2d); cellI++; return GF.createPoint(new Coordinate(x1, y1)); }
java
private Point getCellPoint() { double x1 = (minX + cellI * deltaX) + (deltaX / 2d); double y1 = (minY + cellJ * deltaY) + (deltaY / 2d); cellI++; return GF.createPoint(new Coordinate(x1, y1)); }
[ "private", "Point", "getCellPoint", "(", ")", "{", "double", "x1", "=", "(", "minX", "+", "cellI", "*", "deltaX", ")", "+", "(", "deltaX", "/", "2d", ")", ";", "double", "y1", "=", "(", "minY", "+", "cellJ", "*", "deltaY", ")", "+", "(", "deltaY"...
Compute the point of the cell @return Center point of the cell
[ "Compute", "the", "point", "of", "the", "cell" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L165-L170
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java
GridRowSet.getFirstGeometryField
private static String getFirstGeometryField(String tableName, Connection connection) throws SQLException { // Find first geometry column List<String> geomFields = SFSUtilities.getGeometryFields(connection, TableLocation.parse(tableName, JDBCUtilities.isH2DataBase(connection.getMetaData()))); if ...
java
private static String getFirstGeometryField(String tableName, Connection connection) throws SQLException { // Find first geometry column List<String> geomFields = SFSUtilities.getGeometryFields(connection, TableLocation.parse(tableName, JDBCUtilities.isH2DataBase(connection.getMetaData()))); if ...
[ "private", "static", "String", "getFirstGeometryField", "(", "String", "tableName", ",", "Connection", "connection", ")", "throws", "SQLException", "{", "// Find first geometry column", "List", "<", "String", ">", "geomFields", "=", "SFSUtilities", ".", "getGeometryFiel...
Return the first spatial geometry field name @param tableName @param connection @return the name of the first geometry column @throws SQLException
[ "Return", "the", "first", "spatial", "geometry", "field", "name" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L198-L206
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java
GridRowSet.initParameters
private void initParameters() { this.minX = envelope.getMinX(); this.minY = envelope.getMinY(); double cellWidth = envelope.getWidth(); double cellHeight = envelope.getHeight(); this.maxI = (int) Math.ceil(cellWidth / deltaX); this.maxJ = (int) Math.ceil(c...
java
private void initParameters() { this.minX = envelope.getMinX(); this.minY = envelope.getMinY(); double cellWidth = envelope.getWidth(); double cellHeight = envelope.getHeight(); this.maxI = (int) Math.ceil(cellWidth / deltaX); this.maxJ = (int) Math.ceil(c...
[ "private", "void", "initParameters", "(", ")", "{", "this", ".", "minX", "=", "envelope", ".", "getMinX", "(", ")", ";", "this", ".", "minY", "=", "envelope", ".", "getMinY", "(", ")", ";", "double", "cellWidth", "=", "envelope", ".", "getWidth", "(", ...
Compute the parameters need to create each cells
[ "Compute", "the", "parameters", "need", "to", "create", "each", "cells" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L212-L221
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java
GridRowSet.getResultSet
public ResultSet getResultSet() throws SQLException { SimpleResultSet srs = new SimpleResultSet(this); srs.addColumn("THE_GEOM", Types.JAVA_OBJECT, "GEOMETRY", 0, 0); srs.addColumn("ID", Types.INTEGER, 10, 0); srs.addColumn("ID_COL", Types.INTEGER, 10, 0); srs.addColumn("ID_ROW",...
java
public ResultSet getResultSet() throws SQLException { SimpleResultSet srs = new SimpleResultSet(this); srs.addColumn("THE_GEOM", Types.JAVA_OBJECT, "GEOMETRY", 0, 0); srs.addColumn("ID", Types.INTEGER, 10, 0); srs.addColumn("ID_COL", Types.INTEGER, 10, 0); srs.addColumn("ID_ROW",...
[ "public", "ResultSet", "getResultSet", "(", ")", "throws", "SQLException", "{", "SimpleResultSet", "srs", "=", "new", "SimpleResultSet", "(", "this", ")", ";", "srs", ".", "addColumn", "(", "\"THE_GEOM\"", ",", "Types", ".", "JAVA_OBJECT", ",", "\"GEOMETRY\"", ...
Give the regular grid @return ResultSet @throws SQLException
[ "Give", "the", "regular", "grid" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L229-L236
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/trigonometry/ST_Azimuth.java
ST_Azimuth.azimuth
public static Double azimuth(Geometry pointA, Geometry pointB){ if(pointA == null||pointB == null){ return null; } if ((pointA instanceof Point) && (pointB instanceof Point)) { Double angle ; double x0 = ((Point) pointA).getX(); double y0 = ((Point...
java
public static Double azimuth(Geometry pointA, Geometry pointB){ if(pointA == null||pointB == null){ return null; } if ((pointA instanceof Point) && (pointB instanceof Point)) { Double angle ; double x0 = ((Point) pointA).getX(); double y0 = ((Point...
[ "public", "static", "Double", "azimuth", "(", "Geometry", "pointA", ",", "Geometry", "pointB", ")", "{", "if", "(", "pointA", "==", "null", "||", "pointB", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "(", "pointA", "instanceof", "Poi...
This code compute the angle in radian as postgis does. @author : Jose Martinez-Llario from JASPA. JAva SPAtial for SQL @param pointA @param pointB @return
[ "This", "code", "compute", "the", "angle", "in", "radian", "as", "postgis", "does", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/trigonometry/ST_Azimuth.java#L53-L102
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_YMax.java
ST_YMax.getMaxY
public static Double getMaxY(Geometry geom) { if (geom != null) { return geom.getEnvelopeInternal().getMaxY(); } else { return null; } }
java
public static Double getMaxY(Geometry geom) { if (geom != null) { return geom.getEnvelopeInternal().getMaxY(); } else { return null; } }
[ "public", "static", "Double", "getMaxY", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "!=", "null", ")", "{", "return", "geom", ".", "getEnvelopeInternal", "(", ")", ".", "getMaxY", "(", ")", ";", "}", "else", "{", "return", "null", ";", "}"...
Returns the maximal y-value of the given geometry. @param geom Geometry @return The maximal y-value of the given geometry, or null if the geometry is null.
[ "Returns", "the", "maximal", "y", "-", "value", "of", "the", "given", "geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_YMax.java#L48-L54
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java
GJGeometryReader.parsePoint
private Point parsePoint(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 coordi...
java
private Point parsePoint(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 coordi...
[ "private", "Point", "parsePoint", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "jp", ".", "nextToken", "(", ")", ";", "// FIELD_NAME coordinates ", "String", "coordinatesField", "=", "jp", ".", "getText", "(", ")", ";",...
Parses one position Syntax: { "type": "Point", "coordinates": [100.0, 0.0] } @param jsParser @throws IOException @return Point
[ "Parses", "one", "position" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java#L91-L102
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java
GJGeometryReader.parseMultiPoint
private MultiPoint parseMultiPoint(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME coordinates String coordinatesField = jp.getText(); if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) { jp.nextToken(); // START_ARRAY [ coordinat...
java
private MultiPoint parseMultiPoint(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME coordinates String coordinatesField = jp.getText(); if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) { jp.nextToken(); // START_ARRAY [ coordinat...
[ "private", "MultiPoint", "parseMultiPoint", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "jp", ".", "nextToken", "(", ")", ";", "// FIELD_NAME coordinates ", "String", "coordinatesField", "=", "jp", ".", "getText", "(", "...
Parses an array of positions Syntax: { "type": "MultiPoint", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] } @param jsParser @throws IOException @return MultiPoint
[ "Parses", "an", "array", "of", "positions" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java#L115-L126
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java
GJGeometryReader.parseCoordinate
private Coordinate parseCoordinate(JsonParser jp) throws IOException { jp.nextToken(); double x = jp.getDoubleValue();// VALUE_NUMBER_FLOAT jp.nextToken(); // second value double y = jp.getDoubleValue(); Coordinate coord; //We look for a z value jp.nextToken(); ...
java
private Coordinate parseCoordinate(JsonParser jp) throws IOException { jp.nextToken(); double x = jp.getDoubleValue();// VALUE_NUMBER_FLOAT jp.nextToken(); // second value double y = jp.getDoubleValue(); Coordinate coord; //We look for a z value jp.nextToken(); ...
[ "private", "Coordinate", "parseCoordinate", "(", "JsonParser", "jp", ")", "throws", "IOException", "{", "jp", ".", "nextToken", "(", ")", ";", "double", "x", "=", "jp", ".", "getDoubleValue", "(", ")", ";", "// VALUE_NUMBER_FLOAT", "jp", ".", "nextToken", "(...
Parses a GeoJSON coordinate array and returns a JTS coordinate. 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", "returns", "a", "JTS", "coordinate", ".", "The", "first", "token", "corresponds", "to", "the", "first", "X", "value", ".", "The", "last", "token", "correponds", "to", "the", "end", "of", "the", "coord...
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java#L348-L365
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_ToMultiLine.java
ST_ToMultiLine.createMultiLineString
public static MultiLineString createMultiLineString(Geometry geom) throws SQLException { if (geom != null) { if (geom.getDimension() > 0) { final List<LineString> lineStrings = new LinkedList<LineString>(); toMultiLineString(geom, lineStrings); return ...
java
public static MultiLineString createMultiLineString(Geometry geom) throws SQLException { if (geom != null) { if (geom.getDimension() > 0) { final List<LineString> lineStrings = new LinkedList<LineString>(); toMultiLineString(geom, lineStrings); return ...
[ "public", "static", "MultiLineString", "createMultiLineString", "(", "Geometry", "geom", ")", "throws", "SQLException", "{", "if", "(", "geom", "!=", "null", ")", "{", "if", "(", "geom", ".", "getDimension", "(", ")", ">", "0", ")", "{", "final", "List", ...
Constructs a MultiLineString from the given geometry's coordinates. @param geom Geometry @return A MultiLineString constructed from the given geometry's coordinates @throws SQLException
[ "Constructs", "a", "MultiLineString", "from", "the", "given", "geometry", "s", "coordinates", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_ToMultiLine.java#L58-L71
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVRead.java
TSVRead.readTSV
public static void readTSV(Connection connection, String fileName, String tableReference) throws SQLException, FileNotFoundException, IOException { File file = URIUtilities.fileFromString(fileName); if (FileUtil.isFileImportable(file, "tsv")) { TSVDriverFunction tsvDriver = new TSVDriverFunc...
java
public static void readTSV(Connection connection, String fileName, String tableReference) throws SQLException, FileNotFoundException, IOException { File file = URIUtilities.fileFromString(fileName); if (FileUtil.isFileImportable(file, "tsv")) { TSVDriverFunction tsvDriver = new TSVDriverFunc...
[ "public", "static", "void", "readTSV", "(", "Connection", "connection", ",", "String", "fileName", ",", "String", "tableReference", ")", "throws", "SQLException", ",", "FileNotFoundException", ",", "IOException", "{", "File", "file", "=", "URIUtilities", ".", "fil...
Copy data from TSV File into a new table in specified connection. @param connection @param fileName @param tableReference @throws SQLException @throws FileNotFoundException @throws IOException
[ "Copy", "data", "from", "TSV", "File", "into", "a", "new", "table", "in", "specified", "connection", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVRead.java#L60-L66
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/affine_transformations/ST_Translate.java
ST_Translate.translate
public static Geometry translate(Geometry geom, double x, double y) { if (geom == null) { return null; } final CoordinateSequenceDimensionFilter filter = new CoordinateSequenceDimensionFilter(); geom.apply(filter); checkMixed(filter); return Af...
java
public static Geometry translate(Geometry geom, double x, double y) { if (geom == null) { return null; } final CoordinateSequenceDimensionFilter filter = new CoordinateSequenceDimensionFilter(); geom.apply(filter); checkMixed(filter); return Af...
[ "public", "static", "Geometry", "translate", "(", "Geometry", "geom", ",", "double", "x", ",", "double", "y", ")", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "final", "CoordinateSequenceDimensionFilter", "filter", "=", "new...
Translates a geometry using X and Y offsets. @param geom Geometry @param x X @param y Y @return Translated geometry
[ "Translates", "a", "geometry", "using", "X", "and", "Y", "offsets", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/affine_transformations/ST_Translate.java#L57-L66
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/affine_transformations/ST_Translate.java
ST_Translate.translate
public static Geometry translate(Geometry geom, double x, double y, double z) { if (geom == null) { return null; } final CoordinateSequenceDimensionFilter filter = new CoordinateSequenceDimensionFilter(); geom.apply(filter); checkMixed(filter); ...
java
public static Geometry translate(Geometry geom, double x, double y, double z) { if (geom == null) { return null; } final CoordinateSequenceDimensionFilter filter = new CoordinateSequenceDimensionFilter(); geom.apply(filter); checkMixed(filter); ...
[ "public", "static", "Geometry", "translate", "(", "Geometry", "geom", ",", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "final", "CoordinateSequenceDimensionFilter",...
Translates a geometry using X, Y and Z offsets. @param geom Geometry @param x X @param y Y @param z Z @return Translated geometry
[ "Translates", "a", "geometry", "using", "X", "Y", "and", "Z", "offsets", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/affine_transformations/ST_Translate.java#L77-L93
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_GeomFromWKB.java
ST_GeomFromWKB.toGeometry
public static Geometry toGeometry(byte[] bytes, int srid) throws SQLException{ if(bytes==null) { return null; } WKBReader wkbReader = new WKBReader(); try { Geometry geometry = wkbReader.read(bytes); geometry.setSRID(srid); return geometry;...
java
public static Geometry toGeometry(byte[] bytes, int srid) throws SQLException{ if(bytes==null) { return null; } WKBReader wkbReader = new WKBReader(); try { Geometry geometry = wkbReader.read(bytes); geometry.setSRID(srid); return geometry;...
[ "public", "static", "Geometry", "toGeometry", "(", "byte", "[", "]", "bytes", ",", "int", "srid", ")", "throws", "SQLException", "{", "if", "(", "bytes", "==", "null", ")", "{", "return", "null", ";", "}", "WKBReader", "wkbReader", "=", "new", "WKBReader...
Convert a WKB representation to a geometry @param bytes the input WKB object @param srid the input SRID @return @throws SQLException
[ "Convert", "a", "WKB", "representation", "to", "a", "geometry" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_GeomFromWKB.java#L54-L66
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_MaxDistance.java
ST_MaxDistance.maxDistance
public static Double maxDistance(Geometry geomA, Geometry geomB) { return new MaxDistanceOp(geomA, geomB).getDistance(); }
java
public static Double maxDistance(Geometry geomA, Geometry geomB) { return new MaxDistanceOp(geomA, geomB).getDistance(); }
[ "public", "static", "Double", "maxDistance", "(", "Geometry", "geomA", ",", "Geometry", "geomB", ")", "{", "return", "new", "MaxDistanceOp", "(", "geomA", ",", "geomB", ")", ".", "getDistance", "(", ")", ";", "}" ]
Return the maximum distance @param geomA @param geomB @return
[ "Return", "the", "maximum", "distance" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_MaxDistance.java#L52-L54
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParser.java
AbstractGpxParser.characters
@Override public void characters(char[] ch, int start, int length) throws SAXException { contentBuffer.append(String.copyValueOf(ch, start, length)); }
java
@Override public void characters(char[] ch, int start, int length) throws SAXException { contentBuffer.append(String.copyValueOf(ch, start, length)); }
[ "@", "Override", "public", "void", "characters", "(", "char", "[", "]", "ch", ",", "int", "start", ",", "int", "length", ")", "throws", "SAXException", "{", "contentBuffer", ".", "append", "(", "String", ".", "copyValueOf", "(", "ch", ",", "start", ",", ...
Fires one or more times for each text node encountered. It saves text informations in contentBuffer. @param ch The characters from the XML document @param start The start position in the array @param length The number of characters to read from the array @throws SAXException Any SAX exception, possibly wrapping anothe...
[ "Fires", "one", "or", "more", "times", "for", "each", "text", "node", "encountered", ".", "It", "saves", "text", "informations", "in", "contentBuffer", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParser.java#L69-L72
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java
TableLocation.quoteIdentifier
public static String quoteIdentifier(String identifier, boolean isH2DataBase) { if((isH2DataBase && (Constants.H2_RESERVED_WORDS.contains(identifier.toUpperCase()) || !H2_SPECIAL_NAME_PATTERN.matcher(identifier).find())) || (!isH2DataBase && (Constants.POSTGIS_RESERVED_WO...
java
public static String quoteIdentifier(String identifier, boolean isH2DataBase) { if((isH2DataBase && (Constants.H2_RESERVED_WORDS.contains(identifier.toUpperCase()) || !H2_SPECIAL_NAME_PATTERN.matcher(identifier).find())) || (!isH2DataBase && (Constants.POSTGIS_RESERVED_WO...
[ "public", "static", "String", "quoteIdentifier", "(", "String", "identifier", ",", "boolean", "isH2DataBase", ")", "{", "if", "(", "(", "isH2DataBase", "&&", "(", "Constants", ".", "H2_RESERVED_WORDS", ".", "contains", "(", "identifier", ".", "toUpperCase", "(",...
Quote identifier only if necessary. Require database knowledge. @param identifier Catalog,Schema,Table or Field name @param isH2DataBase True if the quote is for H2, false if for POSTGRE @return Quoted Identifier
[ "Quote", "identifier", "only", "if", "necessary", ".", "Require", "database", "knowledge", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java#L96-L105
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java
TableLocation.parse
public static TableLocation parse(String concatenatedTableLocation, Boolean isH2Database) { List<String> parts = new LinkedList<String>(); String catalog,schema,table; catalog = table = schema = ""; StringTokenizer st = new StringTokenizer(concatenatedTableLocation, ".`\"", true); ...
java
public static TableLocation parse(String concatenatedTableLocation, Boolean isH2Database) { List<String> parts = new LinkedList<String>(); String catalog,schema,table; catalog = table = schema = ""; StringTokenizer st = new StringTokenizer(concatenatedTableLocation, ".`\"", true); ...
[ "public", "static", "TableLocation", "parse", "(", "String", "concatenatedTableLocation", ",", "Boolean", "isH2Database", ")", "{", "List", "<", "String", ">", "parts", "=", "new", "LinkedList", "<", "String", ">", "(", ")", ";", "String", "catalog", ",", "s...
Convert catalog.schema.table, schema.table or table into a TableLocation instance. Non-specified schema or catalogs are converted to the empty string. @param concatenatedTableLocation Table location [[Catalog.]Schema.]Table @param isH2Database True if H2, False if PostGreSQL, null if unknown @return Java ...
[ "Convert", "catalog", ".", "schema", ".", "table", "schema", ".", "table", "or", "table", "into", "a", "TableLocation", "instance", ".", "Non", "-", "specified", "schema", "or", "catalogs", "are", "converted", "to", "the", "empty", "string", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java#L179-L224
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java
TableLocation.capsIdentifier
public static String capsIdentifier(String identifier, Boolean isH2Database) { if(isH2Database != null) { if(isH2Database) { return identifier.toUpperCase(); } else { return identifier.toLowerCase(); } } else { return identi...
java
public static String capsIdentifier(String identifier, Boolean isH2Database) { if(isH2Database != null) { if(isH2Database) { return identifier.toUpperCase(); } else { return identifier.toLowerCase(); } } else { return identi...
[ "public", "static", "String", "capsIdentifier", "(", "String", "identifier", ",", "Boolean", "isH2Database", ")", "{", "if", "(", "isH2Database", "!=", "null", ")", "{", "if", "(", "isH2Database", ")", "{", "return", "identifier", ".", "toUpperCase", "(", ")...
Change case of parameters to make it more user-friendly. @param identifier Table, Catalog, Schema, or column name @param isH2Database True if H2, False if PostGreSQL, null if unknown @return Upper or lower case version of identifier
[ "Change", "case", "of", "parameters", "to", "make", "it", "more", "user", "-", "friendly", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java#L233-L243
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java
MakeValidOp.decompose
private static void decompose(Geometry geometry, Collection<Geometry> list) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry component = geometry.getGeometryN(i); if (component instanceof GeometryCollection) { decompose(component, list); } el...
java
private static void decompose(Geometry geometry, Collection<Geometry> list) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry component = geometry.getGeometryN(i); if (component instanceof GeometryCollection) { decompose(component, list); } el...
[ "private", "static", "void", "decompose", "(", "Geometry", "geometry", ",", "Collection", "<", "Geometry", ">", "list", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "geometry", ".", "getNumGeometries", "(", ")", ";", "i", "++", ")", "{"...
Decompose a geometry recursively into simple components. @param geometry input geometry @param list a list of simple components (Point, LineString or Polygon)
[ "Decompose", "a", "geometry", "recursively", "into", "simple", "components", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L98-L107
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java
MakeValidOp.removeLowerDimension
private void removeLowerDimension(Geometry geometry, List<Geometry> result, int dimension) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry g = geometry.getGeometryN(i); if (g instanceof GeometryCollection) { removeLowerDimension(g, result, dimension); ...
java
private void removeLowerDimension(Geometry geometry, List<Geometry> result, int dimension) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry g = geometry.getGeometryN(i); if (g instanceof GeometryCollection) { removeLowerDimension(g, result, dimension); ...
[ "private", "void", "removeLowerDimension", "(", "Geometry", "geometry", ",", "List", "<", "Geometry", ">", "result", ",", "int", "dimension", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "geometry", ".", "getNumGeometries", "(", ")", ";", ...
Reursively remove geometries with a dimension less than dimension parameter
[ "Reursively", "remove", "geometries", "with", "a", "dimension", "less", "than", "dimension", "parameter" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L237-L246
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java
MakeValidOp.unionAdjacentPolygons
private Collection<Geometry> unionAdjacentPolygons(Collection<Geometry> list) { UnaryUnionOp op = new UnaryUnionOp(list); Geometry result = op.union(); if (result.getNumGeometries() < list.size()) { list.clear(); for (int i = 0; i < result.getNumGeometries(); i++) { ...
java
private Collection<Geometry> unionAdjacentPolygons(Collection<Geometry> list) { UnaryUnionOp op = new UnaryUnionOp(list); Geometry result = op.union(); if (result.getNumGeometries() < list.size()) { list.clear(); for (int i = 0; i < result.getNumGeometries(); i++) { ...
[ "private", "Collection", "<", "Geometry", ">", "unionAdjacentPolygons", "(", "Collection", "<", "Geometry", ">", "list", ")", "{", "UnaryUnionOp", "op", "=", "new", "UnaryUnionOp", "(", "list", ")", ";", "Geometry", "result", "=", "op", ".", "union", "(", ...
Union adjacent polygons to make an invalid MultiPolygon valid
[ "Union", "adjacent", "polygons", "to", "make", "an", "invalid", "MultiPolygon", "valid" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L249-L259
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java
MakeValidOp.makePointValid
private Point makePointValid(Point point) { CoordinateSequence sequence = point.getCoordinateSequence(); GeometryFactory factory = point.getFactory(); CoordinateSequenceFactory csFactory = factory.getCoordinateSequenceFactory(); if (sequence.size() == 0) { return point; ...
java
private Point makePointValid(Point point) { CoordinateSequence sequence = point.getCoordinateSequence(); GeometryFactory factory = point.getFactory(); CoordinateSequenceFactory csFactory = factory.getCoordinateSequenceFactory(); if (sequence.size() == 0) { return point; ...
[ "private", "Point", "makePointValid", "(", "Point", "point", ")", "{", "CoordinateSequence", "sequence", "=", "point", ".", "getCoordinateSequence", "(", ")", ";", "GeometryFactory", "factory", "=", "point", ".", "getFactory", "(", ")", ";", "CoordinateSequenceFac...
If X or Y is null, return an empty Point
[ "If", "X", "or", "Y", "is", "null", "return", "an", "empty", "Point" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L262-L275
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java
MakeValidOp.makeSequenceValid
private static CoordinateSequence makeSequenceValid(CoordinateSequence sequence, boolean preserveDuplicateCoord, boolean close) { int dim = sequence.getDimension(); // we add 1 to the sequence size for the case where we have to close the linear ring double[] array = new double[(seque...
java
private static CoordinateSequence makeSequenceValid(CoordinateSequence sequence, boolean preserveDuplicateCoord, boolean close) { int dim = sequence.getDimension(); // we add 1 to the sequence size for the case where we have to close the linear ring double[] array = new double[(seque...
[ "private", "static", "CoordinateSequence", "makeSequenceValid", "(", "CoordinateSequence", "sequence", ",", "boolean", "preserveDuplicateCoord", ",", "boolean", "close", ")", "{", "int", "dim", "=", "sequence", ".", "getDimension", "(", ")", ";", "// we add 1 to the s...
Returns a coordinateSequence free of Coordinates with X or Y NaN value, and if desired, free of duplicated coordinates. makeSequenceValid keeps the original dimension of input sequence. @param sequence input sequence of coordinates @param preserveDuplicateCoord if duplicate coordinates must be preserved @param close i...
[ "Returns", "a", "coordinateSequence", "free", "of", "Coordinates", "with", "X", "or", "Y", "NaN", "value", "and", "if", "desired", "free", "of", "duplicated", "coordinates", ".", "makeSequenceValid", "keeps", "the", "original", "dimension", "of", "input", "seque...
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L287-L333
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java
MakeValidOp.getSegments
private Set<LineString> getSegments(Collection<LineString> lines) { Set<LineString> set = new HashSet<>(); for (LineString line : lines) { Coordinate[] cc = line.getCoordinates(); for (int i = 1; i < cc.length; i++) { if (!cc[i - 1].equals(cc[i])) { ...
java
private Set<LineString> getSegments(Collection<LineString> lines) { Set<LineString> set = new HashSet<>(); for (LineString line : lines) { Coordinate[] cc = line.getCoordinates(); for (int i = 1; i < cc.length; i++) { if (!cc[i - 1].equals(cc[i])) { ...
[ "private", "Set", "<", "LineString", ">", "getSegments", "(", "Collection", "<", "LineString", ">", "lines", ")", "{", "Set", "<", "LineString", ">", "set", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "LineString", "line", ":", "lines", ")"...
Return a set of segments from a linestring @param lines @return
[ "Return", "a", "set", "of", "segments", "from", "a", "linestring" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L551-L564
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java
MakeValidOp.restoreDim4
private Collection<Geometry> restoreDim4(Collection<Geometry> geoms, Map<Coordinate, Double> map) { GeometryFactory factory = new GeometryFactory( new PackedCoordinateSequenceFactory(PackedCoordinateSequenceFactory.DOUBLE, 4)); Collection<Geometry> result = new ArrayList<>(); for...
java
private Collection<Geometry> restoreDim4(Collection<Geometry> geoms, Map<Coordinate, Double> map) { GeometryFactory factory = new GeometryFactory( new PackedCoordinateSequenceFactory(PackedCoordinateSequenceFactory.DOUBLE, 4)); Collection<Geometry> result = new ArrayList<>(); for...
[ "private", "Collection", "<", "Geometry", ">", "restoreDim4", "(", "Collection", "<", "Geometry", ">", "geoms", ",", "Map", "<", "Coordinate", ",", "Double", ">", "map", ")", "{", "GeometryFactory", "factory", "=", "new", "GeometryFactory", "(", "new", "Pack...
Use ring to restore M values on geoms
[ "Use", "ring", "to", "restore", "M", "values", "on", "geoms" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L567-L594
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java
MakeValidOp.restoreDim4
private CoordinateSequence restoreDim4(CoordinateSequence cs, Map<Coordinate, Double> map) { CoordinateSequence seq = new PackedCoordinateSequenceFactory(DOUBLE, 4).create(cs.size(), 4); for (int i = 0; i < cs.size(); i++) { seq.setOrdinate(i, 0, cs.getOrdinate(i, 0)); seq.setOrd...
java
private CoordinateSequence restoreDim4(CoordinateSequence cs, Map<Coordinate, Double> map) { CoordinateSequence seq = new PackedCoordinateSequenceFactory(DOUBLE, 4).create(cs.size(), 4); for (int i = 0; i < cs.size(); i++) { seq.setOrdinate(i, 0, cs.getOrdinate(i, 0)); seq.setOrd...
[ "private", "CoordinateSequence", "restoreDim4", "(", "CoordinateSequence", "cs", ",", "Map", "<", "Coordinate", ",", "Double", ">", "map", ")", "{", "CoordinateSequence", "seq", "=", "new", "PackedCoordinateSequenceFactory", "(", "DOUBLE", ",", "4", ")", ".", "c...
Use map to restore M values on the coordinate array
[ "Use", "map", "to", "restore", "M", "values", "on", "the", "coordinate", "array" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L624-L634
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXTablesFactory.java
GPXTablesFactory.createTrackTable
public static PreparedStatement createTrackTable(Connection connection, String trackTableName,boolean isH2) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(trackTableName).append(" ("); ...
java
public static PreparedStatement createTrackTable(Connection connection, String trackTableName,boolean isH2) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(trackTableName).append(" ("); ...
[ "public", "static", "PreparedStatement", "createTrackTable", "(", "Connection", "connection", ",", "String", "trackTableName", ",", "boolean", "isH2", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatement", "("...
Creat the track table @param connection @param trackTableName @param isH2 set true if it's an H2 database @return @throws SQLException
[ "Creat", "the", "track", "table" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXTablesFactory.java#L204-L233
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXTablesFactory.java
GPXTablesFactory.createTrackSegmentsTable
public static PreparedStatement createTrackSegmentsTable(Connection connection, String trackSegementsTableName,boolean isH2) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(trackSegementsTableNam...
java
public static PreparedStatement createTrackSegmentsTable(Connection connection, String trackSegementsTableName,boolean isH2) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(trackSegementsTableNam...
[ "public", "static", "PreparedStatement", "createTrackSegmentsTable", "(", "Connection", "connection", ",", "String", "trackSegementsTableName", ",", "boolean", "isH2", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "create...
Create the track segments table to store the segments of a track @param connection @param trackSegementsTableName @param isH2 set true if it's an H2 database @return @throws SQLException
[ "Create", "the", "track", "segments", "table", "to", "store", "the", "segments", "of", "a", "track" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXTablesFactory.java#L244-L266
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXTablesFactory.java
GPXTablesFactory.dropOSMTables
public static void dropOSMTables(Connection connection, boolean isH2, String tablePrefix) throws SQLException { TableLocation requestedTable = TableLocation.parse(tablePrefix, isH2); String gpxTableName = requestedTable.getTable(); String[] gpxTables = new String[]{WAYPOINT,ROUTE,ROUTEPO...
java
public static void dropOSMTables(Connection connection, boolean isH2, String tablePrefix) throws SQLException { TableLocation requestedTable = TableLocation.parse(tablePrefix, isH2); String gpxTableName = requestedTable.getTable(); String[] gpxTables = new String[]{WAYPOINT,ROUTE,ROUTEPO...
[ "public", "static", "void", "dropOSMTables", "(", "Connection", "connection", ",", "boolean", "isH2", ",", "String", "tablePrefix", ")", "throws", "SQLException", "{", "TableLocation", "requestedTable", "=", "TableLocation", ".", "parse", "(", "tablePrefix", ",", ...
Drop the existing GPX tables used to store the imported OSM GPX @param connection @param isH2 @param tablePrefix @throws SQLException
[ "Drop", "the", "existing", "GPX", "tables", "used", "to", "store", "the", "imported", "OSM", "GPX" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXTablesFactory.java#L331-L347
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/AltitudeMode.java
AltitudeMode.append
public static void append(int altitudeMode, StringBuilder sb) { switch (altitudeMode) { case KML_CLAMPTOGROUND: sb.append("<kml:altitudeMode>clampToGround</kml:altitudeMode>"); return; case KML_RELATIVETOGROUND: sb.append("<kml:altitudeMode...
java
public static void append(int altitudeMode, StringBuilder sb) { switch (altitudeMode) { case KML_CLAMPTOGROUND: sb.append("<kml:altitudeMode>clampToGround</kml:altitudeMode>"); return; case KML_RELATIVETOGROUND: sb.append("<kml:altitudeMode...
[ "public", "static", "void", "append", "(", "int", "altitudeMode", ",", "StringBuilder", "sb", ")", "{", "switch", "(", "altitudeMode", ")", "{", "case", "KML_CLAMPTOGROUND", ":", "sb", ".", "append", "(", "\"<kml:altitudeMode>clampToGround</kml:altitudeMode>\"", ")"...
Generate a string value corresponding to the altitude mode. @param altitudeMode @param sb
[ "Generate", "a", "string", "value", "corresponding", "to", "the", "altitude", "mode", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/AltitudeMode.java#L73-L98
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extrudePolygonAsGeometry
public static GeometryCollection extrudePolygonAsGeometry(Polygon polygon, double height){ GeometryFactory factory = polygon.getFactory(); Geometry[] geometries = new Geometry[3]; //Extract floor //We process the exterior ring final LineString shell = getClockWise(polygo...
java
public static GeometryCollection extrudePolygonAsGeometry(Polygon polygon, double height){ GeometryFactory factory = polygon.getFactory(); Geometry[] geometries = new Geometry[3]; //Extract floor //We process the exterior ring final LineString shell = getClockWise(polygo...
[ "public", "static", "GeometryCollection", "extrudePolygonAsGeometry", "(", "Polygon", "polygon", ",", "double", "height", ")", "{", "GeometryFactory", "factory", "=", "polygon", ".", "getFactory", "(", ")", ";", "Geometry", "[", "]", "geometries", "=", "new", "G...
Extrude the polygon as a collection of geometries The output geometryCollection contains the floor, the walls and the roof. @param polygon @param height @return
[ "Extrude", "the", "polygon", "as", "a", "collection", "of", "geometries", "The", "output", "geometryCollection", "contains", "the", "floor", "the", "walls", "and", "the", "roof", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L49-L75
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extrudeLineStringAsGeometry
public static GeometryCollection extrudeLineStringAsGeometry(LineString lineString, double height){ Geometry[] geometries = new Geometry[3]; GeometryFactory factory = lineString.getFactory(); //Extract the walls Coordinate[] coords = lineString.getCoordinates(); P...
java
public static GeometryCollection extrudeLineStringAsGeometry(LineString lineString, double height){ Geometry[] geometries = new Geometry[3]; GeometryFactory factory = lineString.getFactory(); //Extract the walls Coordinate[] coords = lineString.getCoordinates(); P...
[ "public", "static", "GeometryCollection", "extrudeLineStringAsGeometry", "(", "LineString", "lineString", ",", "double", "height", ")", "{", "Geometry", "[", "]", "geometries", "=", "new", "Geometry", "[", "3", "]", ";", "GeometryFactory", "factory", "=", "lineStr...
Extrude the linestring as a collection of geometries The output geometryCollection contains the floor, the walls and the roof. @param lineString @param height @return
[ "Extrude", "the", "linestring", "as", "a", "collection", "of", "geometries", "The", "output", "geometryCollection", "contains", "the", "floor", "the", "walls", "and", "the", "roof", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L84-L98
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extractRoof
public static Geometry extractRoof(LineString lineString, double height) { LineString result = (LineString)lineString.copy(); result.apply(new TranslateCoordinateSequenceFilter(height)); return result; }
java
public static Geometry extractRoof(LineString lineString, double height) { LineString result = (LineString)lineString.copy(); result.apply(new TranslateCoordinateSequenceFilter(height)); return result; }
[ "public", "static", "Geometry", "extractRoof", "(", "LineString", "lineString", ",", "double", "height", ")", "{", "LineString", "result", "=", "(", "LineString", ")", "lineString", ".", "copy", "(", ")", ";", "result", ".", "apply", "(", "new", "TranslateCo...
Extract the linestring "roof". @param lineString @param height @return
[ "Extract", "the", "linestring", "roof", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L107-L111
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extractWalls
public static MultiPolygon extractWalls(Polygon polygon, double height){ GeometryFactory factory = polygon.getFactory(); //We process the exterior ring final LineString shell = getClockWise(polygon.getExteriorRing()); ArrayList<Polygon> walls = new ArrayList<Polygon>(); for (in...
java
public static MultiPolygon extractWalls(Polygon polygon, double height){ GeometryFactory factory = polygon.getFactory(); //We process the exterior ring final LineString shell = getClockWise(polygon.getExteriorRing()); ArrayList<Polygon> walls = new ArrayList<Polygon>(); for (in...
[ "public", "static", "MultiPolygon", "extractWalls", "(", "Polygon", "polygon", ",", "double", "height", ")", "{", "GeometryFactory", "factory", "=", "polygon", ".", "getFactory", "(", ")", ";", "//We process the exterior ring ", "final", "LineString", "shell", "=", ...
Extract the walls from a polygon @param polygon @param height @return
[ "Extract", "the", "walls", "from", "a", "polygon" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L121-L141
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extractRoof
public static Polygon extractRoof(Polygon polygon, double height) { GeometryFactory factory = polygon.getFactory(); Polygon roofP = (Polygon)polygon.copy(); roofP.apply(new TranslateCoordinateSequenceFilter(height)); final LinearRing shell = factory.createLinearRing(getCounterClockWise(...
java
public static Polygon extractRoof(Polygon polygon, double height) { GeometryFactory factory = polygon.getFactory(); Polygon roofP = (Polygon)polygon.copy(); roofP.apply(new TranslateCoordinateSequenceFilter(height)); final LinearRing shell = factory.createLinearRing(getCounterClockWise(...
[ "public", "static", "Polygon", "extractRoof", "(", "Polygon", "polygon", ",", "double", "height", ")", "{", "GeometryFactory", "factory", "=", "polygon", ".", "getFactory", "(", ")", ";", "Polygon", "roofP", "=", "(", "Polygon", ")", "polygon", ".", "copy", ...
Extract the roof of a polygon @param polygon @param height @return
[ "Extract", "the", "roof", "of", "a", "polygon" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L150-L162
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extractWalls
public static MultiPolygon extractWalls(LineString lineString, double height) { GeometryFactory factory = lineString.getFactory(); //Extract the walls Coordinate[] coords = lineString.getCoordinates(); Polygon[] walls = new Polygon[coords.length - 1]; for (int i = 0; i < ...
java
public static MultiPolygon extractWalls(LineString lineString, double height) { GeometryFactory factory = lineString.getFactory(); //Extract the walls Coordinate[] coords = lineString.getCoordinates(); Polygon[] walls = new Polygon[coords.length - 1]; for (int i = 0; i < ...
[ "public", "static", "MultiPolygon", "extractWalls", "(", "LineString", "lineString", ",", "double", "height", ")", "{", "GeometryFactory", "factory", "=", "lineString", ".", "getFactory", "(", ")", ";", "//Extract the walls ", "Coordinate", "[", "]", "coords"...
Extrude the LineString as a set of walls. @param lineString @param height @return
[ "Extrude", "the", "LineString", "as", "a", "set", "of", "walls", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L170-L179
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.getClockWise
private static LineString getClockWise(final LineString lineString) { final Coordinate c0 = lineString.getCoordinateN(0); final Coordinate c1 = lineString.getCoordinateN(1); final Coordinate c2 = lineString.getCoordinateN(2); lineString.apply(new UpdateZCoordinateSequenceFilter(0, 3)); ...
java
private static LineString getClockWise(final LineString lineString) { final Coordinate c0 = lineString.getCoordinateN(0); final Coordinate c1 = lineString.getCoordinateN(1); final Coordinate c2 = lineString.getCoordinateN(2); lineString.apply(new UpdateZCoordinateSequenceFilter(0, 3)); ...
[ "private", "static", "LineString", "getClockWise", "(", "final", "LineString", "lineString", ")", "{", "final", "Coordinate", "c0", "=", "lineString", ".", "getCoordinateN", "(", "0", ")", ";", "final", "Coordinate", "c1", "=", "lineString", ".", "getCoordinateN...
Reverse the LineString to be oriented clockwise. All NaN z values are replaced by a zero value. @param lineString @return
[ "Reverse", "the", "LineString", "to", "be", "oriented", "clockwise", ".", "All", "NaN", "z", "values", "are", "replaced", "by", "a", "zero", "value", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L187-L197
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.getCounterClockWise
private static LineString getCounterClockWise(final LineString lineString) { final Coordinate c0 = lineString.getCoordinateN(0); final Coordinate c1 = lineString.getCoordinateN(1); final Coordinate c2 = lineString.getCoordinateN(2); lineString.apply(new UpdateZCoordinateSequenceFilter(0,...
java
private static LineString getCounterClockWise(final LineString lineString) { final Coordinate c0 = lineString.getCoordinateN(0); final Coordinate c1 = lineString.getCoordinateN(1); final Coordinate c2 = lineString.getCoordinateN(2); lineString.apply(new UpdateZCoordinateSequenceFilter(0,...
[ "private", "static", "LineString", "getCounterClockWise", "(", "final", "LineString", "lineString", ")", "{", "final", "Coordinate", "c0", "=", "lineString", ".", "getCoordinateN", "(", "0", ")", ";", "final", "Coordinate", "c1", "=", "lineString", ".", "getCoor...
Reverse the LineString to be oriented counter-clockwise. @param lineString @return
[ "Reverse", "the", "LineString", "to", "be", "oriented", "counter", "-", "clockwise", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L204-L214
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extractFloor
private static Polygon extractFloor(final Polygon polygon) { GeometryFactory factory = polygon.getFactory(); final LinearRing shell = factory.createLinearRing(getClockWise( polygon.getExteriorRing()).getCoordinates()); final int nbOfHoles = polygon.getNumInteriorRing(); f...
java
private static Polygon extractFloor(final Polygon polygon) { GeometryFactory factory = polygon.getFactory(); final LinearRing shell = factory.createLinearRing(getClockWise( polygon.getExteriorRing()).getCoordinates()); final int nbOfHoles = polygon.getNumInteriorRing(); f...
[ "private", "static", "Polygon", "extractFloor", "(", "final", "Polygon", "polygon", ")", "{", "GeometryFactory", "factory", "=", "polygon", ".", "getFactory", "(", ")", ";", "final", "LinearRing", "shell", "=", "factory", ".", "createLinearRing", "(", "getClockW...
Reverse the polygon to be oriented clockwise @param polygon @return
[ "Reverse", "the", "polygon", "to", "be", "oriented", "clockwise" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L221-L232
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extrudeEdge
private static Polygon extrudeEdge(final Coordinate beginPoint, Coordinate endPoint, final double height, GeometryFactory factory) { beginPoint.z = Double.isNaN(beginPoint.z) ? 0 : beginPoint.z; endPoint.z = Double.isNaN(endPoint.z) ? 0 : endPoint.z; return factory.createPoly...
java
private static Polygon extrudeEdge(final Coordinate beginPoint, Coordinate endPoint, final double height, GeometryFactory factory) { beginPoint.z = Double.isNaN(beginPoint.z) ? 0 : beginPoint.z; endPoint.z = Double.isNaN(endPoint.z) ? 0 : endPoint.z; return factory.createPoly...
[ "private", "static", "Polygon", "extrudeEdge", "(", "final", "Coordinate", "beginPoint", ",", "Coordinate", "endPoint", ",", "final", "double", "height", ",", "GeometryFactory", "factory", ")", "{", "beginPoint", ".", "z", "=", "Double", ".", "isNaN", "(", "be...
Create a polygon corresponding to the wall. @param beginPoint @param endPoint @param height @return
[ "Create", "a", "polygon", "corresponding", "to", "the", "wall", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L243-L253
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ColumnSRID.java
ColumnSRID.fetchConstraint
public static String fetchConstraint(Connection connection, String catalogName, String schemaName, String tableName) throws SQLException { // Merge column constraint and table constraint PreparedStatement pst = SFSUtilities.prepareInformationSchemaStatement(connection, catalogName, schemaName, ...
java
public static String fetchConstraint(Connection connection, String catalogName, String schemaName, String tableName) throws SQLException { // Merge column constraint and table constraint PreparedStatement pst = SFSUtilities.prepareInformationSchemaStatement(connection, catalogName, schemaName, ...
[ "public", "static", "String", "fetchConstraint", "(", "Connection", "connection", ",", "String", "catalogName", ",", "String", "schemaName", ",", "String", "tableName", ")", "throws", "SQLException", "{", "// Merge column constraint and table constraint", "PreparedStatement...
Read table constraints from database metadata. @param connection Active connection @param catalogName Catalog name or empty string @param schemaName Schema name or empty string @param tableName table name @return Found table constraints @throws SQLException
[ "Read", "table", "constraints", "from", "database", "metadata", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ColumnSRID.java#L82-L98
train
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/JDBCUrlParser.java
JDBCUrlParser.parse
public static Properties parse(String jdbcUrl) throws IllegalArgumentException { if(!jdbcUrl.startsWith(URL_STARTS)) { throw new IllegalArgumentException("JDBC Url must start with "+URL_STARTS); } String driverAndURI = jdbcUrl.substring(URL_STARTS.length()); Properties pr...
java
public static Properties parse(String jdbcUrl) throws IllegalArgumentException { if(!jdbcUrl.startsWith(URL_STARTS)) { throw new IllegalArgumentException("JDBC Url must start with "+URL_STARTS); } String driverAndURI = jdbcUrl.substring(URL_STARTS.length()); Properties pr...
[ "public", "static", "Properties", "parse", "(", "String", "jdbcUrl", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "jdbcUrl", ".", "startsWith", "(", "URL_STARTS", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"JDBC Url must s...
Convert JDBC URL into JDBC Connection properties @param jdbcUrl JDBC connection path @return Properties to be used in OSGi DataSourceFactory that does not handle {@link DataSourceFactory#JDBC_URL} @throws IllegalArgumentException Argument is not a valid JDBC connection URL or cannot be parsed by this class
[ "Convert", "JDBC", "URL", "into", "JDBC", "Connection", "properties" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/JDBCUrlParser.java#L48-L91
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_ZUpdateLineExtremities.java
ST_ZUpdateLineExtremities.updateZExtremities
public static Geometry updateZExtremities(Geometry geometry, double startZ, double endZ, boolean interpolate) { if(geometry == null){ return null; } if (geometry instanceof LineString) { return force3DStartEnd((LineString) geometry, startZ, endZ, interpolate); } e...
java
public static Geometry updateZExtremities(Geometry geometry, double startZ, double endZ, boolean interpolate) { if(geometry == null){ return null; } if (geometry instanceof LineString) { return force3DStartEnd((LineString) geometry, startZ, endZ, interpolate); } e...
[ "public", "static", "Geometry", "updateZExtremities", "(", "Geometry", "geometry", ",", "double", "startZ", ",", "double", "endZ", ",", "boolean", "interpolate", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "("...
Update the start and end Z values. If the interpolate is true the vertices are interpolated according the start and end z values. @param geometry @param startZ @param endZ @param interpolate @return
[ "Update", "the", "start", "and", "end", "Z", "values", ".", "If", "the", "interpolate", "is", "true", "the", "vertices", "are", "interpolated", "according", "the", "start", "and", "end", "z", "values", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_ZUpdateLineExtremities.java#L60-L77
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_ZUpdateLineExtremities.java
ST_ZUpdateLineExtremities.force3DStartEnd
private static Geometry force3DStartEnd(LineString lineString, final double startZ, final double endZ, final boolean interpolate) { final double bigD = lineString.getLength(); final double z = endZ - startZ; final Coordinate coordEnd = lineString.getCoordinates()[lineString.getCoordi...
java
private static Geometry force3DStartEnd(LineString lineString, final double startZ, final double endZ, final boolean interpolate) { final double bigD = lineString.getLength(); final double z = endZ - startZ; final Coordinate coordEnd = lineString.getCoordinates()[lineString.getCoordi...
[ "private", "static", "Geometry", "force3DStartEnd", "(", "LineString", "lineString", ",", "final", "double", "startZ", ",", "final", "double", "endZ", ",", "final", "boolean", "interpolate", ")", "{", "final", "double", "bigD", "=", "lineString", ".", "getLength...
Updates all z values by a new value using the specified first and the last coordinates. @param geom @param startZ @param endZ @param interpolate is true the z value of the vertices are interpolate according the length of the line. @return
[ "Updates", "all", "z", "values", "by", "a", "new", "value", "using", "the", "specified", "first", "and", "the", "last", "coordinates", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_ZUpdateLineExtremities.java#L90-L135
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/StringStack.java
StringStack.push
public boolean push(String newText) { if (stackTop < stack.length - 1) { stack[stackTop++] = newText; return true; } else { return false; } }
java
public boolean push(String newText) { if (stackTop < stack.length - 1) { stack[stackTop++] = newText; return true; } else { return false; } }
[ "public", "boolean", "push", "(", "String", "newText", ")", "{", "if", "(", "stackTop", "<", "stack", ".", "length", "-", "1", ")", "{", "stack", "[", "stackTop", "++", "]", "=", "newText", ";", "return", "true", ";", "}", "else", "{", "return", "f...
Puts string in the stack. @param newText A new string to put in the stack @return false if the stack is full
[ "Puts", "string", "in", "the", "stack", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/StringStack.java#L49-L56
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/utility/ReadBufferManager.java
ReadBufferManager.getWindowOffset
private int getWindowOffset(long bytePos, int length) throws IOException { long desiredMax = bytePos + length - 1; if ((bytePos >= windowStart) && (desiredMax < windowStart + buffer.capacity())) { long res = bytePos - windowStart; ...
java
private int getWindowOffset(long bytePos, int length) throws IOException { long desiredMax = bytePos + length - 1; if ((bytePos >= windowStart) && (desiredMax < windowStart + buffer.capacity())) { long res = bytePos - windowStart; ...
[ "private", "int", "getWindowOffset", "(", "long", "bytePos", ",", "int", "length", ")", "throws", "IOException", "{", "long", "desiredMax", "=", "bytePos", "+", "length", "-", "1", ";", "if", "(", "(", "bytePos", ">=", "windowStart", ")", "&&", "(", "des...
Moves the window if necessary to contain the desired byte and returns the position of the byte in the window @param bytePos @throws java.io.IOException
[ "Moves", "the", "window", "if", "necessary", "to", "contain", "the", "desired", "byte", "and", "returns", "the", "position", "of", "the", "byte", "in", "the", "window" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/utility/ReadBufferManager.java#L70-L102
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/SunCalc.java
SunCalc.getJulianCycle
private static long getJulianCycle(double J, double lw) { return Math.round(J - J2000 - J0 - lw / (2 * Math.PI)); }
java
private static long getJulianCycle(double J, double lw) { return Math.round(J - J2000 - J0 - lw / (2 * Math.PI)); }
[ "private", "static", "long", "getJulianCycle", "(", "double", "J", ",", "double", "lw", ")", "{", "return", "Math", ".", "round", "(", "J", "-", "J2000", "-", "J0", "-", "lw", "/", "(", "2", "*", "Math", ".", "PI", ")", ")", ";", "}" ]
general sun calculations
[ "general", "sun", "calculations" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/SunCalc.java#L72-L74
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/SunCalc.java
SunCalc.getApproxTransit
private static double getApproxTransit(double Ht, double lw, double n) { return J2000 + J0 + (Ht + lw) / (2 * Math.PI) + n; }
java
private static double getApproxTransit(double Ht, double lw, double n) { return J2000 + J0 + (Ht + lw) / (2 * Math.PI) + n; }
[ "private", "static", "double", "getApproxTransit", "(", "double", "Ht", ",", "double", "lw", ",", "double", "n", ")", "{", "return", "J2000", "+", "J0", "+", "(", "Ht", "+", "lw", ")", "/", "(", "2", "*", "Math", ".", "PI", ")", "+", "n", ";", ...
calculations for sun times
[ "calculations", "for", "sun", "times" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/SunCalc.java#L93-L95
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/SunCalc.java
SunCalc.getRightAscension
private static double getRightAscension(double Ls) { return Math.atan2(Math.sin(Ls) * Math.cos(e), Math.cos(Ls)); }
java
private static double getRightAscension(double Ls) { return Math.atan2(Math.sin(Ls) * Math.cos(e), Math.cos(Ls)); }
[ "private", "static", "double", "getRightAscension", "(", "double", "Ls", ")", "{", "return", "Math", ".", "atan2", "(", "Math", ".", "sin", "(", "Ls", ")", "*", "Math", ".", "cos", "(", "e", ")", ",", "Math", ".", "cos", "(", "Ls", ")", ")", ";",...
calculations for sun position
[ "calculations", "for", "sun", "position" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/SunCalc.java#L107-L109
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/SunCalc.java
SunCalc.getPosition
public static Coordinate getPosition(Date date, double lat, double lng) { if (isGeographic(lat, lng)) { double lw = rad * -lng; double phi = rad * lat; double J = dateToJulianDate(date); double M = getSolarMeanAnomaly(J); double C = getEqua...
java
public static Coordinate getPosition(Date date, double lat, double lng) { if (isGeographic(lat, lng)) { double lw = rad * -lng; double phi = rad * lat; double J = dateToJulianDate(date); double M = getSolarMeanAnomaly(J); double C = getEqua...
[ "public", "static", "Coordinate", "getPosition", "(", "Date", "date", ",", "double", "lat", ",", "double", "lng", ")", "{", "if", "(", "isGeographic", "(", "lat", ",", "lng", ")", ")", "{", "double", "lw", "=", "rad", "*", "-", "lng", ";", "double", ...
Returns the sun position as a coordinate with the following properties x: sun azimuth in radians (direction along the horizon, measured from south to west), e.g. 0 is south and Math.PI * 3/4 is northwest. y: sun altitude above the horizon in radians, e.g. 0 at the horizon and PI/2 at the zenith (straight over your hea...
[ "Returns", "the", "sun", "position", "as", "a", "coordinate", "with", "the", "following", "properties" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/SunCalc.java#L155-L172
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/IndexFile.java
IndexFile.getContentLength
public int getContentLength(int index) throws IOException { int ret = -1; if (this.lastIndex != index) { this.readRecord(index); } ret = this.recLen; return ret; }
java
public int getContentLength(int index) throws IOException { int ret = -1; if (this.lastIndex != index) { this.readRecord(index); } ret = this.recLen; return ret; }
[ "public", "int", "getContentLength", "(", "int", "index", ")", "throws", "IOException", "{", "int", "ret", "=", "-", "1", ";", "if", "(", "this", ".", "lastIndex", "!=", "index", ")", "{", "this", ".", "readRecord", "(", "index", ")", ";", "}", "ret"...
Get the content length of the given record in bytes, not 16 bit words. @param index The index, from 0 to getRecordCount - 1 @return The lengh in bytes of the record. @throws java.io.IOException
[ "Get", "the", "content", "length", "of", "the", "given", "record", "in", "bytes", "not", "16", "bit", "words", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/IndexFile.java#L152-L162
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Reverse.java
ST_Reverse.reverse
public static Geometry reverse(Geometry geometry) { if (geometry == null) { return null; } if (geometry instanceof MultiPoint) { return reverseMultiPoint((MultiPoint) geometry); } return geometry.reverse(); }
java
public static Geometry reverse(Geometry geometry) { if (geometry == null) { return null; } if (geometry instanceof MultiPoint) { return reverseMultiPoint((MultiPoint) geometry); } return geometry.reverse(); }
[ "public", "static", "Geometry", "reverse", "(", "Geometry", "geometry", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "geometry", "instanceof", "MultiPoint", ")", "{", "return", "reverseMultiPoint", "(", "(...
Returns the geometry with vertex order reversed. @param geometry Geometry @return geometry with vertex order reversed
[ "Returns", "the", "geometry", "with", "vertex", "order", "reversed", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Reverse.java#L51-L59
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Reverse.java
ST_Reverse.reverseMultiPoint
public static Geometry reverseMultiPoint(MultiPoint mp) { int nPoints = mp.getNumGeometries(); Point[] revPoints = new Point[nPoints]; for (int i = 0; i < nPoints; i++) { revPoints[nPoints - 1 - i] = (Point) mp.getGeometryN(i).reverse(); } return mp.getFactory().creat...
java
public static Geometry reverseMultiPoint(MultiPoint mp) { int nPoints = mp.getNumGeometries(); Point[] revPoints = new Point[nPoints]; for (int i = 0; i < nPoints; i++) { revPoints[nPoints - 1 - i] = (Point) mp.getGeometryN(i).reverse(); } return mp.getFactory().creat...
[ "public", "static", "Geometry", "reverseMultiPoint", "(", "MultiPoint", "mp", ")", "{", "int", "nPoints", "=", "mp", ".", "getNumGeometries", "(", ")", ";", "Point", "[", "]", "revPoints", "=", "new", "Point", "[", "nPoints", "]", ";", "for", "(", "int",...
Returns the MultiPoint with vertex order reversed. We do our own implementation here because JTS does not handle it. @param mp MultiPoint @return MultiPoint with vertex order reversed
[ "Returns", "the", "MultiPoint", "with", "vertex", "order", "reversed", ".", "We", "do", "our", "own", "implementation", "here", "because", "JTS", "does", "not", "handle", "it", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Reverse.java#L68-L75
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeEnvelope.java
ST_MakeEnvelope.makeEnvelope
public static Polygon makeEnvelope(double xmin, double ymin, double xmax, double ymax) { Coordinate[] coordinates = new Coordinate[]{ new Coordinate(xmin, ymin), new Coordinate(xmax, ymin), new Coordinate(xmax, ymax), new Coordinate(xmin, ymax), new Co...
java
public static Polygon makeEnvelope(double xmin, double ymin, double xmax, double ymax) { Coordinate[] coordinates = new Coordinate[]{ new Coordinate(xmin, ymin), new Coordinate(xmax, ymin), new Coordinate(xmax, ymax), new Coordinate(xmin, ymax), new Co...
[ "public", "static", "Polygon", "makeEnvelope", "(", "double", "xmin", ",", "double", "ymin", ",", "double", "xmax", ",", "double", "ymax", ")", "{", "Coordinate", "[", "]", "coordinates", "=", "new", "Coordinate", "[", "]", "{", "new", "Coordinate", "(", ...
Creates a rectangular Polygon formed from the minima and maxima by the given shell. @param xmin X min @param ymin Y min @param xmax X max @param ymax Y max @return Envelope as a POLYGON
[ "Creates", "a", "rectangular", "Polygon", "formed", "from", "the", "minima", "and", "maxima", "by", "the", "given", "shell", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeEnvelope.java#L59-L68
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeEnvelope.java
ST_MakeEnvelope.makeEnvelope
public static Polygon makeEnvelope(double xmin, double ymin, double xmax, double ymax, int srid) { Polygon geom = makeEnvelope(xmin, ymin, xmax, ymax); geom.setSRID(srid); return geom; }
java
public static Polygon makeEnvelope(double xmin, double ymin, double xmax, double ymax, int srid) { Polygon geom = makeEnvelope(xmin, ymin, xmax, ymax); geom.setSRID(srid); return geom; }
[ "public", "static", "Polygon", "makeEnvelope", "(", "double", "xmin", ",", "double", "ymin", ",", "double", "xmax", ",", "double", "ymax", ",", "int", "srid", ")", "{", "Polygon", "geom", "=", "makeEnvelope", "(", "xmin", ",", "ymin", ",", "xmax", ",", ...
Creates a rectangular Polygon formed from the minima and maxima by the given shell. The user can set a srid. @param xmin X min @param ymin Y min @param xmax X max @param ymax Y max @param srid SRID @return Envelope as a POLYGON
[ "Creates", "a", "rectangular", "Polygon", "formed", "from", "the", "minima", "and", "maxima", "by", "the", "given", "shell", ".", "The", "user", "can", "set", "a", "srid", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeEnvelope.java#L81-L85
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_Simplify.java
ST_Simplify.simplify
public static Geometry simplify(Geometry geometry, double distance) { if(geometry == null){ return null; } return DouglasPeuckerSimplifier.simplify(geometry, distance); }
java
public static Geometry simplify(Geometry geometry, double distance) { if(geometry == null){ return null; } return DouglasPeuckerSimplifier.simplify(geometry, distance); }
[ "public", "static", "Geometry", "simplify", "(", "Geometry", "geometry", ",", "double", "distance", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "return", "DouglasPeuckerSimplifier", ".", "simplify", "(", "geometry", "...
Simplify the geometry using the douglad peucker algorithm. @param geometry @param distance @return
[ "Simplify", "the", "geometry", "using", "the", "douglad", "peucker", "algorithm", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_Simplify.java#L51-L56
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_Expand.java
ST_Expand.expand
public static Geometry expand(Geometry geometry, double deltaX, double deltaY) { if(geometry == null){ return null; } Envelope env = geometry.getEnvelopeInternal(); // As the time of writing Envelope.expand is buggy with negative parameters double minX = env.getMinX()...
java
public static Geometry expand(Geometry geometry, double deltaX, double deltaY) { if(geometry == null){ return null; } Envelope env = geometry.getEnvelopeInternal(); // As the time of writing Envelope.expand is buggy with negative parameters double minX = env.getMinX()...
[ "public", "static", "Geometry", "expand", "(", "Geometry", "geometry", ",", "double", "deltaX", ",", "double", "deltaY", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "Envelope", "env", "=", "geometry", ".", "getEnv...
Expands a geometry's envelope by the given delta X and delta Y. Both positive and negative distances are supported. @param geometry the input geometry @param deltaX the distance to expand the envelope along the X axis @param deltaY the distance to expand the envelope along the Y axis @return the expanded geometry
[ "Expands", "a", "geometry", "s", "envelope", "by", "the", "given", "delta", "X", "and", "delta", "Y", ".", "Both", "positive", "and", "negative", "distances", "are", "supported", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_Expand.java#L65-L80
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_TriangleDirection.java
ST_TriangleDirection.computeDirection
public static LineString computeDirection(Geometry geometry) throws IllegalArgumentException { if(geometry == null){ return null; } // Convert geometry into triangle Triangle triangle = TINFeatureFactory.createTriangle(geometry); // Compute slope vector Vector...
java
public static LineString computeDirection(Geometry geometry) throws IllegalArgumentException { if(geometry == null){ return null; } // Convert geometry into triangle Triangle triangle = TINFeatureFactory.createTriangle(geometry); // Compute slope vector Vector...
[ "public", "static", "LineString", "computeDirection", "(", "Geometry", "geometry", ")", "throws", "IllegalArgumentException", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "// Convert geometry into triangle", "Triangle", "triangle", ...
Compute the main slope direction @param geometry @return @throws IllegalArgumentException
[ "Compute", "the", "main", "slope", "direction" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_TriangleDirection.java#L55-L87
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java
ST_Drape.drapePoints
public static Geometry drapePoints(Geometry pts, Geometry triangles, STRtree sTRtree) { Geometry geomDrapped = pts.copy(); CoordinateSequenceFilter drapeFilter = new DrapeFilter(sTRtree); geomDrapped.apply(drapeFilter); return geomDrapped; }
java
public static Geometry drapePoints(Geometry pts, Geometry triangles, STRtree sTRtree) { Geometry geomDrapped = pts.copy(); CoordinateSequenceFilter drapeFilter = new DrapeFilter(sTRtree); geomDrapped.apply(drapeFilter); return geomDrapped; }
[ "public", "static", "Geometry", "drapePoints", "(", "Geometry", "pts", ",", "Geometry", "triangles", ",", "STRtree", "sTRtree", ")", "{", "Geometry", "geomDrapped", "=", "pts", ".", "copy", "(", ")", ";", "CoordinateSequenceFilter", "drapeFilter", "=", "new", ...
Drape a point or a multipoint geometry to a set of triangles @param pts @param triangles @param sTRtree @return
[ "Drape", "a", "point", "or", "a", "multipoint", "geometry", "to", "a", "set", "of", "triangles" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java#L91-L96
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java
ST_Drape.drapeLineString
public static Geometry drapeLineString(LineString line, Geometry triangles, STRtree sTRtree) { GeometryFactory factory = line.getFactory(); //Split the triangles in lines to perform all intersections Geometry triangleLines = LinearComponentExtracter.getGeometry(triangles, true); Geometry...
java
public static Geometry drapeLineString(LineString line, Geometry triangles, STRtree sTRtree) { GeometryFactory factory = line.getFactory(); //Split the triangles in lines to perform all intersections Geometry triangleLines = LinearComponentExtracter.getGeometry(triangles, true); Geometry...
[ "public", "static", "Geometry", "drapeLineString", "(", "LineString", "line", ",", "Geometry", "triangles", ",", "STRtree", "sTRtree", ")", "{", "GeometryFactory", "factory", "=", "line", ".", "getFactory", "(", ")", ";", "//Split the triangles in lines to perform all...
Drape a linestring to a set of triangles @param line @param triangles @param sTRtree @return
[ "Drape", "a", "linestring", "to", "a", "set", "of", "triangles" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java#L150-L158
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java
ST_Drape.drapePolygon
public static Geometry drapePolygon(Polygon p, Geometry triangles, STRtree sTRtree) { GeometryFactory factory = p.getFactory(); //Split the triangles in lines to perform all intersections Geometry triangleLines = LinearComponentExtracter.getGeometry(triangles, true); Polygon spli...
java
public static Geometry drapePolygon(Polygon p, Geometry triangles, STRtree sTRtree) { GeometryFactory factory = p.getFactory(); //Split the triangles in lines to perform all intersections Geometry triangleLines = LinearComponentExtracter.getGeometry(triangles, true); Polygon spli...
[ "public", "static", "Geometry", "drapePolygon", "(", "Polygon", "p", ",", "Geometry", "triangles", ",", "STRtree", "sTRtree", ")", "{", "GeometryFactory", "factory", "=", "p", ".", "getFactory", "(", ")", ";", "//Split the triangles in lines to perform all intersectio...
Drape a polygon on a set of triangles @param p @param triangles @param sTRtree @return
[ "Drape", "a", "polygon", "on", "a", "set", "of", "triangles" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java#L167-L175
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java
ST_Drape.processPolygon
private static Polygon processPolygon(Polygon p, Geometry triangleLines, GeometryFactory factory) { Geometry diffExt = p.getExteriorRing().difference(triangleLines); final int nbOfHoles = p.getNumInteriorRing(); final LinearRing[] holes = new LinearRing[nbOfHoles]; for (int i = 0; i < nb...
java
private static Polygon processPolygon(Polygon p, Geometry triangleLines, GeometryFactory factory) { Geometry diffExt = p.getExteriorRing().difference(triangleLines); final int nbOfHoles = p.getNumInteriorRing(); final LinearRing[] holes = new LinearRing[nbOfHoles]; for (int i = 0; i < nb...
[ "private", "static", "Polygon", "processPolygon", "(", "Polygon", "p", ",", "Geometry", "triangleLines", ",", "GeometryFactory", "factory", ")", "{", "Geometry", "diffExt", "=", "p", ".", "getExteriorRing", "(", ")", ".", "difference", "(", "triangleLines", ")",...
Cut the lines of the polygon with the triangles @param p @param triangleLines @param factory @return
[ "Cut", "the", "lines", "of", "the", "polygon", "with", "the", "triangles" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java#L184-L193
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java
ST_Drape.lineMerge
public static Geometry lineMerge(Geometry geom, GeometryFactory factory) { LineMerger merger = new LineMerger(); merger.add(geom); Collection lines = merger.getMergedLineStrings(); return factory.buildGeometry(lines); }
java
public static Geometry lineMerge(Geometry geom, GeometryFactory factory) { LineMerger merger = new LineMerger(); merger.add(geom); Collection lines = merger.getMergedLineStrings(); return factory.buildGeometry(lines); }
[ "public", "static", "Geometry", "lineMerge", "(", "Geometry", "geom", ",", "GeometryFactory", "factory", ")", "{", "LineMerger", "merger", "=", "new", "LineMerger", "(", ")", ";", "merger", ".", "add", "(", "geom", ")", ";", "Collection", "lines", "=", "me...
A method to merge a geometry to a set of linestring @param geom @param factory @return
[ "A", "method", "to", "merge", "a", "geometry", "to", "a", "set", "of", "linestring" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java#L201-L206
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_PrecisionReducer.java
ST_PrecisionReducer.precisionReducer
public static Geometry precisionReducer(Geometry geometry, int nbDec) throws SQLException { if(geometry == null){ return null; } if (nbDec < 0) { throw new SQLException("Decimal_places has to be >= 0."); } PrecisionModel pm = new PrecisionModel(scaleFactor...
java
public static Geometry precisionReducer(Geometry geometry, int nbDec) throws SQLException { if(geometry == null){ return null; } if (nbDec < 0) { throw new SQLException("Decimal_places has to be >= 0."); } PrecisionModel pm = new PrecisionModel(scaleFactor...
[ "public", "static", "Geometry", "precisionReducer", "(", "Geometry", "geometry", ",", "int", "nbDec", ")", "throws", "SQLException", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "nbDec", "<", "0", ")", "{", ...
Reduce the geometry precision. Decimal_Place is the number of decimals to keep. @param geometry @param nbDec @return @throws SQLException
[ "Reduce", "the", "geometry", "precision", ".", "Decimal_Place", "is", "the", "number", "of", "decimals", "to", "keep", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_PrecisionReducer.java#L54-L64
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/buffer/ST_RingSideBuffer.java
ST_RingSideBuffer.ringSideBuffer
public static Geometry ringSideBuffer(Geometry geom, double bufferSize, int numBuffer) throws SQLException { return ringSideBuffer(geom, bufferSize, numBuffer, "endcap=flat"); }
java
public static Geometry ringSideBuffer(Geometry geom, double bufferSize, int numBuffer) throws SQLException { return ringSideBuffer(geom, bufferSize, numBuffer, "endcap=flat"); }
[ "public", "static", "Geometry", "ringSideBuffer", "(", "Geometry", "geom", ",", "double", "bufferSize", ",", "int", "numBuffer", ")", "throws", "SQLException", "{", "return", "ringSideBuffer", "(", "geom", ",", "bufferSize", ",", "numBuffer", ",", "\"endcap=flat\"...
Compute a ring buffer on one side of the geometry @param geom @param bufferSize @param numBuffer @return @throws java.sql.SQLException
[ "Compute", "a", "ring", "buffer", "on", "one", "side", "of", "the", "geometry" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/buffer/ST_RingSideBuffer.java#L65-L67
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_TriangleAspect.java
ST_TriangleAspect.computeAspect
public static Double computeAspect(Geometry geometry) throws IllegalArgumentException { if (geometry == null) { return null; } Vector3D vector = TriMarkers.getSteepestVector(TriMarkers.getNormalVector(TINFeatureFactory.createTriangle(geometry)), TINFeatureFactory.EPSILON); if...
java
public static Double computeAspect(Geometry geometry) throws IllegalArgumentException { if (geometry == null) { return null; } Vector3D vector = TriMarkers.getSteepestVector(TriMarkers.getNormalVector(TINFeatureFactory.createTriangle(geometry)), TINFeatureFactory.EPSILON); if...
[ "public", "static", "Double", "computeAspect", "(", "Geometry", "geometry", ")", "throws", "IllegalArgumentException", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "Vector3D", "vector", "=", "TriMarkers", ".", "getSteepestVecto...
Compute the aspect in degree. The geometry must be a triangle. @param geometry Polygon triangle @return aspect in degree @throws IllegalArgumentException ST_TriangleAspect accept only triangles
[ "Compute", "the", "aspect", "in", "degree", ".", "The", "geometry", "must", "be", "a", "triangle", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_TriangleAspect.java#L53-L64
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_ZMin.java
ST_ZMin.getMinZ
public static Double getMinZ(Geometry geom) { if (geom != null) { return CoordinateUtils.zMinMax(geom.getCoordinates())[0]; } else { return null; } }
java
public static Double getMinZ(Geometry geom) { if (geom != null) { return CoordinateUtils.zMinMax(geom.getCoordinates())[0]; } else { return null; } }
[ "public", "static", "Double", "getMinZ", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "!=", "null", ")", "{", "return", "CoordinateUtils", ".", "zMinMax", "(", "geom", ".", "getCoordinates", "(", ")", ")", "[", "0", "]", ";", "}", "else", "{...
Returns the minimal z-value of the given geometry. @param geom Geometry @return The minimal z-value of the given geometry, or null if the geometry is null.
[ "Returns", "the", "minimal", "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_ZMin.java#L49-L55
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Reverse3DLine.java
ST_Reverse3DLine.reverse3D
private static LineString reverse3D(LineString lineString, String order) { CoordinateSequence seq = lineString.getCoordinateSequence(); double startZ = seq.getCoordinate(0).z; double endZ = seq.getCoordinate(seq.size() - 1).z; if (order.equalsIgnoreCase("desc")) { if (!Double...
java
private static LineString reverse3D(LineString lineString, String order) { CoordinateSequence seq = lineString.getCoordinateSequence(); double startZ = seq.getCoordinate(0).z; double endZ = seq.getCoordinate(seq.size() - 1).z; if (order.equalsIgnoreCase("desc")) { if (!Double...
[ "private", "static", "LineString", "reverse3D", "(", "LineString", "lineString", ",", "String", "order", ")", "{", "CoordinateSequence", "seq", "=", "lineString", ".", "getCoordinateSequence", "(", ")", ";", "double", "startZ", "=", "seq", ".", "getCoordinate", ...
Reverses a LineString according to the z value. The z of the first point must be lower than the z of the end point. @param lineString @return
[ "Reverses", "a", "LineString", "according", "to", "the", "z", "value", ".", "The", "z", "of", "the", "first", "point", "must", "be", "lower", "than", "the", "z", "of", "the", "end", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Reverse3DLine.java#L87-L106
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_GoogleMapLink.java
ST_GoogleMapLink.generateGMLink
public static String generateGMLink(Geometry geom, String layerType, int zoom) { if (geom == null) { return null; } try { LayerType layer = LayerType.valueOf(layerType.toLowerCase()); Coordinate centre = geom.getEnvelopeInternal().centre(); StringB...
java
public static String generateGMLink(Geometry geom, String layerType, int zoom) { if (geom == null) { return null; } try { LayerType layer = LayerType.valueOf(layerType.toLowerCase()); Coordinate centre = geom.getEnvelopeInternal().centre(); StringB...
[ "public", "static", "String", "generateGMLink", "(", "Geometry", "geom", ",", "String", "layerType", ",", "int", "zoom", ")", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{", "LayerType", "layer", "=", "LayerType", ...
Generate a Google Map link URL based on the center of the bounding box of the input geometry. Set the layer type and the zoom level. @param geom @param layerType @param zoom @return
[ "Generate", "a", "Google", "Map", "link", "URL", "based", "on", "the", "center", "of", "the", "bounding", "box", "of", "the", "input", "geometry", ".", "Set", "the", "layer", "type", "and", "the", "zoom", "level", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_GoogleMapLink.java#L78-L97
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/FullConvexHull.java
FullConvexHull.toCoordinateArray
protected Coordinate[] toCoordinateArray(Stack stack) { Coordinate[] coordinates = new Coordinate[stack.size()]; for (int i = 0; i < stack.size(); i++) { Coordinate coordinate = (Coordinate) stack.get(i); coordinates[i] = coordinate; } return coordinates; }
java
protected Coordinate[] toCoordinateArray(Stack stack) { Coordinate[] coordinates = new Coordinate[stack.size()]; for (int i = 0; i < stack.size(); i++) { Coordinate coordinate = (Coordinate) stack.get(i); coordinates[i] = coordinate; } return coordinates; }
[ "protected", "Coordinate", "[", "]", "toCoordinateArray", "(", "Stack", "stack", ")", "{", "Coordinate", "[", "]", "coordinates", "=", "new", "Coordinate", "[", "stack", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<"...
An alternative to Stack.toArray, which is not present in earlier versions of Java. @param stack
[ "An", "alternative", "to", "Stack", ".", "toArray", "which", "is", "not", "present", "in", "earlier", "versions", "of", "Java", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/FullConvexHull.java#L117-L124
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/FullConvexHull.java
FullConvexHull.grahamScan
private Stack grahamScan(Coordinate[] c) { Coordinate p; Stack ps = new Stack(); p = (Coordinate) ps.push(c[0]); p = (Coordinate) ps.push(c[1]); p = (Coordinate) ps.push(c[2]); for (int i = 3; i < c.length; i++) { p = (Coordinate) ps.pop(); // chec...
java
private Stack grahamScan(Coordinate[] c) { Coordinate p; Stack ps = new Stack(); p = (Coordinate) ps.push(c[0]); p = (Coordinate) ps.push(c[1]); p = (Coordinate) ps.push(c[2]); for (int i = 3; i < c.length; i++) { p = (Coordinate) ps.pop(); // chec...
[ "private", "Stack", "grahamScan", "(", "Coordinate", "[", "]", "c", ")", "{", "Coordinate", "p", ";", "Stack", "ps", "=", "new", "Stack", "(", ")", ";", "p", "=", "(", "Coordinate", ")", "ps", ".", "push", "(", "c", "[", "0", "]", ")", ";", "p"...
Uses the Graham Scan algorithm to compute the convex hull vertices. @param c a list of points, with at least 3 entries @return a Stack containing the ordered points of the convex hull ring
[ "Uses", "the", "Graham", "Scan", "algorithm", "to", "compute", "the", "convex", "hull", "vertices", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/FullConvexHull.java#L219-L238
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_Force3D.java
ST_Force3D.force3D
public static Geometry force3D(Geometry geom) { if (geom == null) { return null; } return GeometryCoordinateDimension.force(geom, 3); }
java
public static Geometry force3D(Geometry geom) { if (geom == null) { return null; } return GeometryCoordinateDimension.force(geom, 3); }
[ "public", "static", "Geometry", "force3D", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "return", "GeometryCoordinateDimension", ".", "force", "(", "geom", ",", "3", ")", ";", "}" ]
Converts a XY geometry to XYZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on. @param geom @return
[ "Converts", "a", "XY", "geometry", "to", "XYZ", ".", "If", "a", "geometry", "has", "no", "Z", "component", "then", "a", "0", "Z", "coordinate", "is", "tacked", "on", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_Force3D.java#L54-L59
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/predicates/ST_DWithin.java
ST_DWithin.isWithinDistance
public static Boolean isWithinDistance(Geometry geomA, Geometry geomB, Double distance) { if(geomA == null||geomB == null){ return null; } return geomA.isWithinDistance(geomB, distance); }
java
public static Boolean isWithinDistance(Geometry geomA, Geometry geomB, Double distance) { if(geomA == null||geomB == null){ return null; } return geomA.isWithinDistance(geomB, distance); }
[ "public", "static", "Boolean", "isWithinDistance", "(", "Geometry", "geomA", ",", "Geometry", "geomB", ",", "Double", "distance", ")", "{", "if", "(", "geomA", "==", "null", "||", "geomB", "==", "null", ")", "{", "return", "null", ";", "}", "return", "ge...
Returns true if the geometries are within the specified distance of one another. @param geomA Geometry A @param geomB Geometry B @param distance Distance @return True if if the geometries are within the specified distance of one another
[ "Returns", "true", "if", "the", "geometries", "are", "within", "the", "specified", "distance", "of", "one", "another", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/predicates/ST_DWithin.java#L52-L57
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojson
public static String toGeojson(Geometry geom) { StringBuilder sb = new StringBuilder(); toGeojsonGeometry(geom, sb); return sb.toString(); }
java
public static String toGeojson(Geometry geom) { StringBuilder sb = new StringBuilder(); toGeojsonGeometry(geom, sb); return sb.toString(); }
[ "public", "static", "String", "toGeojson", "(", "Geometry", "geom", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "toGeojsonGeometry", "(", "geom", ",", "sb", ")", ";", "return", "sb", ".", "toString", "(", ")", ";", "}" ]
Convert the geometry to a GeoJSON representation. @param geom @return
[ "Convert", "the", "geometry", "to", "a", "GeoJSON", "representation", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L50-L54
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonGeometry
public static void toGeojsonGeometry(Geometry geom, StringBuilder sb) { if (geom instanceof Point) { toGeojsonPoint((Point) geom, sb); } else if (geom instanceof LineString) { toGeojsonLineString((LineString) geom, sb); } else if (geom instanceof Polygon) { to...
java
public static void toGeojsonGeometry(Geometry geom, StringBuilder sb) { if (geom instanceof Point) { toGeojsonPoint((Point) geom, sb); } else if (geom instanceof LineString) { toGeojsonLineString((LineString) geom, sb); } else if (geom instanceof Polygon) { to...
[ "public", "static", "void", "toGeojsonGeometry", "(", "Geometry", "geom", ",", "StringBuilder", "sb", ")", "{", "if", "(", "geom", "instanceof", "Point", ")", "{", "toGeojsonPoint", "(", "(", "Point", ")", "geom", ",", "sb", ")", ";", "}", "else", "if", ...
Transform a JTS geometry to a GeoJSON representation. @param geom @param sb
[ "Transform", "a", "JTS", "geometry", "to", "a", "GeoJSON", "representation", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L63-L79
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonPoint
public static void toGeojsonPoint(Point point, StringBuilder sb) { Coordinate coord = point.getCoordinate(); sb.append("{\"type\":\"Point\",\"coordinates\":["); sb.append(coord.x).append(",").append(coord.y); if (!Double.isNaN(coord.z)) { sb.append(",").append(coord.z); ...
java
public static void toGeojsonPoint(Point point, StringBuilder sb) { Coordinate coord = point.getCoordinate(); sb.append("{\"type\":\"Point\",\"coordinates\":["); sb.append(coord.x).append(",").append(coord.y); if (!Double.isNaN(coord.z)) { sb.append(",").append(coord.z); ...
[ "public", "static", "void", "toGeojsonPoint", "(", "Point", "point", ",", "StringBuilder", "sb", ")", "{", "Coordinate", "coord", "=", "point", ".", "getCoordinate", "(", ")", ";", "sb", ".", "append", "(", "\"{\\\"type\\\":\\\"Point\\\",\\\"coordinates\\\":[\"", ...
For type "Point", the "coordinates" member must be a single position. A position is the fundamental geometry construct. The "coordinates" member of a geometry object is composed of one position (in the case of a Point geometry), an array of positions (LineString or MultiPoint geometries), an array of arrays of positio...
[ "For", "type", "Point", "the", "coordinates", "member", "must", "be", "a", "single", "position", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L106-L114
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonMultiPoint
public static void toGeojsonMultiPoint(MultiPoint multiPoint, StringBuilder sb) { sb.append("{\"type\":\"MultiPoint\",\"coordinates\":"); toGeojsonCoordinates(multiPoint.getCoordinates(), sb); sb.append("}"); }
java
public static void toGeojsonMultiPoint(MultiPoint multiPoint, StringBuilder sb) { sb.append("{\"type\":\"MultiPoint\",\"coordinates\":"); toGeojsonCoordinates(multiPoint.getCoordinates(), sb); sb.append("}"); }
[ "public", "static", "void", "toGeojsonMultiPoint", "(", "MultiPoint", "multiPoint", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"{\\\"type\\\":\\\"MultiPoint\\\",\\\"coordinates\\\":\"", ")", ";", "toGeojsonCoordinates", "(", "multiPoint", ".", "ge...
Coordinates of a MultiPoint are an array of positions. Syntax: { "type": "MultiPoint", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] } @param multiPoint @param sb
[ "Coordinates", "of", "a", "MultiPoint", "are", "an", "array", "of", "positions", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L126-L130
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonLineString
public static void toGeojsonLineString(LineString lineString, StringBuilder sb) { sb.append("{\"type\":\"LineString\",\"coordinates\":"); toGeojsonCoordinates(lineString.getCoordinates(), sb); sb.append("}"); }
java
public static void toGeojsonLineString(LineString lineString, StringBuilder sb) { sb.append("{\"type\":\"LineString\",\"coordinates\":"); toGeojsonCoordinates(lineString.getCoordinates(), sb); sb.append("}"); }
[ "public", "static", "void", "toGeojsonLineString", "(", "LineString", "lineString", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"{\\\"type\\\":\\\"LineString\\\",\\\"coordinates\\\":\"", ")", ";", "toGeojsonCoordinates", "(", "lineString", ".", "ge...
Coordinates of LineString are an array of positions. Syntax: { "type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] } @param lineString @param sb
[ "Coordinates", "of", "LineString", "are", "an", "array", "of", "positions", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L142-L146
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonMultiLineString
public static void toGeojsonMultiLineString(MultiLineString multiLineString, StringBuilder sb) { sb.append("{\"type\":\"MultiLineString\",\"coordinates\":["); for (int i = 0; i < multiLineString.getNumGeometries(); i++) { toGeojsonCoordinates(multiLineString.getGeometryN(i).getCoordinates(),...
java
public static void toGeojsonMultiLineString(MultiLineString multiLineString, StringBuilder sb) { sb.append("{\"type\":\"MultiLineString\",\"coordinates\":["); for (int i = 0; i < multiLineString.getNumGeometries(); i++) { toGeojsonCoordinates(multiLineString.getGeometryN(i).getCoordinates(),...
[ "public", "static", "void", "toGeojsonMultiLineString", "(", "MultiLineString", "multiLineString", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"{\\\"type\\\":\\\"MultiLineString\\\",\\\"coordinates\\\":[\"", ")", ";", "for", "(", "int", "i", "=", ...
Coordinates of a MultiLineString are an array of LineString coordinate arrays. Syntax: { "type": "MultiLineString", "coordinates": [ [ [100.0, 0.0], [101.0, 1.0] ], [ [102.0, 2.0], [103.0, 3.0] ] ] } @param multiLineString @param sb
[ "Coordinates", "of", "a", "MultiLineString", "are", "an", "array", "of", "LineString", "coordinate", "arrays", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L160-L169
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonMultiPolygon
public static void toGeojsonMultiPolygon(MultiPolygon multiPolygon, StringBuilder sb) { sb.append("{\"type\":\"MultiPolygon\",\"coordinates\":["); for (int i = 0; i < multiPolygon.getNumGeometries(); i++) { Polygon p = (Polygon) multiPolygon.getGeometryN(i); sb.append("["); ...
java
public static void toGeojsonMultiPolygon(MultiPolygon multiPolygon, StringBuilder sb) { sb.append("{\"type\":\"MultiPolygon\",\"coordinates\":["); for (int i = 0; i < multiPolygon.getNumGeometries(); i++) { Polygon p = (Polygon) multiPolygon.getGeometryN(i); sb.append("["); ...
[ "public", "static", "void", "toGeojsonMultiPolygon", "(", "MultiPolygon", "multiPolygon", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"{\\\"type\\\":\\\"MultiPolygon\\\",\\\"coordinates\\\":[\"", ")", ";", "for", "(", "int", "i", "=", "0", ";",...
Coordinates of a MultiPolygon are an array of Polygon coordinate arrays. Syntax: { "type": "MultiPolygon", "coordinates": [ [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]], [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100...
[ "Coordinates", "of", "a", "MultiPolygon", "are", "an", "array", "of", "Polygon", "coordinate", "arrays", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L218-L237
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonGeometryCollection
public static void toGeojsonGeometryCollection(GeometryCollection geometryCollection, StringBuilder sb) { sb.append("{\"type\":\"GeometryCollection\",\"geometries\":["); for (int i = 0; i < geometryCollection.getNumGeometries(); i++) { Geometry geom = geometryCollection.getGeometryN(i); ...
java
public static void toGeojsonGeometryCollection(GeometryCollection geometryCollection, StringBuilder sb) { sb.append("{\"type\":\"GeometryCollection\",\"geometries\":["); for (int i = 0; i < geometryCollection.getNumGeometries(); i++) { Geometry geom = geometryCollection.getGeometryN(i); ...
[ "public", "static", "void", "toGeojsonGeometryCollection", "(", "GeometryCollection", "geometryCollection", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"{\\\"type\\\":\\\"GeometryCollection\\\",\\\"geometries\\\":[\"", ")", ";", "for", "(", "int", "i...
A GeoJSON object with type "GeometryCollection" is a geometry object which represents a collection of geometry objects. A geometry collection must have a member with the name "geometries". The value corresponding to "geometries"is an array. Each element in this array is a GeoJSON geometry object. Syntax: { "type": "...
[ "A", "GeoJSON", "object", "with", "type", "GeometryCollection", "is", "a", "geometry", "object", "which", "represents", "a", "collection", "of", "geometry", "objects", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L256-L272
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonCoordinates
public static void toGeojsonCoordinates(Coordinate[] coords, StringBuilder sb) { sb.append("["); for (int i = 0; i < coords.length; i++) { toGeojsonCoordinate(coords[i], sb); if (i < coords.length - 1) { sb.append(","); } } sb.append("]...
java
public static void toGeojsonCoordinates(Coordinate[] coords, StringBuilder sb) { sb.append("["); for (int i = 0; i < coords.length; i++) { toGeojsonCoordinate(coords[i], sb); if (i < coords.length - 1) { sb.append(","); } } sb.append("]...
[ "public", "static", "void", "toGeojsonCoordinates", "(", "Coordinate", "[", "]", "coords", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"[\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "coords", ".", "length", ";...
Convert a jts array of coordinates to a GeoJSON coordinates representation. Syntax: [[X1,Y1],[X2,Y2]] @param coords @param sb
[ "Convert", "a", "jts", "array", "of", "coordinates", "to", "a", "GeoJSON", "coordinates", "representation", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L285-L294
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonCoordinate
public static void toGeojsonCoordinate(Coordinate coord, StringBuilder sb) { sb.append("["); sb.append(coord.x).append(",").append(coord.y); if (!Double.isNaN(coord.z)) { sb.append(",").append(coord.z); } sb.append("]"); }
java
public static void toGeojsonCoordinate(Coordinate coord, StringBuilder sb) { sb.append("["); sb.append(coord.x).append(",").append(coord.y); if (!Double.isNaN(coord.z)) { sb.append(",").append(coord.z); } sb.append("]"); }
[ "public", "static", "void", "toGeojsonCoordinate", "(", "Coordinate", "coord", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"[\"", ")", ";", "sb", ".", "append", "(", "coord", ".", "x", ")", ".", "append", "(", "\",\"", ")", ".", ...
Convert a JTS coordinate to a GeoJSON representation. Only x, y and z values are supported. Syntax: [X,Y] or [X,Y,Z] @param coord @param sb
[ "Convert", "a", "JTS", "coordinate", "to", "a", "GeoJSON", "representation", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L308-L315
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeoJsonEnvelope
public String toGeoJsonEnvelope(Envelope e) { return new StringBuffer().append("[").append(e.getMinX()).append(",") .append(e.getMinY()).append(",").append(e.getMaxX()).append(",") .append(e.getMaxY()).append("]").toString(); }
java
public String toGeoJsonEnvelope(Envelope e) { return new StringBuffer().append("[").append(e.getMinX()).append(",") .append(e.getMinY()).append(",").append(e.getMaxX()).append(",") .append(e.getMaxY()).append("]").toString(); }
[ "public", "String", "toGeoJsonEnvelope", "(", "Envelope", "e", ")", "{", "return", "new", "StringBuffer", "(", ")", ".", "append", "(", "\"[\"", ")", ".", "append", "(", "e", ".", "getMinX", "(", ")", ")", ".", "append", "(", "\",\"", ")", ".", "appe...
Convert a JTS Envelope to a GeoJSON representation. @param e The envelope @return The envelope encoded as GeoJSON
[ "Convert", "a", "JTS", "Envelope", "to", "a", "GeoJSON", "representation", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L324-L328
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/ST_OSMDownloader.java
ST_OSMDownloader.downloadOSMFile
public static void downloadOSMFile(File file, Envelope geometryEnvelope) throws IOException { HttpURLConnection urlCon = (HttpURLConnection) createOsmUrl(geometryEnvelope).openConnection(); urlCon.setRequestMethod("GET"); urlCon.connect(); switch (urlCon.getResponseCode()) { ...
java
public static void downloadOSMFile(File file, Envelope geometryEnvelope) throws IOException { HttpURLConnection urlCon = (HttpURLConnection) createOsmUrl(geometryEnvelope).openConnection(); urlCon.setRequestMethod("GET"); urlCon.connect(); switch (urlCon.getResponseCode()) { ...
[ "public", "static", "void", "downloadOSMFile", "(", "File", "file", ",", "Envelope", "geometryEnvelope", ")", "throws", "IOException", "{", "HttpURLConnection", "urlCon", "=", "(", "HttpURLConnection", ")", "createOsmUrl", "(", "geometryEnvelope", ")", ".", "openCon...
Download OSM file from the official server @param file @param geometryEnvelope @throws IOException
[ "Download", "OSM", "file", "from", "the", "official", "server" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/ST_OSMDownloader.java#L116-L142
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/ST_OSMDownloader.java
ST_OSMDownloader.createOsmUrl
private static URL createOsmUrl(Envelope geometryEnvelope) { try { return new URL(OSM_API_URL + "map?bbox=" + geometryEnvelope.getMinX() + "," + geometryEnvelope.getMinY() + "," + geometryEnvelope.getMaxX() + "," + geometryEnvelope.getMaxY()); } catch ...
java
private static URL createOsmUrl(Envelope geometryEnvelope) { try { return new URL(OSM_API_URL + "map?bbox=" + geometryEnvelope.getMinX() + "," + geometryEnvelope.getMinY() + "," + geometryEnvelope.getMaxX() + "," + geometryEnvelope.getMaxY()); } catch ...
[ "private", "static", "URL", "createOsmUrl", "(", "Envelope", "geometryEnvelope", ")", "{", "try", "{", "return", "new", "URL", "(", "OSM_API_URL", "+", "\"map?bbox=\"", "+", "geometryEnvelope", ".", "getMinX", "(", ")", "+", "\",\"", "+", "geometryEnvelope", "...
Build the OSM URL based on a given envelope @param geometryEnvelope @return
[ "Build", "the", "OSM", "URL", "based", "on", "a", "given", "envelope" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/ST_OSMDownloader.java#L150-L158
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/predicates/ST_Disjoint.java
ST_Disjoint.geomDisjoint
public static Boolean geomDisjoint(Geometry a, Geometry b) { if(a==null || b==null) { return null; } return a.disjoint(b); }
java
public static Boolean geomDisjoint(Geometry a, Geometry b) { if(a==null || b==null) { return null; } return a.disjoint(b); }
[ "public", "static", "Boolean", "geomDisjoint", "(", "Geometry", "a", ",", "Geometry", "b", ")", "{", "if", "(", "a", "==", "null", "||", "b", "==", "null", ")", "{", "return", "null", ";", "}", "return", "a", ".", "disjoint", "(", "b", ")", ";", ...
Return true if the two Geometries are disjoint @param a Geometry Geometry. @param b Geometry instance @return true if the two Geometries are disjoint
[ "Return", "true", "if", "the", "two", "Geometries", "are", "disjoint" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/predicates/ST_Disjoint.java#L52-L57
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java
KMLWriterDriver.write
public void write(ProgressVisitor progress) throws SQLException { if (FileUtil.isExtensionWellFormated(fileName, "kml")) { writeKML(progress); } else if (FileUtil.isExtensionWellFormated(fileName, "kmz")) { String name = fileName.getName(); int pos = name.last...
java
public void write(ProgressVisitor progress) throws SQLException { if (FileUtil.isExtensionWellFormated(fileName, "kml")) { writeKML(progress); } else if (FileUtil.isExtensionWellFormated(fileName, "kmz")) { String name = fileName.getName(); int pos = name.last...
[ "public", "void", "write", "(", "ProgressVisitor", "progress", ")", "throws", "SQLException", "{", "if", "(", "FileUtil", ".", "isExtensionWellFormated", "(", "fileName", ",", "\"kml\"", ")", ")", "{", "writeKML", "(", "progress", ")", ";", "}", "else", "if"...
Write spatial table to kml or kmz file format. @param progress @throws SQLException
[ "Write", "spatial", "table", "to", "kml", "or", "kmz", "file", "format", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java#L65-L75
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java
KMLWriterDriver.writeKML
private void writeKML(ProgressVisitor progress) throws SQLException { FileOutputStream fos = null; try { fos = new FileOutputStream(fileName); writeKMLDocument(progress, fos); } catch (FileNotFoundException ex) { throw new SQLException(ex); } finally ...
java
private void writeKML(ProgressVisitor progress) throws SQLException { FileOutputStream fos = null; try { fos = new FileOutputStream(fileName); writeKMLDocument(progress, fos); } catch (FileNotFoundException ex) { throw new SQLException(ex); } finally ...
[ "private", "void", "writeKML", "(", "ProgressVisitor", "progress", ")", "throws", "SQLException", "{", "FileOutputStream", "fos", "=", "null", ";", "try", "{", "fos", "=", "new", "FileOutputStream", "(", "fileName", ")", ";", "writeKMLDocument", "(", "progress",...
Write the spatial table to a KML format @param progress @throws SQLException
[ "Write", "the", "spatial", "table", "to", "a", "KML", "format" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLWriterDriver.java#L83-L100
train