Package org.hortonmachine.gears.io.dbs
Class DbsHelper
- java.lang.Object
-
- org.hortonmachine.gears.io.dbs.DbsHelper
-
public class DbsHelper extends Object
Database spatial helper methods.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description DbsHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.geotools.feature.DefaultFeatureCollectionrunRawSqlToFeatureCollection(String name, ASpatialDb db, String simpleSql, org.locationtech.jts.geom.Polygon roi)Extractes a featurecollection from an sql statement.
-
-
-
Method Detail
-
runRawSqlToFeatureCollection
public static org.geotools.feature.DefaultFeatureCollection runRawSqlToFeatureCollection(String name, ASpatialDb db, String simpleSql, org.locationtech.jts.geom.Polygon roi) throws Exception
Extractes a featurecollection from an sql statement.The assumption is made that the first string after the FROM keyword in the select statement is the table that contains the geometry.
- Parameters:
name- the name of the resulting layer.db-simpleSql- the sql.roi- an optional region to limit the query to.- Returns:
- the features.
- Throws:
Exception
-
-