Package org.locationtech.jtstest.cmd
Class JTSOpCmd
- java.lang.Object
-
- org.locationtech.jtstest.cmd.JTSOpCmd
-
public class JTSOpCmd extends Object
A CLI to run JTS TestBuilder operations. Allows easier execution of JTS functions on test data for debugging purposes.Examples:
--- Compute the area of a WKT geometry, output it jtsop -a some-file-with-geom.wkt area --- Validate geometries from a WKT file using limit and offset jtsop -a some-file-with-geom.wkt -limit 100 -offset 40 isValid --- Compute the unary union of a WKT geometry, output as WKB jtsop -a some-file-with-geom.wkt -f wkb Overlay.unaryUnion --- Compute the union of two geometries in WKT and WKB, output as WKT jtsop -a some-file-with-geom.wkt -b some-other-geom.wkb Overlay.Union --- Compute the buffer of distance 10 of a WKT geometry, output as GeoJSON jtsop -a some-file-with-geom.wkt -f geojson Buffer.buffer 10 --- Compute the buffer of a literal geometry, output as WKT jtsop -a "POINT (10 10)" Buffer.buffer 10 --- Compute buffers of multiple sizes jtsop -a "POINT (10 10)" Buffer.buffer 1,10,100 --- Run op for each A jtsop -a "MULTIPOINT ((10 10), (20 20))" -eacha Buffer.buffer --- Output a literal geometry as GeoJSON jtsop -a "POINT (10 10)" -f geojson --- Run op but don't output result (quiet mode) jtsop -a "MULTIPOINT ((10 10), (20 20))" -q Buffer.buffer
- Author:
- Martin Davis
-
-
Field Summary
Fields Modifier and Type Field Description static String
ERR_INVALID_ARG_PARAM
-
Constructor Summary
Constructors Constructor Description JTSOpCmd()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
captureOutput()
void
captureResult()
String
getOutput()
String[]
getOutputLines()
List<Geometry>
getResultGeometry()
static boolean
isFilename(String arg)
static void
main(String[] args)
void
replaceStdIn(InputStream inStream)
-
-
-
Field Detail
-
ERR_INVALID_ARG_PARAM
public static final String ERR_INVALID_ARG_PARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(String[] args)
-
captureOutput
public void captureOutput()
-
captureResult
public void captureResult()
-
replaceStdIn
public void replaceStdIn(InputStream inStream)
-
getOutput
public String getOutput()
-
getOutputLines
public String[] getOutputLines()
-
isFilename
public static boolean isFilename(String arg)
-
-