Comments (6)
The input and output types could be dynamically extended using an OSGI service registry.
from orbisdata.
//Compute a buffer around a geometry and returns a new geometry
//Geometry types supported are JTS Geometry classes
Process p = new Process("Create a buffer around a geometry",[inputA: Geometry, distance: double], [outputA: Geometry], { inputA, distance ->
[outputA: inputA.buffer(distance)]
}
)
p.execute([inputA : new WKTReader().read("POINT(10 1)")] )] )
from orbisdata.
//Example with a table from H2GIS
def h2GIS = H2GIS.open([databaseName: './target/loadH2GIS'])
h2GIS.execute("""
DROP TABLE IF EXISTS h2gis, super;
CREATE TABLE h2gis (id int, the_geom point);
INSERT INTO h2gis VALUES (1, 'POINT(10 10)'::GEOMETRY), (2, 'POINT(1 1)'::GEOMETRY);
""")
Process p = new Process([inputA: ITable],[outputA: String], { inputA ->
[outputA: inputA.columnNames]
}
)
p.execute([inputA : h2GIS.getSpatialTable("h2gis")])
from orbisdata.
//An advanced type of the String with custom parameters
//Custom parameters must be controlled, thanks to the Caster.class
Process p = new Process([inputA: [title:'My input', type : String, minOccurs=1 maxOccurs=1] ],[outputA: String], { inputA ->
[outputA: inputA.columnNames]
}
)
p.execute([inputA : "A string value"])
Below a possible list of input types
[title : "A title", type : BoudingBox, supportedCRS = {"EPSG:4326", "EPSG:2000", "EPSG:2001"}, dimension = 2]
[title : "A title", type : RawData, multiSelection = true, isDirectory = false, isFile = false,excludedTypes = {".sql", ".shp"}, fileTypes = {".dbf", ".txt"}]
[title : "A title", type : EnumData, isEditable = true, multiSelection = true, values = {"value1", "value2"}, names = {"name1","name2"}]
from orbisdata.
A new use case
@Test
void testSimpleProcess5(){
def process = processFactory.create(
"title",
[inputA : String[]],
[outputA : String],
{ inputA -> [outputA : inputA[1]] }
)
process.execute([inputA :["A", "B", "C"]])
assertEquals "B", process.getResults().outputA
}
from orbisdata.
Next use case will be added directly to the test files.
from orbisdata.
Related Issues (20)
- Trouble with createIndex using POSTGIS ? HOT 2
- Filter subquery bug HOT 1
- Use smile-io to save dataframe
- OrbisDATA bad use of PreparedStatement HOT 1
- ResultSet/Statement configuration not transmitted to child/filtered tables HOT 1
- H2GIS, POSTGIS getSpatialTable recursive call ? HOT 1
- .gz not loadable yet ? HOT 1
- JdbcDataSource Statement caching
- Cache resultset metadata in IJdbcTable
- Use only PreparedStatements
- Default autocommit to false.
- Remove groovy Sql extends on JdbcDataSource
- Is there a rename or setName function ? HOT 1
- RDBC spec as provider for JDBC connection HOT 1
- Delegate ISpatial and ITable construction
- Avoid ResultSet creation
- No metadata check for spatial table
- Rework modules architecture HOT 3
- getColumnsTypes() column order not consistent HOT 1
- Removed unused badges HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orbisdata.