-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add java example into the examples project
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# PDAL JNI usage example | ||
|
||
To run this demo just launch `./sbt run` command and choose `1` | ||
to run a basic `pdal-core` example, choose `2` to run as basic `pdal-scala` example. | ||
to run a basic `pdal-core` example, choose `2` to run a basic `pdal-core` example in Java, and choose `3` to run as basic `pdal-scala` example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.azavea; | ||
|
||
import io.pdal.LogLevel; | ||
import io.pdal.Pipeline; | ||
|
||
class MainJava { | ||
// to check laz "filename":"data/autzen_trim.laz" | ||
static String json = "{\"pipeline\":[{\"filename\":\"data/1.2-with-color.las\",\"spatialreference\":\"EPSG:2993\"},{\"type\":\"filters.reprojection\",\"out_srs\":\"EPSG:3857\"}]}"; | ||
|
||
public static void main(String[] args) { | ||
// can be replaced via io.pdal.Pipeline$.MODULE$.apply(json, LogLevel.Error()); | ||
// which incapsulates initialize() call | ||
var pipeline = new Pipeline(json, LogLevel.Error()); | ||
pipeline.initialize(); | ||
pipeline.execute(); | ||
System.out.println("pipeline.getMetadata():" + pipeline.getMetadata()); | ||
pipeline.close(); | ||
} | ||
} |