Commit 814c8234 authored by Rafael Troilo's avatar Rafael Troilo
Browse files

add README.md

parent a7b7dc20
Simple oshdb database driver for opening a connection to ignite or h2 instances.
## Usage:
```java
Map<String, String> props = new HashMap<>();
//props.put("oshdb", "h2:PATH_TO_H2");
props.put("oshdb","ignite:PATH_TO_CFG");
props.put("prefix","global");
props.put("keytable","jdbc:postgresql://localhost/keytables-${prefix}?user=ohsome&password=secret");
OSHDBDriver.connect(props, oshdb -> {
try {
OSHDBTagKey tagKeyHighway = oshdb.getTagTranslator().getOSHDBTagKeyOf("highway");
Integer result = oshdb.getSnapshotView()
.areaOfInterest(new OSHDBBoundingBox(8.651133, 49.387611, 8.6561, 49.390513))
.osmType(OSMType.NODE)
.timestamps("2018-05-01")
.count();
System.out.println(result);
} catch (Exception e) {
e.printStackTrace();
}
});
// or
OSHDBDriver.connectToIgnite("PATH_TO_CFG", "KEYTABLE_CONNCTION_URL", oshdb -> {
Integer result = oshdb.getSnapshotView()
.areaOfInterest(new OSHDBBoundingBox(8.651133, 49.387611, 8.6561, 49.390513))
...
}
);
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment