Skip to content

Commit 9fdd516

Browse files
committed
Switch readme to RST
1 parent 69ad802 commit 9fdd516

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

README.rst

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
Geometry command line library.
2+
==============================
3+
Geometry commands is a command line library for processing geometry that follows the unix philosophy. Each command does one thing well (buffer, centroid, envelope) by reading in a geometry, processing the geometry, and writing the geometry out as WKT. Individual commands can be connected with unix pipes. For more information please visit the `web site <http://jericks.github.com/geometrycommands/index.html>`_.
4+
5+
Libraries
6+
---------
7+
JTS:
8+
http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html
9+
Proj4j:
10+
http://trac.osgeo.org/proj4j/
11+
Args4J:
12+
http://args4j.kohsuke.org/
13+
14+
Examples:
15+
---------
16+
Geometry input with -geom argument
17+
>>> geom buffer -g "POINT (10 10)" -d 2
18+
19+
Geometry input using Standard input stream
20+
>>> echo "POINT (10 10)" | geom buffer -d 20
21+
22+
Piping results of one geometry command to another
23+
>>> geom buffer -g "POINT (10 10)" -d 2 | geom envelope
24+
25+
Contains
26+
>>> echo "POINT (0 0)" | geom buffer -d 10 | geom contains -o "POINT (5 5)"
27+
true
28+
>>> echo "POINT (0 0)" | geom buffer -d 10 | geom contains -o "POINT (25 25)"
29+
false
30+
31+
Buffer a point, get coordinates, draw coordinates to image, and open the image
32+
>>> echo "POINT (10 10)" | geom buffer -d 5 | geom coordinates | geom draw && open image.png
33+
34+
List available geometry commands:
35+
>>> geom list
36+
list
37+
buffer
38+
centroid
39+
contains
40+
convexHull
41+
draw
42+
difference
43+
envelope
44+
intersection
45+
46+
Build
47+
-----
48+
Geometry Commands depends on the Java Topology Suite (JTS) and Proj4j and uses Maven as a build tool.
49+
Unfortunately, Proj4j is not in a Maven repository. So, to build Geometry Commands you must first
50+
checkout Proj4j, build the jar, and install it in your local Maven repository.
51+
52+
Checkout source code:
53+
svn checkout http://svn.osgeo.org/metacrs/proj4j/trunk/ proj4j
54+
55+
Build it:
56+
cd proj4j/src
57+
ant
58+
59+
Install it:
60+
cd proj4j/
61+
mvn install:install-file -Dfile=build/distro/lib/proj4j-0.1.0.jar -DgroupId=org.osgeo -DartifactId=proj4j -Dversion=0.1.0 -Dpackaging=jar
62+
63+
Now you can build Geometry Commands using Maven:
64+
cd /geometrycommands
65+
mvn clean install
66+
67+
License
68+
-------
69+
Geometry Commands is open source and licensed under the MIT License.

0 commit comments

Comments
 (0)