diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 00000000..99e6f7cb --- /dev/null +++ b/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 37588e8d6a275da103074fd297ceb825 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4d133e28..00000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target/ -/.idea/ -geometrycommands.iml diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 6c558a5f..00000000 --- a/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Jared Erickson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/README b/README deleted file mode 100644 index 7a317e10..00000000 --- a/README +++ /dev/null @@ -1,69 +0,0 @@ -Geometry command line library. -============================== -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. - -Libraries ---------- -JTS: - http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html -Proj4j: - http://trac.osgeo.org/proj4j/ -Args4J: - http://args4j.kohsuke.org/ - -Examples: ---------- -Geometry input with -geom argument ->>> geom buffer -geom "POINT (10 10)" -d 2 - -Geometry input using Standard input stream ->>> echo "POINT (10 10)" | geom buffer -d 20 - -Piping results of one geometry command to another ->>> geom buffer -g "POINT (10 10)" -d 2 | geom envelope - -Contains ->>> echo "POINT (0 0)" | geom buffer -d 10 | geom contains -other "POINT (5 5)" -true ->>> echo "POINT (0 0)" | geom buffer -d 10 | geom contains -other "POINT (25 25)" -false - -Buffer a point, get coordinates, draw coordinates to image, and open the image ->>> echo "POINT (10 10)" | geom buffer -d 5 | geom coordinates | geom draw && open image.png - -List available geometry commands: ->>> geom list -list -buffer -centroid -contains -convexHull -draw -difference -envelope -intersection - -Build ------ -Geometry Commands depends on the Java Topology Suite (JTS) and Proj4j and uses Maven as a build tool. -Unfortunately, Proj4j is not in a Maven repository. So, to build Geometry Commands you must first -checkout Proj4j, build the jar, and install it in your local Maven repository. - -Checkout source code: -svn checkout http://svn.osgeo.org/metacrs/proj4j/trunk/ proj4j - -Build it: -cd proj4j/src -ant - -Install it: -cd proj4j/ -mvn install:install-file -Dfile=build/distro/lib/proj4j-0.1.0.jar -DgroupId=org.osgeo -DartifactId=proj4j -Dversion=0.1.0 -Dpackaging=jar - -Now you can build Geometry Commands using Maven: -cd /geometrycommands -mvn clean install - -License -------- -Geometry Commands is open source and licensed under the MIT License. diff --git a/_images/arc.png b/_images/arc.png new file mode 100644 index 00000000..e63f4ddb Binary files /dev/null and b/_images/arc.png differ diff --git a/_images/arcpoly.png b/_images/arcpoly.png new file mode 100644 index 00000000..c9cefc29 Binary files /dev/null and b/_images/arcpoly.png differ diff --git a/_images/area.png b/_images/area.png new file mode 100644 index 00000000..5c0605c2 Binary files /dev/null and b/_images/area.png differ diff --git a/_images/boundary.png b/_images/boundary.png new file mode 100644 index 00000000..a0fb63a0 Binary files /dev/null and b/_images/boundary.png differ diff --git a/_images/buffer.png b/_images/buffer.png new file mode 100644 index 00000000..47f9deac Binary files /dev/null and b/_images/buffer.png differ diff --git a/_images/centroid.png b/_images/centroid.png new file mode 100644 index 00000000..6eb94383 Binary files /dev/null and b/_images/centroid.png differ diff --git a/_images/coordinates.png b/_images/coordinates.png new file mode 100644 index 00000000..d07a978d Binary files /dev/null and b/_images/coordinates.png differ diff --git a/_images/delaunay.png b/_images/delaunay.png new file mode 100644 index 00000000..1e0aeeb2 Binary files /dev/null and b/_images/delaunay.png differ diff --git a/_images/ellipse.png b/_images/ellipse.png new file mode 100644 index 00000000..c6c4516c Binary files /dev/null and b/_images/ellipse.png differ diff --git a/_images/grid.png b/_images/grid.png new file mode 100644 index 00000000..9e606b48 Binary files /dev/null and b/_images/grid.png differ diff --git a/_images/hilbertcurve.png b/_images/hilbertcurve.png new file mode 100644 index 00000000..eaffbe12 Binary files /dev/null and b/_images/hilbertcurve.png differ diff --git a/_images/kochsnowflake.png b/_images/kochsnowflake.png new file mode 100644 index 00000000..04c1cbc2 Binary files /dev/null and b/_images/kochsnowflake.png differ diff --git a/_images/mincircle.png b/_images/mincircle.png new file mode 100644 index 00000000..e1ee5f2e Binary files /dev/null and b/_images/mincircle.png differ diff --git a/_images/minrect.png b/_images/minrect.png new file mode 100644 index 00000000..ae132619 Binary files /dev/null and b/_images/minrect.png differ diff --git a/_images/mortoncurve.png b/_images/mortoncurve.png new file mode 100644 index 00000000..11b67f2c Binary files /dev/null and b/_images/mortoncurve.png differ diff --git a/_images/pointsalong.png b/_images/pointsalong.png new file mode 100644 index 00000000..c0390571 Binary files /dev/null and b/_images/pointsalong.png differ diff --git a/_images/rectangle.png b/_images/rectangle.png new file mode 100644 index 00000000..fdc6ab09 Binary files /dev/null and b/_images/rectangle.png differ diff --git a/_images/sierpinskicarpet.png b/_images/sierpinskicarpet.png new file mode 100644 index 00000000..f2d4b613 Binary files /dev/null and b/_images/sierpinskicarpet.png differ diff --git a/_images/sinestar.png b/_images/sinestar.png new file mode 100644 index 00000000..4bab5565 Binary files /dev/null and b/_images/sinestar.png differ diff --git a/_images/spoke.png b/_images/spoke.png new file mode 100644 index 00000000..171e90ed Binary files /dev/null and b/_images/spoke.png differ diff --git a/_images/squircle.png b/_images/squircle.png new file mode 100644 index 00000000..4a8ea2ab Binary files /dev/null and b/_images/squircle.png differ diff --git a/_images/supercircle.png b/_images/supercircle.png new file mode 100644 index 00000000..4a8ea2ab Binary files /dev/null and b/_images/supercircle.png differ diff --git a/_images/text.png b/_images/text.png new file mode 100644 index 00000000..2a07d749 Binary files /dev/null and b/_images/text.png differ diff --git a/_images/voronoi.png b/_images/voronoi.png new file mode 100644 index 00000000..c83c5258 Binary files /dev/null and b/_images/voronoi.png differ diff --git a/_sources/commands.rst.txt b/_sources/commands.rst.txt new file mode 100644 index 00000000..37aedb23 --- /dev/null +++ b/_sources/commands.rst.txt @@ -0,0 +1,117 @@ +Commands +======== + +.. toctree:: + + commands/list.rst + commands/version.rst + commands/help.rst + commands/angle.rst + commands/arc.rst + commands/arcpoly.rst + commands/area.rst + commands/asciiart.rst + commands/boundary.rst + commands/buffer.rst + commands/centroid.rst + commands/closelinestring.rst + commands/combine.rst + commands/contains.rst + commands/concaveHull.rst + commands/concaveHullOfPolygons.rst + commands/convexHull.rst + commands/coordinates.rst + commands/count.rst + commands/countpoints.rst + commands/coveredby.rst + commands/covers.rst + commands/crosses.rst + commands/delaunay.rst + commands/densify.rst + commands/difference.rst + commands/dimension.rst + commands/disjoint.rst + commands/distance.rst + commands/distanceline.rst + commands/draw.rst + commands/drawbase64.rst + commands/dump.rst + commands/ellipse.rst + commands/endpoint.rst + commands/envelope.rst + commands/equals.rst + commands/fix.rst + commands/fromwkb.rst + commands/get.rst + commands/grid.rst + commands/hausdorffdistance.rst + commands/hilbertcurve.rst + commands/interiorpoint.rst + commands/interpolatepoint.rst + commands/intersection.rst + commands/intersects.rst + commands/isccw.rst + commands/isclosed.rst + commands/isempty.rst + commands/isrectangle.rst + commands/isring.rst + commands/issimple.rst + commands/isvalid.rst + commands/iswithindistance.rst + commands/kochsnowflake.rst + commands/largestemptycircle.rst + commands/linedissolve.rst + commands/linemerge.rst + commands/locatepoint.rst + commands/maximuminscribedcircle.rst + commands/mincircle.rst + commands/minclearance.rst + commands/mindiameter.rst + commands/minrect.rst + commands/mortoncurve.rst + commands/narrow.rst + commands/nearestpoints.rst + commands/node.rst + commands/normalize.rst + commands/octagonalenvelope.rst + commands/offsetCurve.rst + commands/overlaps.rst + commands/pipe.rst + commands/placepoint.rst + commands/pointatangle.rst + commands/pointsalong.rst + commands/polygonize.rst + commands/project.rst + commands/random.rst + commands/randomwalk.rst + commands/rectangle.rst + commands/reduceprecision.rst + commands/reflect.rst + commands/relate.rst + commands/reverse.rst + commands/rotate.rst + commands/scale.rst + commands/shear.rst + commands/sierpinskicarpet.rst + commands/similarity.rst + commands/simplify.rst + commands/sinestar.rst + commands/slice.rst + commands/snap.rst + commands/split.rst + commands/spoke.rst + commands/squircle.rst + commands/startpoint.rst + commands/subline.rst + commands/supercircle.rst + commands/symdifference.rst + commands/text.rst + commands/touches.rst + commands/towkb.rst + commands/translate.rst + commands/type.rst + commands/union.rst + commands/variablebuffer.rst + commands/voronoi.rst + commands/within.rst + diff --git a/_sources/commands/angle.rst.txt b/_sources/commands/angle.rst.txt new file mode 100644 index 00000000..747cfc5a --- /dev/null +++ b/_sources/commands/angle.rst.txt @@ -0,0 +1,29 @@ +angle +===== + +**Name**: + +geom angle + +**Description**: + +geom Calculate the angle between two Points + +**Arguments**: + + * -t --type: The type can be degrees (default) or radians + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom angle -g "POINT (1 1)" -o "POINT (10 10)" + diff --git a/_sources/commands/arc.rst.txt b/_sources/commands/arc.rst.txt new file mode 100644 index 00000000..6302d7fe --- /dev/null +++ b/_sources/commands/arc.rst.txt @@ -0,0 +1,42 @@ +arc +=== + +**Name**: + +geom arc + +**Description**: + +geom Creates an arc linestring from a start angle and an angle extent. + +**Arguments**: + + * -a --startAngle: The start angle (in radians) + + * -e --angleExtent: The size of angle (in radians) + + * -d -degrees: The flag for whether given angle measures are in degrees (true) or radians (false) + + * -w --width: The width + + * -h --height: The height + + * -p --numberOfPoints: The number of points + + * -r --rotation: The rotation + + * -c --center: The flag to use center (true) or the base (false) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom arc -g "POINT (100 100)" -d -a 45 -e 90 -w 50 -h 50 -p 10 + +.. image:: arc.png \ No newline at end of file diff --git a/_sources/commands/arcpoly.rst.txt b/_sources/commands/arcpoly.rst.txt new file mode 100644 index 00000000..dc56e0cc --- /dev/null +++ b/_sources/commands/arcpoly.rst.txt @@ -0,0 +1,42 @@ +arcpoly +======= + +**Name**: + +geom arcpoly + +**Description**: + +geom Creates an arc polygon from a start angle and an angle extent. + +**Arguments**: + + * -a --startAngle: The start angle (in radians) + + * -e --angleExtent: The size of angle (in radians) + + * -d --degrees: The flag for whether given angle measures are in degrees (true) or radians (false) + + * -w --width: The width + + * -h --height: The height + + * -p --numberOfPoints: The number of points + + * -r --rotation: The rotation + + * -c --center: The flag to use center (true) or the base (false) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom arcpoly -g "POINT (100 100)" -a 45 -e 90 -d -p 20 -w 500 -h 500 + +.. image:: arcpoly.png \ No newline at end of file diff --git a/_sources/commands/area.rst.txt b/_sources/commands/area.rst.txt new file mode 100644 index 00000000..07637867 --- /dev/null +++ b/_sources/commands/area.rst.txt @@ -0,0 +1,26 @@ +area +==== + +**Name**: + +geom area + +**Description**: + +geom Calculate the area of a Geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom area -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" + +.. image:: area.png \ No newline at end of file diff --git a/_sources/commands/asciiart.rst.txt b/_sources/commands/asciiart.rst.txt new file mode 100644 index 00000000..f3291230 --- /dev/null +++ b/_sources/commands/asciiart.rst.txt @@ -0,0 +1,25 @@ +asciiart +======== + +**Name**: + +geom asciiart + +**Description**: + +geom Get the Geometry as WKT ASCII Art + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom asciiart -g "POINT (10 10)" + diff --git a/_sources/commands/boundary.rst.txt b/_sources/commands/boundary.rst.txt new file mode 100644 index 00000000..dadd21a3 --- /dev/null +++ b/_sources/commands/boundary.rst.txt @@ -0,0 +1,26 @@ +boundary +======== + +**Name**: + +geom boundary + +**Description**: + +geom Calculate the boundary of a Geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom boundary -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" + +.. image:: boundary.png \ No newline at end of file diff --git a/_sources/commands/buffer.rst.txt b/_sources/commands/buffer.rst.txt new file mode 100644 index 00000000..cfefc17f --- /dev/null +++ b/_sources/commands/buffer.rst.txt @@ -0,0 +1,40 @@ +buffer +====== + +**Name**: + +geom buffer + +**Description**: + +geom Buffer a geometry by a distance. + +**Arguments**: + + * -d --distance: The buffer distance + + * -q --quadrantSegments: The number of quadrant segments + + * -c --endCapStyle: The end cap style (round, flat/butt, square) + + * -s --singleSided: The flag for whether the buffer should be single sided + + * -f --simplifyFactor: The simplify factor + + * -m --mitreLimit: The mitre limit + + * -j --joinStyle: The join style (round, mitre, bevel) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom buffer -g "POINT (1 1)" -d 10 + +.. image:: buffer.png \ No newline at end of file diff --git a/_sources/commands/centroid.rst.txt b/_sources/commands/centroid.rst.txt new file mode 100644 index 00000000..f2c73c31 --- /dev/null +++ b/_sources/commands/centroid.rst.txt @@ -0,0 +1,26 @@ +centroid +======== + +**Name**: + +geom centroid + +**Description**: + +geom Calculate the centroid of a Geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom centroid -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" + +.. image:: centroid.png \ No newline at end of file diff --git a/_sources/commands/closelinestring.rst.txt b/_sources/commands/closelinestring.rst.txt new file mode 100644 index 00000000..5a37e563 --- /dev/null +++ b/_sources/commands/closelinestring.rst.txt @@ -0,0 +1,25 @@ +closelinestring +=============== + +**Name**: + +geom closelinestring + +**Description**: + +geom Close an open LineString. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom closelinestring -g "LINESTRING (0 0, 4 0, 4 4, 0 4)" + diff --git a/_sources/commands/combine.rst.txt b/_sources/commands/combine.rst.txt new file mode 100644 index 00000000..9065de48 --- /dev/null +++ b/_sources/commands/combine.rst.txt @@ -0,0 +1,24 @@ +combine +======= + +**Name**: + +geom combine + +**Description**: + +geom Combine geometries on separate lines to create a GeometryCollection. + +**Arguments**: + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + echo -e "POINT(1 1) +POINT(2 2)" | geom combine + diff --git a/_sources/commands/concaveHull.rst.txt b/_sources/commands/concaveHull.rst.txt new file mode 100644 index 00000000..2ae40cf7 --- /dev/null +++ b/_sources/commands/concaveHull.rst.txt @@ -0,0 +1,29 @@ +concaveHull +=========== + +**Name**: + +geom concaveHull + +**Description**: + +geom Calculate the concave hull of a Geometry. + +**Arguments**: + + * -m --max-edge-length: The maximum edge length + + * -a --holes-allowed: Whether holes are allowed or not + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom concavehull -g "MULTIPOINT ((-122.38657951354979 47.58451555263637),(-122.38649368286131 47.5772205307505),(-122.39078521728516 47.58167872046887),(-122.38177299499512 47.5823155737249),(-122.3876953125 47.5828366297174),(-122.38494873046875 47.58301031389572),(-122.3876953125 47.58121554959838),(-122.38486289978027 47.5812734461813))" + diff --git a/_sources/commands/concaveHullOfPolygons.rst.txt b/_sources/commands/concaveHullOfPolygons.rst.txt new file mode 100644 index 00000000..a74fc596 --- /dev/null +++ b/_sources/commands/concaveHullOfPolygons.rst.txt @@ -0,0 +1,31 @@ +concaveHullOfPolygons +===================== + +**Name**: + +geom concaveHullOfPolygons + +**Description**: + +geom Calculate the concave hull of Polygons. + +**Arguments**: + + * -l --max-edge-length: The maximum edge length + + * -a --holes-allowed: Whether holes are allowed or not + + * -t --tight: Whether it should be tight or now + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom concaveHullOfPolygons -l 0.5 -g "MULTIPOLYGON (((-122.38889694213867 47.57595031143529, -122.3895299434662 47.57526633442543, -122.38845705986023 47.57515414686724, -122.38857507705688 47.57558480102301, -122.38889694213867 47.57595031143529)),((-122.38868772983551 47.57478501191467, -122.38879501819609 47.574224066564, -122.38778114318846 47.5742566377487, -122.38817274570465 47.574600443462614, -122.38868772983551 47.57478501191467)),((-122.3868852853775 47.57554137387374, -122.38756120204926 47.57528442917038, -122.38598942756653 47.575132433118526, -122.38690674304961 47.57534957020037, -122.3868852853775 47.57554137387374)))" + diff --git a/_sources/commands/contains.rst.txt b/_sources/commands/contains.rst.txt new file mode 100644 index 00000000..38cc4716 --- /dev/null +++ b/_sources/commands/contains.rst.txt @@ -0,0 +1,27 @@ +contains +======== + +**Name**: + +geom contains + +**Description**: + +geom Calculate whether the first geometry contains the other geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom contains -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" -o "POINT (2 2)" + diff --git a/_sources/commands/convexHull.rst.txt b/_sources/commands/convexHull.rst.txt new file mode 100644 index 00000000..5d04acc1 --- /dev/null +++ b/_sources/commands/convexHull.rst.txt @@ -0,0 +1,25 @@ +convexHull +========== + +**Name**: + +geom convexHull + +**Description**: + +geom Calculate the convex hull of a Geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom convexhull -g "POLYGON ((9 52, 9 50, 7 50, 7 48, 10 47, 10 46, 13 46, 11 52, 10 52, 9 52))" + diff --git a/_sources/commands/coordinates.rst.txt b/_sources/commands/coordinates.rst.txt new file mode 100644 index 00000000..63e711b6 --- /dev/null +++ b/_sources/commands/coordinates.rst.txt @@ -0,0 +1,28 @@ +coordinates +=========== + +**Name**: + +geom coordinates + +**Description**: + +geom Get the coordinates of the geometry. + +**Arguments**: + + * -u --unique: The flag to only include unique coordinates + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom coordinates -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" + +.. image:: coordinates.png \ No newline at end of file diff --git a/_sources/commands/count.rst.txt b/_sources/commands/count.rst.txt new file mode 100644 index 00000000..1a7c39e1 --- /dev/null +++ b/_sources/commands/count.rst.txt @@ -0,0 +1,25 @@ +count +===== + +**Name**: + +geom count + +**Description**: + +geom Count the number of geometries in the input geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom count -g "MULTIPOINT (1 1, 2 2, 3 3)" + diff --git a/_sources/commands/countpoints.rst.txt b/_sources/commands/countpoints.rst.txt new file mode 100644 index 00000000..8b1fa747 --- /dev/null +++ b/_sources/commands/countpoints.rst.txt @@ -0,0 +1,25 @@ +countpoints +=========== + +**Name**: + +geom countpoints + +**Description**: + +geom Count the number of Points in the input Geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom countpoints -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" + diff --git a/_sources/commands/coveredby.rst.txt b/_sources/commands/coveredby.rst.txt new file mode 100644 index 00000000..3c06ea49 --- /dev/null +++ b/_sources/commands/coveredby.rst.txt @@ -0,0 +1,27 @@ +coveredby +========= + +**Name**: + +geom coveredby + +**Description**: + +geom Determine whether the first geometry is covered by the other geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom coveredby -g "POINT (2 2)" -o "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" + diff --git a/_sources/commands/covers.rst.txt b/_sources/commands/covers.rst.txt new file mode 100644 index 00000000..8e1c5e7a --- /dev/null +++ b/_sources/commands/covers.rst.txt @@ -0,0 +1,27 @@ +covers +====== + +**Name**: + +geom covers + +**Description**: + +geom Determine whether the first geometry covers the other geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom covers -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" -o "POINT (2 2)" + diff --git a/_sources/commands/crosses.rst.txt b/_sources/commands/crosses.rst.txt new file mode 100644 index 00000000..cee298ff --- /dev/null +++ b/_sources/commands/crosses.rst.txt @@ -0,0 +1,27 @@ +crosses +======= + +**Name**: + +geom crosses + +**Description**: + +geom Determine whether the first geometry crosses the other geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom crosses -g "LINESTRING (1 1, 10 10)" -o "LINESTRING (1 10, 10 1)" + diff --git a/_sources/commands/delaunay.rst.txt b/_sources/commands/delaunay.rst.txt new file mode 100644 index 00000000..89d610d4 --- /dev/null +++ b/_sources/commands/delaunay.rst.txt @@ -0,0 +1,28 @@ +delaunay +======== + +**Name**: + +geom delaunay + +**Description**: + +geom Generate a delaunay triangulation of the input geometry. + +**Arguments**: + + * -c --conforming: The flag for whether to use conforming algorithm + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom buffer -g "POINT (1 1)" -d 100 | geom random -n 100 | geom delaunay + +.. image:: delaunay.png \ No newline at end of file diff --git a/_sources/commands/densify.rst.txt b/_sources/commands/densify.rst.txt new file mode 100644 index 00000000..bbf4b988 --- /dev/null +++ b/_sources/commands/densify.rst.txt @@ -0,0 +1,27 @@ +densify +======= + +**Name**: + +geom densify + +**Description**: + +geom Densify the coordinates of the input geometry. + +**Arguments**: + + * -d --distance: The distance tolerance + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom densify -g "LINESTRING (1 1, 100 100)" -d 20 + diff --git a/_sources/commands/difference.rst.txt b/_sources/commands/difference.rst.txt new file mode 100644 index 00000000..74436ef4 --- /dev/null +++ b/_sources/commands/difference.rst.txt @@ -0,0 +1,27 @@ +difference +========== + +**Name**: + +geom difference + +**Description**: + +geom Calculate the difference between the input geometries. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom difference -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))" + diff --git a/_sources/commands/dimension.rst.txt b/_sources/commands/dimension.rst.txt new file mode 100644 index 00000000..9a149047 --- /dev/null +++ b/_sources/commands/dimension.rst.txt @@ -0,0 +1,25 @@ +dimension +========= + +**Name**: + +geom dimension + +**Description**: + +geom Get the dimension of the Geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom dimension -g "POINT (1 1)" + diff --git a/_sources/commands/disjoint.rst.txt b/_sources/commands/disjoint.rst.txt new file mode 100644 index 00000000..b94aad44 --- /dev/null +++ b/_sources/commands/disjoint.rst.txt @@ -0,0 +1,27 @@ +disjoint +======== + +**Name**: + +geom disjoint + +**Description**: + +geom Determine whether the first geometry is disjoint from the other geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom disjoint -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "LINESTRING (15 15, 20 20)" + diff --git a/_sources/commands/distance.rst.txt b/_sources/commands/distance.rst.txt new file mode 100644 index 00000000..dcf7ec59 --- /dev/null +++ b/_sources/commands/distance.rst.txt @@ -0,0 +1,27 @@ +distance +======== + +**Name**: + +geom distance + +**Description**: + +geom Calculate the distance between the two input geometries. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom distance -g "POINT (5 5)" -o "POINT (20 21)" + diff --git a/_sources/commands/distanceline.rst.txt b/_sources/commands/distanceline.rst.txt new file mode 100644 index 00000000..f42b373b --- /dev/null +++ b/_sources/commands/distanceline.rst.txt @@ -0,0 +1,27 @@ +distanceline +============ + +**Name**: + +geom distanceline + +**Description**: + +geom Generate a LineString representing the shortest distance between two geometries. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom distanceline -g "POINT (5 5)" -o "POINT (20 21)" + diff --git a/_sources/commands/draw.rst.txt b/_sources/commands/draw.rst.txt new file mode 100644 index 00000000..848d53e7 --- /dev/null +++ b/_sources/commands/draw.rst.txt @@ -0,0 +1,53 @@ +draw +==== + +**Name**: + +geom draw + +**Description**: + +geom Draw the input geometry to an image file. + +**Arguments**: + + * -f --file: The output File + + * -w --width: The image width + + * -h --height: The image height + + * -b --background: The background color + + * -i --backgroundImage: The background image url or file + + * -s --stroke: The stroke Color + + * -t --strokeOpacity: The stroke opacity + + * -r --strokeWidth: The stroke width + + * -l --fill: The fill Color + + * -o --fillOpacity: The fill opacity + + * -m --shape: The marker shape (circle, square, ect..) + + * -z --size: The marker size + + * -c --drawCoords: The flag for drawing coordinates or not + + * -e --envelope: The geographical bounds (minx, miny, maxx, maxy) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom draw -g "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))" + diff --git a/_sources/commands/drawbase64.rst.txt b/_sources/commands/drawbase64.rst.txt new file mode 100644 index 00000000..36eb5a40 --- /dev/null +++ b/_sources/commands/drawbase64.rst.txt @@ -0,0 +1,55 @@ +drawbase64 +========== + +**Name**: + +geom drawbase64 + +**Description**: + +geom Draw the input geometry to a base 64 encoded string. + +**Arguments**: + + * -y --type: The image type (png or jpeg) + + * -p --prefix: The flag to include the prefix (data:image/png;base64,) or not + + * -w --width: The image width + + * -h --height: The image height + + * -b --background: The background color + + * -i --backgroundImage: The background image url or file + + * -s --stroke: The stroke Color + + * -t --strokeOpacity: The stroke opacity + + * -r --strokeWidth: The stroke width + + * -l --fill: The fill Color + + * -o --fillOpacity: The fill opacity + + * -m --shape: The marker shape (circle, square, ect..) + + * -z --size: The marker size + + * -c --drawCoords: The flag for drawing coordinates or not + + * -e --envelope: The geographical bounds (minx, miny, maxx, maxy) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom drawbase64 -g "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))" + diff --git a/_sources/commands/dump.rst.txt b/_sources/commands/dump.rst.txt new file mode 100644 index 00000000..61fdd682 --- /dev/null +++ b/_sources/commands/dump.rst.txt @@ -0,0 +1,25 @@ +dump +==== + +**Name**: + +geom dump + +**Description**: + +geom Put each geometry from a GeometryCollection on it's own line. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom dump -g "MULTIPOINT (1 1, 2 2)" + diff --git a/_sources/commands/ellipse.rst.txt b/_sources/commands/ellipse.rst.txt new file mode 100644 index 00000000..fffcec2b --- /dev/null +++ b/_sources/commands/ellipse.rst.txt @@ -0,0 +1,36 @@ +ellipse +======= + +**Name**: + +geom ellipse + +**Description**: + +geom Create an ellipse of circle around the input geometry. + +**Arguments**: + + * -w --width: The width + + * -h --height: The height + + * -p --numberOfPoints: The number of points + + * -r --rotation: The rotation + + * -c --center: The flag to use center (true) or the base (false) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom ellipse -g "POINT (100 100)" -p 30 -w 500 -h 500 + +.. image:: ellipse.png \ No newline at end of file diff --git a/_sources/commands/endpoint.rst.txt b/_sources/commands/endpoint.rst.txt new file mode 100644 index 00000000..c7cff788 --- /dev/null +++ b/_sources/commands/endpoint.rst.txt @@ -0,0 +1,25 @@ +endpoint +======== + +**Name**: + +geom endpoint + +**Description**: + +geom Get the end point of a LineString or a MultiLineString. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom endpoint -g "LINESTRING (1 1, 5 5, 10 10)" + diff --git a/_sources/commands/envelope.rst.txt b/_sources/commands/envelope.rst.txt new file mode 100644 index 00000000..7536c225 --- /dev/null +++ b/_sources/commands/envelope.rst.txt @@ -0,0 +1,27 @@ +envelope +======== + +**Name**: + +geom envelope + +**Description**: + +geom Calculate the envelope of a Geometry. + +**Arguments**: + + * -e --expandBy: The distance to expand the Envelope + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom envelope -g "POLYGON ((9 52, 9 50, 7 50, 7 48, 10 47, 10 46, 13 46, 11 52, 10 52, 9 52))" + diff --git a/_sources/commands/equals.rst.txt b/_sources/commands/equals.rst.txt new file mode 100644 index 00000000..5b572bfe --- /dev/null +++ b/_sources/commands/equals.rst.txt @@ -0,0 +1,31 @@ +equals +====== + +**Name**: + +geom equals + +**Description**: + +geom Determine whether the first geometry equals the second geometry. + +**Arguments**: + + * -t --type: The type of equals (exact, norm, topo) + + * -l --tolerance: The tolerance when type is exact + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom equals -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" + diff --git a/_sources/commands/fix.rst.txt b/_sources/commands/fix.rst.txt new file mode 100644 index 00000000..d77edaba --- /dev/null +++ b/_sources/commands/fix.rst.txt @@ -0,0 +1,25 @@ +fix +=== + +**Name**: + +geom fix + +**Description**: + +geom Fix an invalid Geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom fix -g "LINESTRING (0 0, 0 0, 0 0, 0 0, 1 1)" + diff --git a/_sources/commands/fromwkb.rst.txt b/_sources/commands/fromwkb.rst.txt new file mode 100644 index 00000000..293cdfc5 --- /dev/null +++ b/_sources/commands/fromwkb.rst.txt @@ -0,0 +1,25 @@ +fromwkb +======= + +**Name**: + +geom fromwkb + +**Description**: + +geom Convert a WKB to a WKT Geometry. + +**Arguments**: + + * -b --wkb: The WKB text + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom fromwkb -b 00000000013FF00000000000004000000000000000 + diff --git a/_sources/commands/get.rst.txt b/_sources/commands/get.rst.txt new file mode 100644 index 00000000..ca2ad6f3 --- /dev/null +++ b/_sources/commands/get.rst.txt @@ -0,0 +1,27 @@ +get +=== + +**Name**: + +geom get + +**Description**: + +geom Get a sub geometry from a geometry collection by index. + +**Arguments**: + + * -n --index: The index number of the Geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom get -g "MULTIPOINT (1 1, 5 5, 10 10)" -n 1 + diff --git a/_sources/commands/grid.rst.txt b/_sources/commands/grid.rst.txt new file mode 100644 index 00000000..3dba8998 --- /dev/null +++ b/_sources/commands/grid.rst.txt @@ -0,0 +1,30 @@ +grid +==== + +**Name**: + +geom grid + +**Description**: + +geom Calculate a grid around the input geometry. + +**Arguments**: + + * -c --columns: The number of columns + + * -r --rows: The number of rows + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom grid -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -c 10 -r 10 + +.. image:: grid.png \ No newline at end of file diff --git a/_sources/commands/hausdorffdistance.rst.txt b/_sources/commands/hausdorffdistance.rst.txt new file mode 100644 index 00000000..0fbafe54 --- /dev/null +++ b/_sources/commands/hausdorffdistance.rst.txt @@ -0,0 +1,27 @@ +hausdorffdistance +================= + +**Name**: + +geom hausdorffdistance + +**Description**: + +geom Calculate the discrete hausdorff distance between the two input geometries. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom hausdorffdistance -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))" + diff --git a/_sources/commands/help.rst.txt b/_sources/commands/help.rst.txt new file mode 100644 index 00000000..77d8f3b2 --- /dev/null +++ b/_sources/commands/help.rst.txt @@ -0,0 +1,23 @@ +help +==== + +**Name**: + +geom help + +**Description**: + +geom Get help + +**Arguments**: + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom help + diff --git a/_sources/commands/hilbertcurve.rst.txt b/_sources/commands/hilbertcurve.rst.txt new file mode 100644 index 00000000..a29e2c75 --- /dev/null +++ b/_sources/commands/hilbertcurve.rst.txt @@ -0,0 +1,28 @@ +hilbertcurve +============ + +**Name**: + +geom hilbertcurve + +**Description**: + +geom Create a hilbert curve. + +**Arguments**: + + * -n --number: The number of points. + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom hilbertcurve -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 18 + +.. image:: hilbertcurve.png \ No newline at end of file diff --git a/_sources/commands/interiorpoint.rst.txt b/_sources/commands/interiorpoint.rst.txt new file mode 100644 index 00000000..6751cf0b --- /dev/null +++ b/_sources/commands/interiorpoint.rst.txt @@ -0,0 +1,25 @@ +interiorpoint +============= + +**Name**: + +geom interiorpoint + +**Description**: + +geom Calculate the interior point of the input geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom interiorpoint -g "POLYGON ((8 54, 8 51, 14 51, 14 47, 7 47, 7 42, 17 45, 16 53, 13 53, 8 54))" + diff --git a/_sources/commands/interpolatepoint.rst.txt b/_sources/commands/interpolatepoint.rst.txt new file mode 100644 index 00000000..11e3d0d0 --- /dev/null +++ b/_sources/commands/interpolatepoint.rst.txt @@ -0,0 +1,27 @@ +interpolatepoint +================ + +**Name**: + +geom interpolatepoint + +**Description**: + +geom Interpolate the location of a point on the input linear geometry given a percentage position. + +**Arguments**: + + * -p --position: The position between 0 and 1 + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom interpolatepoint -g "LINESTRING (0 0, 5 5, 10 10)" -p 0.25 + diff --git a/_sources/commands/intersection.rst.txt b/_sources/commands/intersection.rst.txt new file mode 100644 index 00000000..b24195c8 --- /dev/null +++ b/_sources/commands/intersection.rst.txt @@ -0,0 +1,27 @@ +intersection +============ + +**Name**: + +geom intersection + +**Description**: + +geom Calculate the intersection between two geometries. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom intersection -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))" + diff --git a/_sources/commands/intersects.rst.txt b/_sources/commands/intersects.rst.txt new file mode 100644 index 00000000..de5dee71 --- /dev/null +++ b/_sources/commands/intersects.rst.txt @@ -0,0 +1,27 @@ +intersects +========== + +**Name**: + +geom intersects + +**Description**: + +geom Determine if the first geometry intersects the second geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom intersects -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))" + diff --git a/_sources/commands/isccw.rst.txt b/_sources/commands/isccw.rst.txt new file mode 100644 index 00000000..d0e4ff74 --- /dev/null +++ b/_sources/commands/isccw.rst.txt @@ -0,0 +1,25 @@ +isccw +===== + +**Name**: + +geom isccw + +**Description**: + +geom Is the geometry's coordinates oriented counter clockwise of not. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom isccw -g "LINEARRING (15 20, 10 20, 10 10, 15 10, 15 20)" + diff --git a/_sources/commands/isclosed.rst.txt b/_sources/commands/isclosed.rst.txt new file mode 100644 index 00000000..78ec805b --- /dev/null +++ b/_sources/commands/isclosed.rst.txt @@ -0,0 +1,25 @@ +isclosed +======== + +**Name**: + +geom isclosed + +**Description**: + +geom Determine if the input geometry is closed or not. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom isclosed -g "LINESTRING (1 1, 1 5, 5 5, 5 1, 1 1)" + diff --git a/_sources/commands/isempty.rst.txt b/_sources/commands/isempty.rst.txt new file mode 100644 index 00000000..c475224c --- /dev/null +++ b/_sources/commands/isempty.rst.txt @@ -0,0 +1,25 @@ +isempty +======= + +**Name**: + +geom isempty + +**Description**: + +geom Determine if the input geometry is empty or not. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom isempty -g "POINT EMPTY" + diff --git a/_sources/commands/isrectangle.rst.txt b/_sources/commands/isrectangle.rst.txt new file mode 100644 index 00000000..47f83635 --- /dev/null +++ b/_sources/commands/isrectangle.rst.txt @@ -0,0 +1,25 @@ +isrectangle +=========== + +**Name**: + +geom isrectangle + +**Description**: + +geom Determine if the input geometry is rectangular or not. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom isrectangle -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" + diff --git a/_sources/commands/isring.rst.txt b/_sources/commands/isring.rst.txt new file mode 100644 index 00000000..b87f1738 --- /dev/null +++ b/_sources/commands/isring.rst.txt @@ -0,0 +1,25 @@ +isring +====== + +**Name**: + +geom isring + +**Description**: + +geom Determine if the input geometry is a ring or not. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom isring -g "LINESTRING (1 1, 1 5, 5 5, 5 1, 1 1)" + diff --git a/_sources/commands/issimple.rst.txt b/_sources/commands/issimple.rst.txt new file mode 100644 index 00000000..fe4fba8c --- /dev/null +++ b/_sources/commands/issimple.rst.txt @@ -0,0 +1,25 @@ +issimple +======== + +**Name**: + +geom issimple + +**Description**: + +geom Determine if the input geometry is simple or not. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom issimple -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" + diff --git a/_sources/commands/isvalid.rst.txt b/_sources/commands/isvalid.rst.txt new file mode 100644 index 00000000..137c55fc --- /dev/null +++ b/_sources/commands/isvalid.rst.txt @@ -0,0 +1,27 @@ +isvalid +======= + +**Name**: + +geom isvalid + +**Description**: + +geom Determine if the input geometry is valid or not. + +**Arguments**: + + * -t --type: The flag to show the validation error message, the error location, or validity (msg, loc, or val) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom isvalid -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" + diff --git a/_sources/commands/iswithindistance.rst.txt b/_sources/commands/iswithindistance.rst.txt new file mode 100644 index 00000000..555ba1f2 --- /dev/null +++ b/_sources/commands/iswithindistance.rst.txt @@ -0,0 +1,29 @@ +iswithindistance +================ + +**Name**: + +geom iswithindistance + +**Description**: + +geom Determine if the input geometry is within the given distance of the other geometry. + +**Arguments**: + + * -d --distance: The distance + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom iswithindistance -g "POINT (1 1)" -o "POINT (20 23)" -d 30 + diff --git a/_sources/commands/kochsnowflake.rst.txt b/_sources/commands/kochsnowflake.rst.txt new file mode 100644 index 00000000..d2786e7a --- /dev/null +++ b/_sources/commands/kochsnowflake.rst.txt @@ -0,0 +1,28 @@ +kochsnowflake +============= + +**Name**: + +geom kochsnowflake + +**Description**: + +geom Generate a koch snow flake. + +**Arguments**: + + * -n --number: The number of points. + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom kochsnowflake -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 100 + +.. image:: kochsnowflake.png \ No newline at end of file diff --git a/_sources/commands/largestemptycircle.rst.txt b/_sources/commands/largestemptycircle.rst.txt new file mode 100644 index 00000000..4eb68a7e --- /dev/null +++ b/_sources/commands/largestemptycircle.rst.txt @@ -0,0 +1,27 @@ +largestemptycircle +================== + +**Name**: + +geom largestemptycircle + +**Description**: + +geom Calculate the largest empty circle. + +**Arguments**: + + * -t --tolerance: The tolerance + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom largestemptycircle -g "MULTIPOINT ((-122.3935317993164 47.57571508225466),(-122.38838195800781 47.57444120741259),(-122.39061355590819 47.5823155737249))" + diff --git a/_sources/commands/linedissolve.rst.txt b/_sources/commands/linedissolve.rst.txt new file mode 100644 index 00000000..c0b38fef --- /dev/null +++ b/_sources/commands/linedissolve.rst.txt @@ -0,0 +1,25 @@ +linedissolve +============ + +**Name**: + +geom linedissolve + +**Description**: + +geom Dissolve LinesStrings + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom linedissolve -g "LINESTRING (1143429.5177049513 646812.5700195221, 1148620.8088546866 646812.5700195221, 1149092.7444137533 643980.956665121, 1150980.4866500208 640677.4077516531)" + diff --git a/_sources/commands/linemerge.rst.txt b/_sources/commands/linemerge.rst.txt new file mode 100644 index 00000000..c200d191 --- /dev/null +++ b/_sources/commands/linemerge.rst.txt @@ -0,0 +1,25 @@ +linemerge +========= + +**Name**: + +geom linemerge + +**Description**: + +geom Merge lines of the input geometry together. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom linemerge -g "MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))" + diff --git a/_sources/commands/list.rst.txt b/_sources/commands/list.rst.txt new file mode 100644 index 00000000..d6a49a19 --- /dev/null +++ b/_sources/commands/list.rst.txt @@ -0,0 +1,25 @@ +list +==== + +**Name**: + +geom list + +**Description**: + +geom List all of the geometry commands. + +**Arguments**: + + * -d --description: Include the description + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom list + diff --git a/_sources/commands/locatepoint.rst.txt b/_sources/commands/locatepoint.rst.txt new file mode 100644 index 00000000..96688bf3 --- /dev/null +++ b/_sources/commands/locatepoint.rst.txt @@ -0,0 +1,27 @@ +locatepoint +=========== + +**Name**: + +geom locatepoint + +**Description**: + +geom Locate the position of a point on the linear geometry as a percentage of the distance. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom locatepoint -g "LINESTRING (0 0, 5 5, 10 10)" -o "POINT (2.5 2.5)" + diff --git a/_sources/commands/maximuminscribedcircle.rst.txt b/_sources/commands/maximuminscribedcircle.rst.txt new file mode 100644 index 00000000..aa6c3837 --- /dev/null +++ b/_sources/commands/maximuminscribedcircle.rst.txt @@ -0,0 +1,27 @@ +maximuminscribedcircle +====================== + +**Name**: + +geom maximuminscribedcircle + +**Description**: + +geom Calculate the maximum inscribed circle. + +**Arguments**: + + * -t --tolerance: The tolerance + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom maximuminscribedcircle -g "POLYGON ((-122.38855361938475 47.5805786829606, -122.38636493682861 47.5783206388176, -122.38700866699219 47.5750491969984, -122.38177299499512 47.57502024527343, -122.38481998443604 47.5780600889959, -122.38151550292969 47.5805786829606, -122.38855361938475 47.5805786829606))" + diff --git a/_sources/commands/mincircle.rst.txt b/_sources/commands/mincircle.rst.txt new file mode 100644 index 00000000..2753bf0d --- /dev/null +++ b/_sources/commands/mincircle.rst.txt @@ -0,0 +1,26 @@ +mincircle +========= + +**Name**: + +geom mincircle + +**Description**: + +geom Calculate the minimum bounding circle of the input geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom mincircle -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" + +.. image:: mincircle.png \ No newline at end of file diff --git a/_sources/commands/minclearance.rst.txt b/_sources/commands/minclearance.rst.txt new file mode 100644 index 00000000..a8c1b957 --- /dev/null +++ b/_sources/commands/minclearance.rst.txt @@ -0,0 +1,25 @@ +minclearance +============ + +**Name**: + +geom minclearance + +**Description**: + +geom Calculate the minimum clearance of the input geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom minclearance -g "POLYGON ((16 51, 7 53, 12 46, 5 41, 12 41, 16 51))" + diff --git a/_sources/commands/mindiameter.rst.txt b/_sources/commands/mindiameter.rst.txt new file mode 100644 index 00000000..031804f4 --- /dev/null +++ b/_sources/commands/mindiameter.rst.txt @@ -0,0 +1,25 @@ +mindiameter +=========== + +**Name**: + +geom mindiameter + +**Description**: + +geom Calculate the minimum diameter of the input geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom mindiameter -g "POLYGON ((16 51, 7 53, 12 46, 5 41, 12 41, 16 51))" + diff --git a/_sources/commands/minrect.rst.txt b/_sources/commands/minrect.rst.txt new file mode 100644 index 00000000..d3375883 --- /dev/null +++ b/_sources/commands/minrect.rst.txt @@ -0,0 +1,26 @@ +minrect +======= + +**Name**: + +geom minrect + +**Description**: + +geom Calculate the minimum rectangle of the input geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom minrect -g "POLYGON ((16 51, 7 53, 12 46, 5 41, 12 41, 16 51))" + +.. image:: minrect.png \ No newline at end of file diff --git a/_sources/commands/mortoncurve.rst.txt b/_sources/commands/mortoncurve.rst.txt new file mode 100644 index 00000000..3952a1c4 --- /dev/null +++ b/_sources/commands/mortoncurve.rst.txt @@ -0,0 +1,28 @@ +mortoncurve +=========== + +**Name**: + +geom mortoncurve + +**Description**: + +geom Create a morton curve. + +**Arguments**: + + * -n --number: The number of points. + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom mortoncurve -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 54 + +.. image:: mortoncurve.png \ No newline at end of file diff --git a/_sources/commands/narrow.rst.txt b/_sources/commands/narrow.rst.txt new file mode 100644 index 00000000..76c008db --- /dev/null +++ b/_sources/commands/narrow.rst.txt @@ -0,0 +1,25 @@ +narrow +====== + +**Name**: + +geom narrow + +**Description**: + +geom Convert a geometry collection to it's most specific type. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom narrow -g "GEOMETRYCOLLECTION (POINT (1 1), POINT(10 10))" + diff --git a/_sources/commands/nearestpoints.rst.txt b/_sources/commands/nearestpoints.rst.txt new file mode 100644 index 00000000..c33182d7 --- /dev/null +++ b/_sources/commands/nearestpoints.rst.txt @@ -0,0 +1,27 @@ +nearestpoints +============= + +**Name**: + +geom nearestpoints + +**Description**: + +geom Get the nearest points between two geometries + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + null + diff --git a/_sources/commands/node.rst.txt b/_sources/commands/node.rst.txt new file mode 100644 index 00000000..fcf25ce2 --- /dev/null +++ b/_sources/commands/node.rst.txt @@ -0,0 +1,27 @@ +node +==== + +**Name**: + +geom node + +**Description**: + +geom Node the linestrings from the input geometry. + +**Arguments**: + + * -n --number: The number of decimal places + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom node -g "LINESTRING (5 51, 8 54, 12 50, 8 47, 10 55, 7 52, 5 53, 6 51)" -n 5 + diff --git a/_sources/commands/normalize.rst.txt b/_sources/commands/normalize.rst.txt new file mode 100644 index 00000000..5b02d113 --- /dev/null +++ b/_sources/commands/normalize.rst.txt @@ -0,0 +1,25 @@ +normalize +========= + +**Name**: + +geom normalize + +**Description**: + +geom Calculate the normalized version of the input geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom normalize -g "MULTIPOINT ((12.5 12.5), (13.5 7.5), (7 9), (9.5 13), (8 7.5))" + diff --git a/_sources/commands/octagonalenvelope.rst.txt b/_sources/commands/octagonalenvelope.rst.txt new file mode 100644 index 00000000..05e2e66b --- /dev/null +++ b/_sources/commands/octagonalenvelope.rst.txt @@ -0,0 +1,25 @@ +octagonalenvelope +================= + +**Name**: + +geom octagonalenvelope + +**Description**: + +geom Calculate the octagonal envelope of the input geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom octagonalenvelope -g "MULTIPOINT ((12.5 12.5), (13.5 7.5), (7 9), (9.5 13), (8 7.5))" + diff --git a/_sources/commands/offsetCurve.rst.txt b/_sources/commands/offsetCurve.rst.txt new file mode 100644 index 00000000..3ca534c5 --- /dev/null +++ b/_sources/commands/offsetCurve.rst.txt @@ -0,0 +1,39 @@ +offsetCurve +=========== + +**Name**: + +geom offsetCurve + +**Description**: + +geom Calculate the offsetCurve of a Geometry. + +**Arguments**: + + * -d --distance: The buffer distance + + * -q --quadrantSegments: The number of quadrant segments + + * -c --endCapStyle: The end cap style (round, flat/butt, square) + + * -s --singleSided: The flag for whether the buffer should be single sided + + * -f --simplifyFactor: The simplify factor + + * -m --mitreLimit: The mitre limit + + * -j --joinStyle: The join style (round, mitre, bevel) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom offsetcurve -g "LINESTRING (-122.38774895668028 47.579341113135314, -122.38665461540221 47.57931940112287, -122.38654732704164 47.58122278667477, -122.38340377807616 47.58118660128292, -122.38322138786316 47.581939252282744)" -d 0.001 + diff --git a/_sources/commands/overlaps.rst.txt b/_sources/commands/overlaps.rst.txt new file mode 100644 index 00000000..87292ade --- /dev/null +++ b/_sources/commands/overlaps.rst.txt @@ -0,0 +1,27 @@ +overlaps +======== + +**Name**: + +geom overlaps + +**Description**: + +geom Determine whether the first geometry overlaps with the other geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom overlaps -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((2 2, 2 14, 14 14, 14 2, 2 2))" + diff --git a/_sources/commands/pipe.rst.txt b/_sources/commands/pipe.rst.txt new file mode 100644 index 00000000..2f8e2f82 --- /dev/null +++ b/_sources/commands/pipe.rst.txt @@ -0,0 +1,25 @@ +pipe +==== + +**Name**: + +geom pipe + +**Description**: + +geom Combine multiple commands together with a pipe. + +**Arguments**: + + * -c --commands: Commands separate by pipe + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom pipe -c "buffer -g 'POINT(1 1)' -d 10 | centroid" + diff --git a/_sources/commands/placepoint.rst.txt b/_sources/commands/placepoint.rst.txt new file mode 100644 index 00000000..94bcbc2e --- /dev/null +++ b/_sources/commands/placepoint.rst.txt @@ -0,0 +1,27 @@ +placepoint +========== + +**Name**: + +geom placepoint + +**Description**: + +geom Place a point on the input linear geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom placepoint -g "LINESTRING (0 0, 5 5, 10 10)" -o "POINT (3 4.5)" + diff --git a/_sources/commands/pointatangle.rst.txt b/_sources/commands/pointatangle.rst.txt new file mode 100644 index 00000000..aed4e7c8 --- /dev/null +++ b/_sources/commands/pointatangle.rst.txt @@ -0,0 +1,29 @@ +pointatangle +============ + +**Name**: + +geom pointatangle + +**Description**: + +geom Calculate a point at a given angle distance from the input point. + +**Arguments**: + + * -d --distance: The distance + + * -a --angle: The angle (in degrees) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom pointatangle -g "POINT (10 10)" -a 90 -d 10 + diff --git a/_sources/commands/pointsalong.rst.txt b/_sources/commands/pointsalong.rst.txt new file mode 100644 index 00000000..7459765e --- /dev/null +++ b/_sources/commands/pointsalong.rst.txt @@ -0,0 +1,28 @@ +pointsalong +=========== + +**Name**: + +geom pointsalong + +**Description**: + +geom Place points along a line + +**Arguments**: + + * -d --distance: The distance between points + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom pointsalong -g "LINESTRING (0 0, 10 10)" -d 1 + +.. image:: pointsalong.png \ No newline at end of file diff --git a/_sources/commands/polygonize.rst.txt b/_sources/commands/polygonize.rst.txt new file mode 100644 index 00000000..eec239f9 --- /dev/null +++ b/_sources/commands/polygonize.rst.txt @@ -0,0 +1,27 @@ +polygonize +========== + +**Name**: + +geom polygonize + +**Description**: + +geom Creates polygons from lines. + +**Arguments**: + + * -f --full: Whether to include a full report (polygons, cutEdges, dangles, and invalidRingLines) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom polygonize -g "MULTILINESTRING ((-5.5 45, -4.5 46.5), (-4.5 46.5, 1 52), (1 52, 2.5 54), (-1 54, 1 52), (1 52, 5.5 48.5), (5.5 48.5, 9 46), (0.5 42.5, 2 44), (2 44, 5.5 48.5), (5.5 48.5, 7 50.5), (-6 47, -4.5 46.5), (-4.5 46.5, 2 44), (2 44, 4.5 43))" + diff --git a/_sources/commands/project.rst.txt b/_sources/commands/project.rst.txt new file mode 100644 index 00000000..54c99b53 --- /dev/null +++ b/_sources/commands/project.rst.txt @@ -0,0 +1,29 @@ +project +======= + +**Name**: + +geom project + +**Description**: + +geom Project the input geometry from one coordinate system to another. + +**Arguments**: + + * -s --source: The source projection + + * -t --target: The target projection + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom project -g "POINT (1179931.55 645310.31)" -s EPSG:2927 -t EPSG:4326 + diff --git a/_sources/commands/random.rst.txt b/_sources/commands/random.rst.txt new file mode 100644 index 00000000..33c9a73b --- /dev/null +++ b/_sources/commands/random.rst.txt @@ -0,0 +1,33 @@ +random +====== + +**Name**: + +geom random + +**Description**: + +geom Generate random points inside the input geometry. + +**Arguments**: + + * -n --number: The number of points + + * -r --gridded: The flag for whether the random points should be gridded. + + * -c --constrained: The flag for whether the random points should be constrained to a circle when gridded. + + * -f --gutterFraction: The gutter distance or padding for random points when gridded. + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom random -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 100 + diff --git a/_sources/commands/randomwalk.rst.txt b/_sources/commands/randomwalk.rst.txt new file mode 100644 index 00000000..d584a3c2 --- /dev/null +++ b/_sources/commands/randomwalk.rst.txt @@ -0,0 +1,33 @@ +randomwalk +========== + +**Name**: + +geom randomwalk + +**Description**: + +geom Generate a random walk as a linestring. + +**Arguments**: + + * -n --number: The number of walks + + * -d --distance: The distance between Coordinates + + * -p --probability: The probability of changing direction + + * -a --angle: The angle increment (in degrees) when changing direction + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom randomwalk -n 100 -a 45 -d 10 -g "POINT (1 1)" + diff --git a/_sources/commands/rectangle.rst.txt b/_sources/commands/rectangle.rst.txt new file mode 100644 index 00000000..be38e07d --- /dev/null +++ b/_sources/commands/rectangle.rst.txt @@ -0,0 +1,36 @@ +rectangle +========= + +**Name**: + +geom rectangle + +**Description**: + +geom Create a rectangle from the input geometry. + +**Arguments**: + + * -w --width: The width + + * -h --height: The height + + * -p --numberOfPoints: The number of points + + * -r --rotation: The rotation + + * -c --center: The flag to use center (true) or the base (false) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom rectangle -g "POINT (100 100)" -p 30 -w 500 -h 500 + +.. image:: rectangle.png \ No newline at end of file diff --git a/_sources/commands/reduceprecision.rst.txt b/_sources/commands/reduceprecision.rst.txt new file mode 100644 index 00000000..73ccc93c --- /dev/null +++ b/_sources/commands/reduceprecision.rst.txt @@ -0,0 +1,33 @@ +reduceprecision +=============== + +**Name**: + +geom reduceprecision + +**Description**: + +geom Reduce the precision of the input geometry. + +**Arguments**: + + * -t --type: The precision model type (FIXED, FLOATING, FLOATING_SINGLE) + + * -s --scale: The precision model scale when type is FLOATING + + * -p --pointWise: Whether the precision reducer operates pointwise + + * -r --removeCollapsed: Whether the precision reducer should remove collapsed geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom reduceprecision -g "POINT (-5.70068359375 45.1416015625)" -s 2 -t fixed + diff --git a/_sources/commands/reflect.rst.txt b/_sources/commands/reflect.rst.txt new file mode 100644 index 00000000..94972875 --- /dev/null +++ b/_sources/commands/reflect.rst.txt @@ -0,0 +1,33 @@ +reflect +======= + +**Name**: + +geom reflect + +**Description**: + +geom Create a new geometry by applying the reflect affine transformation on the input geometry. + +**Arguments**: + + * -0 --x0: The x-ordinate of a point on the reflection line + + * -1 --y0: The y-ordinate of a point on the reflection line + + * -2 --x1: The x-ordinate of a another point on the reflection line + + * -3 --y1: The y-ordinate of a another point on the reflection line + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom reflect -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -0 5 -1 2 + diff --git a/_sources/commands/relate.rst.txt b/_sources/commands/relate.rst.txt new file mode 100644 index 00000000..326ed275 --- /dev/null +++ b/_sources/commands/relate.rst.txt @@ -0,0 +1,29 @@ +relate +====== + +**Name**: + +geom relate + +**Description**: + +geom Determine if the input Geometry and the other Geometry are related according to the DE-9IM intersection matrix or calculate the DE-9IM. + +**Arguments**: + + * -m --matrix: The DE-9IM intersection matrix + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom relate -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POINT (5 5)" + diff --git a/_sources/commands/reverse.rst.txt b/_sources/commands/reverse.rst.txt new file mode 100644 index 00000000..11c76b0d --- /dev/null +++ b/_sources/commands/reverse.rst.txt @@ -0,0 +1,25 @@ +reverse +======= + +**Name**: + +geom reverse + +**Description**: + +geom Reverse the coordinates of the input geometry + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom reverse -g "LINESTRING (0 0, 5 5, 10 10)" + diff --git a/_sources/commands/rotate.rst.txt b/_sources/commands/rotate.rst.txt new file mode 100644 index 00000000..46a67e04 --- /dev/null +++ b/_sources/commands/rotate.rst.txt @@ -0,0 +1,35 @@ +rotate +====== + +**Name**: + +geom rotate + +**Description**: + +geom Create a new geometry by rotating the input geometry + +**Arguments**: + + * -t --theta: The rotation angle, in radians + + * -x --xCoordinate: The x-ordinate of the rotation point + + * -y --yCoordinate: The y-ordinate of the rotation point + + * -s --sine: The sine of the rotation angle + + * -c --cosine: The cosine of the rotation angle + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom rotate -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -t 0.785398163 + diff --git a/_sources/commands/scale.rst.txt b/_sources/commands/scale.rst.txt new file mode 100644 index 00000000..190c8818 --- /dev/null +++ b/_sources/commands/scale.rst.txt @@ -0,0 +1,33 @@ +scale +===== + +**Name**: + +geom scale + +**Description**: + +geom Create a new geometry by scaling the input geometry + +**Arguments**: + + * -s --xscale: The value to scale by in the x direction + + * -t --yscale: The value to scale by in the y direction + + * -x --xcoordinate: The x-ordinate of the point to scale around + + * -y --ycoordinate: The y-ordinate of the point to scale around + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom scale -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -s 2 -t 5 + diff --git a/_sources/commands/shear.rst.txt b/_sources/commands/shear.rst.txt new file mode 100644 index 00000000..3afc5f16 --- /dev/null +++ b/_sources/commands/shear.rst.txt @@ -0,0 +1,29 @@ +shear +===== + +**Name**: + +geom shear + +**Description**: + +geom Create a new geometry by apply a shear affine transformation to the input geometry + +**Arguments**: + + * -x --xDistance: The value to translate by in the x direction + + * -y -yDistance: The value to translate by in the y direction + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom shear -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -x 4 -y 2 + diff --git a/_sources/commands/sierpinskicarpet.rst.txt b/_sources/commands/sierpinskicarpet.rst.txt new file mode 100644 index 00000000..80563767 --- /dev/null +++ b/_sources/commands/sierpinskicarpet.rst.txt @@ -0,0 +1,28 @@ +sierpinskicarpet +================ + +**Name**: + +geom sierpinskicarpet + +**Description**: + +geom Create a sierpinski carpet. + +**Arguments**: + + * -n --number: The number of points. + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom sierpinskicarpet -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 100 + +.. image:: sierpinskicarpet.png \ No newline at end of file diff --git a/_sources/commands/similarity.rst.txt b/_sources/commands/similarity.rst.txt new file mode 100644 index 00000000..f33065d4 --- /dev/null +++ b/_sources/commands/similarity.rst.txt @@ -0,0 +1,29 @@ +similarity +========== + +**Name**: + +geom similarity + +**Description**: + +geom Calculate the degree of similarity between two geometries. + +**Arguments**: + + * -a --algorithm: The algorithm (area/a or hausdorff/h) + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom similarity -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((2 2, 2 14, 14 14, 14 2, 2 2))" -a "area" + diff --git a/_sources/commands/simplify.rst.txt b/_sources/commands/simplify.rst.txt new file mode 100644 index 00000000..289e8a11 --- /dev/null +++ b/_sources/commands/simplify.rst.txt @@ -0,0 +1,29 @@ +simplify +======== + +**Name**: + +geom simplify + +**Description**: + +geom Simplify the input geometry. + +**Arguments**: + + * -a --algorithm: The distance tolerance (douglaspeucker/dp or topologypreserving/tp or visvalingamwhyat/vw) + + * -d --distance: The distance tolerance + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom simplify -g "LINESTRING (1 1, 2.5 2.5, 3.5 3.5, 5 5, 6.5 6.5, 8 8, 9 9, 10.5 10.5, 12 12)" -a dp -d 2 + diff --git a/_sources/commands/sinestar.rst.txt b/_sources/commands/sinestar.rst.txt new file mode 100644 index 00000000..83b1d83b --- /dev/null +++ b/_sources/commands/sinestar.rst.txt @@ -0,0 +1,40 @@ +sinestar +======== + +**Name**: + +geom sinestar + +**Description**: + +geom Create a sine star. + +**Arguments**: + + * -n --numberOfArms: The number of arms + + * -l --armLengthRatio: The arm length ratio + + * -w --width: The width + + * -h --height: The height + + * -p --numberOfPoints: The number of points + + * -r --rotation: The rotation + + * -c --center: The flag to use center (true) or the base (false) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom sinestar -l 0.9 -n 12 -p 1000 -w 500 -h 500 -g "POINT (100 100)" + +.. image:: sinestar.png \ No newline at end of file diff --git a/_sources/commands/slice.rst.txt b/_sources/commands/slice.rst.txt new file mode 100644 index 00000000..707f5741 --- /dev/null +++ b/_sources/commands/slice.rst.txt @@ -0,0 +1,29 @@ +slice +===== + +**Name**: + +geom slice + +**Description**: + +geom Get a subset of geometries using a start and end index. + +**Arguments**: + + * -s --start: The start index number + + * -e --end: The end index number + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + null + diff --git a/_sources/commands/snap.rst.txt b/_sources/commands/snap.rst.txt new file mode 100644 index 00000000..e8cedd99 --- /dev/null +++ b/_sources/commands/snap.rst.txt @@ -0,0 +1,29 @@ +snap +==== + +**Name**: + +geom snap + +**Description**: + +geom Snap the input geometry to the other geometry. + +**Arguments**: + + * -d --distance: The distance/tolerance + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom snap -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((11 11, 11 20, 20 20, 20 11, 11 11))" -d 1.5 + diff --git a/_sources/commands/split.rst.txt b/_sources/commands/split.rst.txt new file mode 100644 index 00000000..181dc821 --- /dev/null +++ b/_sources/commands/split.rst.txt @@ -0,0 +1,27 @@ +split +===== + +**Name**: + +geom split + +**Description**: + +geom Split a Geometry by another Geometry + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom split -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "LINESTRING (0 0, 10 10)" + diff --git a/_sources/commands/spoke.rst.txt b/_sources/commands/spoke.rst.txt new file mode 100644 index 00000000..d61e85f8 --- /dev/null +++ b/_sources/commands/spoke.rst.txt @@ -0,0 +1,28 @@ +spoke +===== + +**Name**: + +geom spoke + +**Description**: + +geom Create a spoke diagram with lines between a single Geometry to other Geometries + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom spoke -g "MULTIPOINT ((5.875473869469681 1.0101660098606535), (19.64273518313129 8.032868631563336), (19.397302929472787 10.139284609662209), (12.61792804667091 17.61654337241537), (4.802498121787375 9.17962232316298))" -o "POINT (5 5)" + +.. image:: spoke.png \ No newline at end of file diff --git a/_sources/commands/squircle.rst.txt b/_sources/commands/squircle.rst.txt new file mode 100644 index 00000000..94d0590f --- /dev/null +++ b/_sources/commands/squircle.rst.txt @@ -0,0 +1,36 @@ +squircle +======== + +**Name**: + +geom squircle + +**Description**: + +geom Create a squircle. + +**Arguments**: + + * -w --width: The width + + * -h --height: The height + + * -p --numberOfPoints: The number of points + + * -r --rotation: The rotation + + * -c --center: The flag to use center (true) or the base (false) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom squircle -g "POINT (100 100)" -p 30 -w 500 -h 500 + +.. image:: squircle.png \ No newline at end of file diff --git a/_sources/commands/startpoint.rst.txt b/_sources/commands/startpoint.rst.txt new file mode 100644 index 00000000..9e8c257e --- /dev/null +++ b/_sources/commands/startpoint.rst.txt @@ -0,0 +1,25 @@ +startpoint +========== + +**Name**: + +geom startpoint + +**Description**: + +geom Get the start point of a LineString or MultiLineString. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom startpoint -g "LINESTRING (1 1, 5 5, 10 10)" + diff --git a/_sources/commands/subline.rst.txt b/_sources/commands/subline.rst.txt new file mode 100644 index 00000000..0f2bccff --- /dev/null +++ b/_sources/commands/subline.rst.txt @@ -0,0 +1,29 @@ +subline +======= + +**Name**: + +geom subline + +**Description**: + +geom Extract a sub line from a linear geometry. + +**Arguments**: + + * -s startPosition: The start position between 0 and 1 + + * -e endPosition: The end position between 0 and 1 + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom subline -g "LINESTRING (0 0, 10 10, 20 20)" -s 0.25 -e 0.75 + diff --git a/_sources/commands/supercircle.rst.txt b/_sources/commands/supercircle.rst.txt new file mode 100644 index 00000000..71962ac4 --- /dev/null +++ b/_sources/commands/supercircle.rst.txt @@ -0,0 +1,38 @@ +supercircle +=========== + +**Name**: + +geom supercircle + +**Description**: + +geom Create a super circle. + +**Arguments**: + + * -o --power: The positive power + + * -w --width: The width + + * -h --height: The height + + * -p --numberOfPoints: The number of points + + * -r --rotation: The rotation + + * -c --center: The flag to use center (true) or the base (false) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom supercircle -g "POINT (100 100)" -p 30 -w 500 -h 500 + +.. image:: supercircle.png \ No newline at end of file diff --git a/_sources/commands/symdifference.rst.txt b/_sources/commands/symdifference.rst.txt new file mode 100644 index 00000000..6c0484c4 --- /dev/null +++ b/_sources/commands/symdifference.rst.txt @@ -0,0 +1,27 @@ +symdifference +============= + +**Name**: + +geom symdifference + +**Description**: + +geom Calculate the symetric difference between two geometries + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom symdifference -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 20, 20 20, 20 5, 5 5))" + diff --git a/_sources/commands/text.rst.txt b/_sources/commands/text.rst.txt new file mode 100644 index 00000000..23b7458f --- /dev/null +++ b/_sources/commands/text.rst.txt @@ -0,0 +1,30 @@ +text +==== + +**Name**: + +geom text + +**Description**: + +geom Create a geometry from a string. + +**Arguments**: + + * -t --text: The text + + * -f --fontName: The font name + + * -s --pointSize: The font size + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom text -t "JTS" + +.. image:: text.png \ No newline at end of file diff --git a/_sources/commands/touches.rst.txt b/_sources/commands/touches.rst.txt new file mode 100644 index 00000000..8be525c5 --- /dev/null +++ b/_sources/commands/touches.rst.txt @@ -0,0 +1,27 @@ +touches +======= + +**Name**: + +geom touches + +**Description**: + +geom Determine if the input geometry touches another geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom touches -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((10 10, 10 14, 14 14, 14 10, 10 10))" + diff --git a/_sources/commands/towkb.rst.txt b/_sources/commands/towkb.rst.txt new file mode 100644 index 00000000..a5884866 --- /dev/null +++ b/_sources/commands/towkb.rst.txt @@ -0,0 +1,29 @@ +towkb +===== + +**Name**: + +geom towkb + +**Description**: + +geom Write a Geometry to WKB. + +**Arguments**: + + * -d --dimension: The output dimension (2 or 3) + + * -b --byte-order: The byte order (1 = big endian, 2 = little endian) + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom towkb -g "POINT (10 10)" + diff --git a/_sources/commands/translate.rst.txt b/_sources/commands/translate.rst.txt new file mode 100644 index 00000000..0b3bd2fc --- /dev/null +++ b/_sources/commands/translate.rst.txt @@ -0,0 +1,29 @@ +translate +========= + +**Name**: + +geom translate + +**Description**: + +geom Create a new geometry by applying the translate affine transformation on the input geometry. + +**Arguments**: + + * -x --xDistance: The value to translate by in the x direction + + * -y --yDistance: The value to translate by in the y direction + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom translate -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -x 4 -y 2 + diff --git a/_sources/commands/type.rst.txt b/_sources/commands/type.rst.txt new file mode 100644 index 00000000..bdeb13a9 --- /dev/null +++ b/_sources/commands/type.rst.txt @@ -0,0 +1,25 @@ +type +==== + +**Name**: + +geom type + +**Description**: + +geom Get the type of the geometry. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom type -g "POINT (1 1)" + diff --git a/_sources/commands/union.rst.txt b/_sources/commands/union.rst.txt new file mode 100644 index 00000000..e03f3626 --- /dev/null +++ b/_sources/commands/union.rst.txt @@ -0,0 +1,27 @@ +union +===== + +**Name**: + +geom union + +**Description**: + +geom Calculate the union between two geometries. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom union -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((10 10, 10 14, 14 14, 14 10, 10 10))" + diff --git a/_sources/commands/variablebuffer.rst.txt b/_sources/commands/variablebuffer.rst.txt new file mode 100644 index 00000000..fc31e205 --- /dev/null +++ b/_sources/commands/variablebuffer.rst.txt @@ -0,0 +1,27 @@ +variablebuffer +============== + +**Name**: + +geom variablebuffer + +**Description**: + +geom Calculate a variable buffer around a Geometry. + +**Arguments**: + + * -d --distance: The buffer distance + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom variablebuffer -g "LINESTRING(1 2, 3 4, 5 6)" -d 10 -d 15 -d 20 + diff --git a/_sources/commands/version.rst.txt b/_sources/commands/version.rst.txt new file mode 100644 index 00000000..dde14e23 --- /dev/null +++ b/_sources/commands/version.rst.txt @@ -0,0 +1,23 @@ +version +======= + +**Name**: + +geom version + +**Description**: + +geom Get the version + +**Arguments**: + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom version + diff --git a/_sources/commands/voronoi.rst.txt b/_sources/commands/voronoi.rst.txt new file mode 100644 index 00000000..081270ca --- /dev/null +++ b/_sources/commands/voronoi.rst.txt @@ -0,0 +1,26 @@ +voronoi +======= + +**Name**: + +geom voronoi + +**Description**: + +geom Generate a voronoi diagram. + +**Arguments**: + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom voronoi -g "MULTIPOINT ((12.5 12.5), (13.5 7.5), (7 9), (9.5 13), (8 7))" + +.. image:: voronoi.png \ No newline at end of file diff --git a/_sources/commands/within.rst.txt b/_sources/commands/within.rst.txt new file mode 100644 index 00000000..d3780cb7 --- /dev/null +++ b/_sources/commands/within.rst.txt @@ -0,0 +1,27 @@ +within +====== + +**Name**: + +geom within + +**Description**: + +geom Determine if the input geometry is within the other geometry. + +**Arguments**: + + * -o --otherGeometry: The other geometry + + * -g --geometry: The input geometry + + * --help: Print help message + + * --web-help: Open help in a web browser + + + +**Example**:: + + geom within -g "POINT (2 2)" -o "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" + diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt new file mode 100644 index 00000000..ba6033cd --- /dev/null +++ b/_sources/index.rst.txt @@ -0,0 +1,32 @@ +.. geom documentation master file, created by + sphinx-quickstart on Fri Apr 24 18:23:23 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Geometry Commands +================= + +Geometry Commands is a command line application for processing geometry. It is inspired by the wonderful Java Topology Suite (JTS) library and the Unix Philosophy. + +It contains one command line application (geom) with numerous subcommands (buffer, centroid, envelope) that generally read WKT geometry from standard input and then write WKT geometry to standard output. This enables several geometry commands to be chained together using pipes.:: + + echo "POINT (1 1)" | geom buffer -d 10 | geom envelope + +Geometry Commands is open source under the MIT license. I hope you find it useful. The code is available at `github `_. If you find any bugs or would like any enhancements please use the GitHub `issue tracker `_. + +Command Documentation +--------------------- + +.. toctree:: + :maxdepth: 2 + + install.rst + usage.rst + commands.rst + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/_sources/install.rst.txt b/_sources/install.rst.txt new file mode 100644 index 00000000..f9be86b0 --- /dev/null +++ b/_sources/install.rst.txt @@ -0,0 +1,5 @@ +Install +======= +To install, simple download the latest `zip file `_ and place the **bin** directory in your path. You should then be able to run the **geom** command. + +You can also download an uber jar that contains all of the required code and dependencies in one file that you can run with the **java -jar geom.X.X.jar** command. diff --git a/_sources/usage.rst.txt b/_sources/usage.rst.txt new file mode 100644 index 00000000..e4c07251 --- /dev/null +++ b/_sources/usage.rst.txt @@ -0,0 +1,37 @@ +Usage +===== +View a list of all geom commands:: + + geom list + +Get help for a command:: + + geom buffer --help + geom buffer: Buffer a geometry by a distance. + --help : Print help message + -c (--endCapStyle) VAL : The end cap style (round, flat/butt, square) + -d (--distance) N : The buffer distance + -g (--geometry) VAL : The input geometry + -q (--quadrantSegments) N : The number of quadrant segments + -s (--singleSided) : The flag for whether the buffer should be single sided + +Buffer a geometry:: + + echo "POINT (1 1)" | geom buffer -g "POINT(1 1)" -d 10 + +Or buffer a geometry by piping in text:: + + echo "POINT (1 1)" | geom buffer -d 10 + +Reproject a geometry:: + + echo "POINT (1 1)" | geom project -s "EPSG:4326" -t "EPSG:2927" + +Generate random points:: + + echo "POINT (1 1)" | geom buffer -d 100 | geom random -n 200 + +Draw a geometry to an image:: + + echo "POINT (1 1)" | geom buffer -d 100 | geom draw && open image.png + diff --git a/_static/_sphinx_javascript_frameworks_compat.js b/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 00000000..81415803 --- /dev/null +++ b/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,123 @@ +/* Compatability shim for jQuery and underscores.js. + * + * Copyright Sphinx contributors + * Released under the two clause BSD licence + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 00000000..30fee9d0 --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,925 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/css/badge_only.css b/_static/css/badge_only.css new file mode 100644 index 00000000..c718cee4 --- /dev/null +++ b/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff b/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 00000000..6cb60000 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff2 b/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 00000000..7059e231 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff b/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 00000000..f815f63f Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff2 b/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 00000000..f2c76e5b Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/_static/css/fonts/fontawesome-webfont.eot b/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 00000000..e9f60ca9 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/_static/css/fonts/fontawesome-webfont.svg b/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 00000000..855c845e --- /dev/null +++ b/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_static/css/fonts/fontawesome-webfont.ttf b/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 00000000..35acda2f Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/_static/css/fonts/fontawesome-webfont.woff b/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 00000000..400014a4 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/_static/css/fonts/fontawesome-webfont.woff2 b/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 00000000..4d13fc60 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/_static/css/fonts/lato-bold-italic.woff b/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 00000000..88ad05b9 Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff differ diff --git a/_static/css/fonts/lato-bold-italic.woff2 b/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 00000000..c4e3d804 Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/_static/css/fonts/lato-bold.woff b/_static/css/fonts/lato-bold.woff new file mode 100644 index 00000000..c6dff51f Binary files /dev/null and b/_static/css/fonts/lato-bold.woff differ diff --git a/_static/css/fonts/lato-bold.woff2 b/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 00000000..bb195043 Binary files /dev/null and b/_static/css/fonts/lato-bold.woff2 differ diff --git a/_static/css/fonts/lato-normal-italic.woff b/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 00000000..76114bc0 Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff differ diff --git a/_static/css/fonts/lato-normal-italic.woff2 b/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 00000000..3404f37e Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/_static/css/fonts/lato-normal.woff b/_static/css/fonts/lato-normal.woff new file mode 100644 index 00000000..ae1307ff Binary files /dev/null and b/_static/css/fonts/lato-normal.woff differ diff --git a/_static/css/fonts/lato-normal.woff2 b/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 00000000..3bf98433 Binary files /dev/null and b/_static/css/fonts/lato-normal.woff2 differ diff --git a/_static/css/theme.css b/_static/css/theme.css new file mode 100644 index 00000000..19a446a0 --- /dev/null +++ b/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel,.rst-content .menuselection{font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .guilabel,.rst-content .menuselection{border:1px solid #7fbbe3;background:#e7f2fa}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 00000000..d06a71d7 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 00000000..bb137617 --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '0.9.0', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 00000000..a858a410 Binary files /dev/null and b/_static/file.png differ diff --git a/_static/fonts/Inconsolata-Bold.ttf b/_static/fonts/Inconsolata-Bold.ttf new file mode 100644 index 00000000..809c1f58 Binary files /dev/null and b/_static/fonts/Inconsolata-Bold.ttf differ diff --git a/_static/fonts/Inconsolata-Regular.ttf b/_static/fonts/Inconsolata-Regular.ttf new file mode 100644 index 00000000..fc981ce7 Binary files /dev/null and b/_static/fonts/Inconsolata-Regular.ttf differ diff --git a/_static/fonts/Inconsolata.ttf b/_static/fonts/Inconsolata.ttf new file mode 100644 index 00000000..4b8a36d2 Binary files /dev/null and b/_static/fonts/Inconsolata.ttf differ diff --git a/_static/fonts/Lato-Bold.ttf b/_static/fonts/Lato-Bold.ttf new file mode 100644 index 00000000..1d23c706 Binary files /dev/null and b/_static/fonts/Lato-Bold.ttf differ diff --git a/_static/fonts/Lato-Regular.ttf b/_static/fonts/Lato-Regular.ttf new file mode 100644 index 00000000..0f3d0f83 Binary files /dev/null and b/_static/fonts/Lato-Regular.ttf differ diff --git a/_static/fonts/Lato/lato-bold.eot b/_static/fonts/Lato/lato-bold.eot new file mode 100644 index 00000000..3361183a Binary files /dev/null and b/_static/fonts/Lato/lato-bold.eot differ diff --git a/_static/fonts/Lato/lato-bold.ttf b/_static/fonts/Lato/lato-bold.ttf new file mode 100644 index 00000000..29f691d5 Binary files /dev/null and b/_static/fonts/Lato/lato-bold.ttf differ diff --git a/_static/fonts/Lato/lato-bold.woff b/_static/fonts/Lato/lato-bold.woff new file mode 100644 index 00000000..c6dff51f Binary files /dev/null and b/_static/fonts/Lato/lato-bold.woff differ diff --git a/_static/fonts/Lato/lato-bold.woff2 b/_static/fonts/Lato/lato-bold.woff2 new file mode 100644 index 00000000..bb195043 Binary files /dev/null and b/_static/fonts/Lato/lato-bold.woff2 differ diff --git a/_static/fonts/Lato/lato-bolditalic.eot b/_static/fonts/Lato/lato-bolditalic.eot new file mode 100644 index 00000000..3d415493 Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.eot differ diff --git a/_static/fonts/Lato/lato-bolditalic.ttf b/_static/fonts/Lato/lato-bolditalic.ttf new file mode 100644 index 00000000..f402040b Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.ttf differ diff --git a/_static/fonts/Lato/lato-bolditalic.woff b/_static/fonts/Lato/lato-bolditalic.woff new file mode 100644 index 00000000..88ad05b9 Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.woff differ diff --git a/_static/fonts/Lato/lato-bolditalic.woff2 b/_static/fonts/Lato/lato-bolditalic.woff2 new file mode 100644 index 00000000..c4e3d804 Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.woff2 differ diff --git a/_static/fonts/Lato/lato-italic.eot b/_static/fonts/Lato/lato-italic.eot new file mode 100644 index 00000000..3f826421 Binary files /dev/null and b/_static/fonts/Lato/lato-italic.eot differ diff --git a/_static/fonts/Lato/lato-italic.ttf b/_static/fonts/Lato/lato-italic.ttf new file mode 100644 index 00000000..b4bfc9b2 Binary files /dev/null and b/_static/fonts/Lato/lato-italic.ttf differ diff --git a/_static/fonts/Lato/lato-italic.woff b/_static/fonts/Lato/lato-italic.woff new file mode 100644 index 00000000..76114bc0 Binary files /dev/null and b/_static/fonts/Lato/lato-italic.woff differ diff --git a/_static/fonts/Lato/lato-italic.woff2 b/_static/fonts/Lato/lato-italic.woff2 new file mode 100644 index 00000000..3404f37e Binary files /dev/null and b/_static/fonts/Lato/lato-italic.woff2 differ diff --git a/_static/fonts/Lato/lato-regular.eot b/_static/fonts/Lato/lato-regular.eot new file mode 100644 index 00000000..11e3f2a5 Binary files /dev/null and b/_static/fonts/Lato/lato-regular.eot differ diff --git a/_static/fonts/Lato/lato-regular.ttf b/_static/fonts/Lato/lato-regular.ttf new file mode 100644 index 00000000..74decd9e Binary files /dev/null and b/_static/fonts/Lato/lato-regular.ttf differ diff --git a/_static/fonts/Lato/lato-regular.woff b/_static/fonts/Lato/lato-regular.woff new file mode 100644 index 00000000..ae1307ff Binary files /dev/null and b/_static/fonts/Lato/lato-regular.woff differ diff --git a/_static/fonts/Lato/lato-regular.woff2 b/_static/fonts/Lato/lato-regular.woff2 new file mode 100644 index 00000000..3bf98433 Binary files /dev/null and b/_static/fonts/Lato/lato-regular.woff2 differ diff --git a/_static/fonts/RobotoSlab-Bold.ttf b/_static/fonts/RobotoSlab-Bold.ttf new file mode 100644 index 00000000..df5d1df2 Binary files /dev/null and b/_static/fonts/RobotoSlab-Bold.ttf differ diff --git a/_static/fonts/RobotoSlab-Regular.ttf b/_static/fonts/RobotoSlab-Regular.ttf new file mode 100644 index 00000000..eb52a790 Binary files /dev/null and b/_static/fonts/RobotoSlab-Regular.ttf differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot new file mode 100644 index 00000000..79dc8efe Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf new file mode 100644 index 00000000..df5d1df2 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff new file mode 100644 index 00000000..6cb60000 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 new file mode 100644 index 00000000..7059e231 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot new file mode 100644 index 00000000..2f7ca78a Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf new file mode 100644 index 00000000..eb52a790 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff new file mode 100644 index 00000000..f815f63f Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 new file mode 100644 index 00000000..f2c76e5b Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 differ diff --git a/_static/fonts/fontawesome-webfont.eot b/_static/fonts/fontawesome-webfont.eot new file mode 100644 index 00000000..e9f60ca9 Binary files /dev/null and b/_static/fonts/fontawesome-webfont.eot differ diff --git a/_static/fonts/fontawesome-webfont.svg b/_static/fonts/fontawesome-webfont.svg new file mode 100644 index 00000000..855c845e --- /dev/null +++ b/_static/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_static/fonts/fontawesome-webfont.ttf b/_static/fonts/fontawesome-webfont.ttf new file mode 100644 index 00000000..35acda2f Binary files /dev/null and b/_static/fonts/fontawesome-webfont.ttf differ diff --git a/_static/fonts/fontawesome-webfont.woff b/_static/fonts/fontawesome-webfont.woff new file mode 100644 index 00000000..400014a4 Binary files /dev/null and b/_static/fonts/fontawesome-webfont.woff differ diff --git a/_static/fonts/fontawesome-webfont.woff2 b/_static/fonts/fontawesome-webfont.woff2 new file mode 100644 index 00000000..4d13fc60 Binary files /dev/null and b/_static/fonts/fontawesome-webfont.woff2 differ diff --git a/_static/jquery-3.2.1.js b/_static/jquery-3.2.1.js new file mode 100644 index 00000000..d2d8ca47 --- /dev/null +++ b/_static/jquery-3.2.1.js @@ -0,0 +1,10253 @@ +/*! + * jQuery JavaScript Library v3.2.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2017-03-20T18:59Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var document = window.document; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var concat = arr.concat; + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + + + + function DOMEval( code, doc ) { + doc = doc || document; + + var script = doc.createElement( "script" ); + + script.text = code; + doc.head.appendChild( script ).parentNode.removeChild( script ); + } +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.2.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android <=4.0 only + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + + if ( copyIsArray ) { + copyIsArray = false; + clone = src && Array.isArray( src ) ? src : []; + + } else { + clone = src && jQuery.isPlainObject( src ) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isFunction: function( obj ) { + return jQuery.type( obj ) === "function"; + }, + + isWindow: function( obj ) { + return obj != null && obj === obj.window; + }, + + isNumeric: function( obj ) { + + // As of jQuery 3.0, isNumeric is limited to + // strings and numbers (primitives or objects) + // that can be coerced to finite numbers (gh-2662) + var type = jQuery.type( obj ); + return ( type === "number" || type === "string" ) && + + // parseFloat NaNs numeric-cast false positives ("") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + !isNaN( obj - parseFloat( obj ) ); + }, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + + /* eslint-disable no-unused-vars */ + // See https://github.com/eslint/eslint/issues/6125 + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + globalEval: function( code ) { + DOMEval( code ); + }, + + // Convert dashed to camelCase; used by the css and data modules + // Support: IE <=9 - 11, Edge 12 - 13 + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // Support: Android <=4.0 only + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: Date.now, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.3 + * https://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2016-08-08 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + disabledAncestor = addCombinator( + function( elem ) { + return elem.disabled === true && ("form" in elem || "label" in elem); + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + + // ID selector + if ( (m = match[1]) ) { + + // Document context + if ( nodeType === 9 ) { + if ( (elem = context.getElementById( m )) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && (elem = newContext.getElementById( m )) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( (m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !compilerCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + + if ( nodeType !== 1 ) { + newContext = context; + newSelector = selector; + + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if ( context.nodeName.toLowerCase() !== "object" ) { + + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", (nid = expando) ); + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[i] = "#" + nid + " " + toSelector( groups[i] ); + } + newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement("fieldset"); + + try { + return !!fn( el ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + disabledAncestor( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9-11, Edge + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + if ( preferredDoc !== document && + (subWindow = document.defaultView) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function( el ) { + el.className = "i"; + return !el.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( el ) { + el.appendChild( document.createComment("") ); + return !el.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + }); + + // ID filter and find + if ( support.getById ) { + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode("id"); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( (elem = elems[i++]) ) { + node = elem.getAttributeNode("id"); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( el ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll("[msallowcapture^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement("input"); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll(":enabled").length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll(":disabled").length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( el ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === document ? -1 : + b === document ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + !compilerCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch (e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return (sel + "").replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + // Use previously-cached element index if available + if ( useCache ) { + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( (oldCache = uniqueCache[ key ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context === document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + if ( !context && elem.ownerDocument !== document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context || document, xml) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( el ) { + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( el ) { + return el.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +}; +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Simple selector that can be filtered directly, removing non-Elements + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + // Complex selector, compare the two sets, removing non-Elements + qualifier = jQuery.filter( qualifier, elements ); + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; + } ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( nodeName( elem, "iframe" ) ) { + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( jQuery.isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && jQuery.isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( jQuery.isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + jQuery.isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + jQuery.isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + jQuery.isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the master Deferred + master = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + master.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( master.state() === "pending" || + jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return master.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); + } + + return master.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ jQuery.camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ jQuery.camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( jQuery.camelCase ); + } else { + key = jQuery.camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + jQuery.contains( elem.ownerDocument, elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + +var swap = function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, + scale = 1, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + do { + + // If previous iteration zeroed out, double until we get *something*. + // Use string for doubling so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + initialInUnit = initialInUnit / scale; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // Break the loop if scale is unchanged or perfect, or if we've just had enough. + } while ( + scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations + ); + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); + +var rscriptType = ( /^$|\/(?:java|ecma)script/i ); + + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // Support: IE <=9 only + option: [ 1, "" ], + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +// Support: IE <=9 only +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, contains, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +} )(); +var documentElement = document.documentElement; + + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 only +// See #13393 for more info +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = {}; + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + // Make a writable jQuery.Event from the native event object + var event = jQuery.event.fix( nativeEvent ); + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: jQuery.isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + + which: function( event ) { + var button = event.button; + + // Add which for key events + if ( event.which == null && rkeyEvent.test( event.type ) ) { + return event.charCode != null ? event.charCode : event.keyCode; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { + if ( button & 1 ) { + return 1; + } + + if ( button & 2 ) { + return 3; + } + + if ( button & 4 ) { + return 2; + } + + return 0; + } + + return event.which; + } +}, jQuery.event.addProp ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + /* eslint-disable max-len */ + + // See https://github.com/eslint/eslint/issues/3229 + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, + + /* eslint-enable */ + + // Support: IE <=10 - 11, Edge 12 - 13 + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( ">tbody", elem )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.access( src ); + pdataCur = dataPriv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rmargin = ( /^margin/ ); + +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + div.style.cssText = + "box-sizing:border-box;" + + "position:relative;display:block;" + + "margin:auto;border:1px;padding:1px;" + + "top:1%;width:50%"; + div.innerHTML = ""; + documentElement.appendChild( container ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = divStyle.marginLeft === "2px"; + boxSizingReliableVal = divStyle.width === "4px"; + + // Support: Android 4.0 - 4.3 only + // Some styles come back with percentage values, even though they shouldn't + div.style.marginRight = "50%"; + pixelMarginRightVal = divStyle.marginRight === "4px"; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + + "padding:0;margin-top:1px;position:absolute"; + container.appendChild( div ); + + jQuery.extend( support, { + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelMarginRight: function() { + computeStyleTests(); + return pixelMarginRightVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }, + + cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style; + +// Return a css property mapped to a potentially vendor prefixed property +function vendorPropName( name ) { + + // Shortcut for names that are not vendor prefixed + if ( name in emptyStyle ) { + return name; + } + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a property mapped along what jQuery.cssProps suggests or to +// a vendor prefixed property. +function finalPropName( name ) { + var ret = jQuery.cssProps[ name ]; + if ( !ret ) { + ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; + } + return ret; +} + +function setPositiveNumber( elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i, + val = 0; + + // If we already have the right measurement, avoid augmentation + if ( extra === ( isBorderBox ? "border" : "content" ) ) { + i = 4; + + // Otherwise initialize for horizontal or vertical properties + } else { + i = name === "width" ? 1 : 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // At this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + + // At this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // At this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with computed style + var valueIsBorderBox, + styles = getStyles( elem ), + val = curCSS( elem, name, styles ), + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test( val ) ) { + return val; + } + + // Check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && + ( support.boxSizingReliable() || val === elem.style[ name ] ); + + // Fall back to offsetWidth/Height when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + if ( val === "auto" ) { + val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ]; + } + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + + // Use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + "float": "cssFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + if ( type === "number" ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = jQuery.camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + } ) : + getWidthOrHeight( elem, name, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = extra && getStyles( elem ), + subtract = extra && augmentWidthOrHeight( + elem, + name, + extra, + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + styles + ); + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ name ] = value; + value = jQuery.css( elem, name ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && + ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || + jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = jQuery.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 13 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( jQuery.isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + jQuery.proxy( result.stop, result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( jQuery.isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( typeof value === "string" && value ) { + classes = value.match( rnothtmlwhite ) || []; + + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( jQuery.isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + if ( typeof value === "string" && value ) { + classes = value.match( rnothtmlwhite ) || []; + + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( type === "string" ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = value.match( rnothtmlwhite ) || []; + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, isFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup contextmenu" ).split( " " ), + function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +} ); + +jQuery.fn.extend( { + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +} ); + + + + +support.focusin = "onfocusin" in window; + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = jQuery.now(); + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = jQuery.isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ) + .filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ) + .map( function( i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( jQuery.isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match == null ? null : match; + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 13 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available, append data to url + if ( s.data ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + + +jQuery._evalUrl = function( url ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + "throws": true + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( jQuery.isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " + + + + + + + + + + + + +
+ + +
+ + +
+
+ + + + \ No newline at end of file diff --git a/commands/angle.html b/commands/angle.html new file mode 100644 index 00000000..1a3a9064 --- /dev/null +++ b/commands/angle.html @@ -0,0 +1,242 @@ + + + + + + + angle — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

angle

+

Name:

+

geom angle

+

Description:

+

geom Calculate the angle between two Points

+

Arguments:

+
+
    +
  • -t –type: The type can be degrees (default) or radians

  • +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom angle -g "POINT (1 1)" -o "POINT (10 10)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/arc.html b/commands/arc.html new file mode 100644 index 00000000..0d3f2894 --- /dev/null +++ b/commands/arc.html @@ -0,0 +1,249 @@ + + + + + + + arc — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

arc

+

Name:

+

geom arc

+

Description:

+

geom Creates an arc linestring from a start angle and an angle extent.

+

Arguments:

+
+
    +
  • -a –startAngle: The start angle (in radians)

  • +
  • -e –angleExtent: The size of angle (in radians)

  • +
  • -d -degrees: The flag for whether given angle measures are in degrees (true) or radians (false)

  • +
  • -w –width: The width

  • +
  • -h –height: The height

  • +
  • -p –numberOfPoints: The number of points

  • +
  • -r –rotation: The rotation

  • +
  • -c –center: The flag to use center (true) or the base (false)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom arc -g "POINT (100 100)" -d -a 45 -e 90 -w 50 -h 50 -p 10
+
+
+../_images/arc.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/arcpoly.html b/commands/arcpoly.html new file mode 100644 index 00000000..5966d51a --- /dev/null +++ b/commands/arcpoly.html @@ -0,0 +1,249 @@ + + + + + + + arcpoly — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

arcpoly

+

Name:

+

geom arcpoly

+

Description:

+

geom Creates an arc polygon from a start angle and an angle extent.

+

Arguments:

+
+
    +
  • -a –startAngle: The start angle (in radians)

  • +
  • -e –angleExtent: The size of angle (in radians)

  • +
  • -d –degrees: The flag for whether given angle measures are in degrees (true) or radians (false)

  • +
  • -w –width: The width

  • +
  • -h –height: The height

  • +
  • -p –numberOfPoints: The number of points

  • +
  • -r –rotation: The rotation

  • +
  • -c –center: The flag to use center (true) or the base (false)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom arcpoly -g "POINT (100 100)" -a 45 -e 90 -d -p 20 -w 500 -h 500
+
+
+../_images/arcpoly.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/area.html b/commands/area.html new file mode 100644 index 00000000..4ad1e9ed --- /dev/null +++ b/commands/area.html @@ -0,0 +1,241 @@ + + + + + + + area — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

area

+

Name:

+

geom area

+

Description:

+

geom Calculate the area of a Geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom area -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))"
+
+
+../_images/area.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/asciiart.html b/commands/asciiart.html new file mode 100644 index 00000000..794445ef --- /dev/null +++ b/commands/asciiart.html @@ -0,0 +1,240 @@ + + + + + + + asciiart — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

asciiart

+

Name:

+

geom asciiart

+

Description:

+

geom Get the Geometry as WKT ASCII Art

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom asciiart -g "POINT (10 10)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/boundary.html b/commands/boundary.html new file mode 100644 index 00000000..8d61e181 --- /dev/null +++ b/commands/boundary.html @@ -0,0 +1,241 @@ + + + + + + + boundary — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

boundary

+

Name:

+

geom boundary

+

Description:

+

geom Calculate the boundary of a Geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom boundary -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))"
+
+
+../_images/boundary.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/buffer.html b/commands/buffer.html new file mode 100644 index 00000000..28aec487 --- /dev/null +++ b/commands/buffer.html @@ -0,0 +1,248 @@ + + + + + + + buffer — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

buffer

+

Name:

+

geom buffer

+

Description:

+

geom Buffer a geometry by a distance.

+

Arguments:

+
+
    +
  • -d –distance: The buffer distance

  • +
  • -q –quadrantSegments: The number of quadrant segments

  • +
  • -c –endCapStyle: The end cap style (round, flat/butt, square)

  • +
  • -s –singleSided: The flag for whether the buffer should be single sided

  • +
  • -f –simplifyFactor: The simplify factor

  • +
  • -m –mitreLimit: The mitre limit

  • +
  • -j –joinStyle: The join style (round, mitre, bevel)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom buffer -g "POINT (1 1)" -d 10
+
+
+../_images/buffer.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/centroid.html b/commands/centroid.html new file mode 100644 index 00000000..f92b781e --- /dev/null +++ b/commands/centroid.html @@ -0,0 +1,241 @@ + + + + + + + centroid — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

centroid

+

Name:

+

geom centroid

+

Description:

+

geom Calculate the centroid of a Geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom centroid -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))"
+
+
+../_images/centroid.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/closelinestring.html b/commands/closelinestring.html new file mode 100644 index 00000000..feb9e282 --- /dev/null +++ b/commands/closelinestring.html @@ -0,0 +1,240 @@ + + + + + + + closelinestring — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

closelinestring

+

Name:

+

geom closelinestring

+

Description:

+

geom Close an open LineString.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom closelinestring -g "LINESTRING (0 0, 4 0, 4 4, 0 4)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/combine.html b/commands/combine.html new file mode 100644 index 00000000..63f6e301 --- /dev/null +++ b/commands/combine.html @@ -0,0 +1,240 @@ + + + + + + + combine — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

combine

+

Name:

+

geom combine

+

Description:

+

geom Combine geometries on separate lines to create a GeometryCollection.

+

Arguments:

+
+
    +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
echo -e "POINT(1 1)
+
+
+

POINT(2 2)” | geom combine

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/concaveHull.html b/commands/concaveHull.html new file mode 100644 index 00000000..2f41f77a --- /dev/null +++ b/commands/concaveHull.html @@ -0,0 +1,242 @@ + + + + + + + concaveHull — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

concaveHull

+

Name:

+

geom concaveHull

+

Description:

+

geom Calculate the concave hull of a Geometry.

+

Arguments:

+
+
    +
  • -m –max-edge-length: The maximum edge length

  • +
  • -a –holes-allowed: Whether holes are allowed or not

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom concavehull -g "MULTIPOINT ((-122.38657951354979 47.58451555263637),(-122.38649368286131 47.5772205307505),(-122.39078521728516 47.58167872046887),(-122.38177299499512 47.5823155737249),(-122.3876953125 47.5828366297174),(-122.38494873046875 47.58301031389572),(-122.3876953125 47.58121554959838),(-122.38486289978027 47.5812734461813))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/concaveHullOfPolygons.html b/commands/concaveHullOfPolygons.html new file mode 100644 index 00000000..04b4f895 --- /dev/null +++ b/commands/concaveHullOfPolygons.html @@ -0,0 +1,243 @@ + + + + + + + concaveHullOfPolygons — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

concaveHullOfPolygons

+

Name:

+

geom concaveHullOfPolygons

+

Description:

+

geom Calculate the concave hull of Polygons.

+

Arguments:

+
+
    +
  • -l –max-edge-length: The maximum edge length

  • +
  • -a –holes-allowed: Whether holes are allowed or not

  • +
  • -t –tight: Whether it should be tight or now

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom concaveHullOfPolygons -l 0.5 -g "MULTIPOLYGON (((-122.38889694213867 47.57595031143529, -122.3895299434662 47.57526633442543, -122.38845705986023 47.57515414686724, -122.38857507705688 47.57558480102301, -122.38889694213867 47.57595031143529)),((-122.38868772983551 47.57478501191467, -122.38879501819609 47.574224066564, -122.38778114318846 47.5742566377487, -122.38817274570465 47.574600443462614, -122.38868772983551 47.57478501191467)),((-122.3868852853775 47.57554137387374, -122.38756120204926 47.57528442917038, -122.38598942756653 47.575132433118526, -122.38690674304961 47.57534957020037, -122.3868852853775 47.57554137387374)))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/contains.html b/commands/contains.html new file mode 100644 index 00000000..6bc7f38b --- /dev/null +++ b/commands/contains.html @@ -0,0 +1,241 @@ + + + + + + + contains — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

contains

+

Name:

+

geom contains

+

Description:

+

geom Calculate whether the first geometry contains the other geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom contains -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" -o "POINT (2 2)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/convexHull.html b/commands/convexHull.html new file mode 100644 index 00000000..9e2e3e6f --- /dev/null +++ b/commands/convexHull.html @@ -0,0 +1,240 @@ + + + + + + + convexHull — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

convexHull

+

Name:

+

geom convexHull

+

Description:

+

geom Calculate the convex hull of a Geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom convexhull -g "POLYGON ((9 52, 9 50, 7 50, 7 48, 10 47, 10 46, 13 46, 11 52, 10 52, 9 52))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/coordinates.html b/commands/coordinates.html new file mode 100644 index 00000000..8e81a861 --- /dev/null +++ b/commands/coordinates.html @@ -0,0 +1,242 @@ + + + + + + + coordinates — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

coordinates

+

Name:

+

geom coordinates

+

Description:

+

geom Get the coordinates of the geometry.

+

Arguments:

+
+
    +
  • -u –unique: The flag to only include unique coordinates

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom coordinates -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))"
+
+
+../_images/coordinates.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/count.html b/commands/count.html new file mode 100644 index 00000000..2033c28c --- /dev/null +++ b/commands/count.html @@ -0,0 +1,240 @@ + + + + + + + count — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

count

+

Name:

+

geom count

+

Description:

+

geom Count the number of geometries in the input geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom count -g "MULTIPOINT (1 1, 2 2, 3 3)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/countpoints.html b/commands/countpoints.html new file mode 100644 index 00000000..ecd95ef5 --- /dev/null +++ b/commands/countpoints.html @@ -0,0 +1,240 @@ + + + + + + + countpoints — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

countpoints

+

Name:

+

geom countpoints

+

Description:

+

geom Count the number of Points in the input Geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom countpoints -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/coveredby.html b/commands/coveredby.html new file mode 100644 index 00000000..2d4de45f --- /dev/null +++ b/commands/coveredby.html @@ -0,0 +1,241 @@ + + + + + + + coveredby — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

coveredby

+

Name:

+

geom coveredby

+

Description:

+

geom Determine whether the first geometry is covered by the other geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom coveredby -g "POINT (2 2)" -o "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/covers.html b/commands/covers.html new file mode 100644 index 00000000..4d33b5c9 --- /dev/null +++ b/commands/covers.html @@ -0,0 +1,241 @@ + + + + + + + covers — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

covers

+

Name:

+

geom covers

+

Description:

+

geom Determine whether the first geometry covers the other geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom covers -g "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))" -o "POINT (2 2)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/crosses.html b/commands/crosses.html new file mode 100644 index 00000000..4f94c6ca --- /dev/null +++ b/commands/crosses.html @@ -0,0 +1,241 @@ + + + + + + + crosses — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

crosses

+

Name:

+

geom crosses

+

Description:

+

geom Determine whether the first geometry crosses the other geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom crosses -g "LINESTRING (1 1, 10 10)" -o "LINESTRING (1 10, 10 1)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/delaunay.html b/commands/delaunay.html new file mode 100644 index 00000000..2058294e --- /dev/null +++ b/commands/delaunay.html @@ -0,0 +1,242 @@ + + + + + + + delaunay — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

delaunay

+

Name:

+

geom delaunay

+

Description:

+

geom Generate a delaunay triangulation of the input geometry.

+

Arguments:

+
+
    +
  • -c –conforming: The flag for whether to use conforming algorithm

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom buffer -g "POINT (1 1)" -d 100 | geom random -n 100 | geom delaunay
+
+
+../_images/delaunay.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/densify.html b/commands/densify.html new file mode 100644 index 00000000..4c53ab51 --- /dev/null +++ b/commands/densify.html @@ -0,0 +1,241 @@ + + + + + + + densify — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

densify

+

Name:

+

geom densify

+

Description:

+

geom Densify the coordinates of the input geometry.

+

Arguments:

+
+
    +
  • -d –distance: The distance tolerance

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom densify -g "LINESTRING (1 1, 100 100)" -d 20
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/difference.html b/commands/difference.html new file mode 100644 index 00000000..c9541eab --- /dev/null +++ b/commands/difference.html @@ -0,0 +1,241 @@ + + + + + + + difference — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

difference

+

Name:

+

geom difference

+

Description:

+

geom Calculate the difference between the input geometries.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom difference -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/dimension.html b/commands/dimension.html new file mode 100644 index 00000000..8d2ef354 --- /dev/null +++ b/commands/dimension.html @@ -0,0 +1,240 @@ + + + + + + + dimension — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

dimension

+

Name:

+

geom dimension

+

Description:

+

geom Get the dimension of the Geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom dimension -g "POINT (1 1)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/disjoint.html b/commands/disjoint.html new file mode 100644 index 00000000..e01640da --- /dev/null +++ b/commands/disjoint.html @@ -0,0 +1,241 @@ + + + + + + + disjoint — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

disjoint

+

Name:

+

geom disjoint

+

Description:

+

geom Determine whether the first geometry is disjoint from the other geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom disjoint -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "LINESTRING (15 15, 20 20)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/distance.html b/commands/distance.html new file mode 100644 index 00000000..beb785e5 --- /dev/null +++ b/commands/distance.html @@ -0,0 +1,241 @@ + + + + + + + distance — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

distance

+

Name:

+

geom distance

+

Description:

+

geom Calculate the distance between the two input geometries.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom distance -g "POINT (5 5)" -o "POINT (20 21)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/distanceline.html b/commands/distanceline.html new file mode 100644 index 00000000..4aa192b6 --- /dev/null +++ b/commands/distanceline.html @@ -0,0 +1,241 @@ + + + + + + + distanceline — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

distanceline

+

Name:

+

geom distanceline

+

Description:

+

geom Generate a LineString representing the shortest distance between two geometries.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom distanceline -g "POINT (5 5)" -o "POINT (20 21)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/draw.html b/commands/draw.html new file mode 100644 index 00000000..a96e6d21 --- /dev/null +++ b/commands/draw.html @@ -0,0 +1,254 @@ + + + + + + + draw — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

draw

+

Name:

+

geom draw

+

Description:

+

geom Draw the input geometry to an image file.

+

Arguments:

+
+
    +
  • -f –file: The output File

  • +
  • -w –width: The image width

  • +
  • -h –height: The image height

  • +
  • -b –background: The background color

  • +
  • -i –backgroundImage: The background image url or file

  • +
  • -s –stroke: The stroke Color

  • +
  • -t –strokeOpacity: The stroke opacity

  • +
  • -r –strokeWidth: The stroke width

  • +
  • -l –fill: The fill Color

  • +
  • -o –fillOpacity: The fill opacity

  • +
  • -m –shape: The marker shape (circle, square, ect..)

  • +
  • -z –size: The marker size

  • +
  • -c –drawCoords: The flag for drawing coordinates or not

  • +
  • -e –envelope: The geographical bounds (minx, miny, maxx, maxy)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom draw -g "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/drawbase64.html b/commands/drawbase64.html new file mode 100644 index 00000000..3a050ae9 --- /dev/null +++ b/commands/drawbase64.html @@ -0,0 +1,255 @@ + + + + + + + drawbase64 — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

drawbase64

+

Name:

+

geom drawbase64

+

Description:

+

geom Draw the input geometry to a base 64 encoded string.

+

Arguments:

+
+
    +
  • -y –type: The image type (png or jpeg)

  • +
  • -p –prefix: The flag to include the prefix (data:image/png;base64,) or not

  • +
  • -w –width: The image width

  • +
  • -h –height: The image height

  • +
  • -b –background: The background color

  • +
  • -i –backgroundImage: The background image url or file

  • +
  • -s –stroke: The stroke Color

  • +
  • -t –strokeOpacity: The stroke opacity

  • +
  • -r –strokeWidth: The stroke width

  • +
  • -l –fill: The fill Color

  • +
  • -o –fillOpacity: The fill opacity

  • +
  • -m –shape: The marker shape (circle, square, ect..)

  • +
  • -z –size: The marker size

  • +
  • -c –drawCoords: The flag for drawing coordinates or not

  • +
  • -e –envelope: The geographical bounds (minx, miny, maxx, maxy)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom drawbase64 -g "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/dump.html b/commands/dump.html new file mode 100644 index 00000000..02bc1207 --- /dev/null +++ b/commands/dump.html @@ -0,0 +1,240 @@ + + + + + + + dump — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

dump

+

Name:

+

geom dump

+

Description:

+

geom Put each geometry from a GeometryCollection on it’s own line.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom dump -g "MULTIPOINT (1 1, 2 2)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/ellipse.html b/commands/ellipse.html new file mode 100644 index 00000000..2daba685 --- /dev/null +++ b/commands/ellipse.html @@ -0,0 +1,246 @@ + + + + + + + ellipse — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

ellipse

+

Name:

+

geom ellipse

+

Description:

+

geom Create an ellipse of circle around the input geometry.

+

Arguments:

+
+
    +
  • -w –width: The width

  • +
  • -h –height: The height

  • +
  • -p –numberOfPoints: The number of points

  • +
  • -r –rotation: The rotation

  • +
  • -c –center: The flag to use center (true) or the base (false)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom ellipse -g "POINT (100 100)" -p 30 -w 500 -h 500
+
+
+../_images/ellipse.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/endpoint.html b/commands/endpoint.html new file mode 100644 index 00000000..a12d88d9 --- /dev/null +++ b/commands/endpoint.html @@ -0,0 +1,240 @@ + + + + + + + endpoint — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

endpoint

+

Name:

+

geom endpoint

+

Description:

+

geom Get the end point of a LineString or a MultiLineString.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom endpoint -g "LINESTRING (1 1, 5 5, 10 10)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/envelope.html b/commands/envelope.html new file mode 100644 index 00000000..c2c80a02 --- /dev/null +++ b/commands/envelope.html @@ -0,0 +1,241 @@ + + + + + + + envelope — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

envelope

+

Name:

+

geom envelope

+

Description:

+

geom Calculate the envelope of a Geometry.

+

Arguments:

+
+
    +
  • -e –expandBy: The distance to expand the Envelope

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom envelope -g "POLYGON ((9 52, 9 50, 7 50, 7 48, 10 47, 10 46, 13 46, 11 52, 10 52, 9 52))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/equals.html b/commands/equals.html new file mode 100644 index 00000000..d3e6366d --- /dev/null +++ b/commands/equals.html @@ -0,0 +1,243 @@ + + + + + + + equals — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

equals

+

Name:

+

geom equals

+

Description:

+

geom Determine whether the first geometry equals the second geometry.

+

Arguments:

+
+
    +
  • -t –type: The type of equals (exact, norm, topo)

  • +
  • -l –tolerance: The tolerance when type is exact

  • +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom equals -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/fix.html b/commands/fix.html new file mode 100644 index 00000000..a5889b92 --- /dev/null +++ b/commands/fix.html @@ -0,0 +1,240 @@ + + + + + + + fix — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

fix

+

Name:

+

geom fix

+

Description:

+

geom Fix an invalid Geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom fix -g "LINESTRING (0 0, 0 0, 0 0, 0 0, 1 1)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/fromwkb.html b/commands/fromwkb.html new file mode 100644 index 00000000..42333ba1 --- /dev/null +++ b/commands/fromwkb.html @@ -0,0 +1,240 @@ + + + + + + + fromwkb — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

fromwkb

+

Name:

+

geom fromwkb

+

Description:

+

geom Convert a WKB to a WKT Geometry.

+

Arguments:

+
+
    +
  • -b –wkb: The WKB text

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom fromwkb -b 00000000013FF00000000000004000000000000000
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/get.html b/commands/get.html new file mode 100644 index 00000000..47fbe353 --- /dev/null +++ b/commands/get.html @@ -0,0 +1,241 @@ + + + + + + + get — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

get

+

Name:

+

geom get

+

Description:

+

geom Get a sub geometry from a geometry collection by index.

+

Arguments:

+
+
    +
  • -n –index: The index number of the Geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom get -g "MULTIPOINT (1 1, 5 5, 10 10)" -n 1
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/grid.html b/commands/grid.html new file mode 100644 index 00000000..55b19718 --- /dev/null +++ b/commands/grid.html @@ -0,0 +1,243 @@ + + + + + + + grid — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

grid

+

Name:

+

geom grid

+

Description:

+

geom Calculate a grid around the input geometry.

+

Arguments:

+
+
    +
  • -c –columns: The number of columns

  • +
  • -r –rows: The number of rows

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom grid -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -c 10 -r 10
+
+
+../_images/grid.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/hausdorffdistance.html b/commands/hausdorffdistance.html new file mode 100644 index 00000000..2405e562 --- /dev/null +++ b/commands/hausdorffdistance.html @@ -0,0 +1,241 @@ + + + + + + + hausdorffdistance — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

hausdorffdistance

+

Name:

+

geom hausdorffdistance

+

Description:

+

geom Calculate the discrete hausdorff distance between the two input geometries.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom hausdorffdistance -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/help.html b/commands/help.html new file mode 100644 index 00000000..975ddd23 --- /dev/null +++ b/commands/help.html @@ -0,0 +1,239 @@ + + + + + + + help — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

help

+

Name:

+

geom help

+

Description:

+

geom Get help

+

Arguments:

+
+
    +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom help
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/hilbertcurve.html b/commands/hilbertcurve.html new file mode 100644 index 00000000..9aaf6f1d --- /dev/null +++ b/commands/hilbertcurve.html @@ -0,0 +1,242 @@ + + + + + + + hilbertcurve — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

hilbertcurve

+

Name:

+

geom hilbertcurve

+

Description:

+

geom Create a hilbert curve.

+

Arguments:

+
+
    +
  • -n –number: The number of points.

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom hilbertcurve -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 18
+
+
+../_images/hilbertcurve.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/interiorpoint.html b/commands/interiorpoint.html new file mode 100644 index 00000000..1e551499 --- /dev/null +++ b/commands/interiorpoint.html @@ -0,0 +1,240 @@ + + + + + + + interiorpoint — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

interiorpoint

+

Name:

+

geom interiorpoint

+

Description:

+

geom Calculate the interior point of the input geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom interiorpoint -g "POLYGON ((8 54, 8 51, 14 51, 14 47, 7 47, 7 42, 17 45, 16 53, 13 53, 8 54))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/interpolatepoint.html b/commands/interpolatepoint.html new file mode 100644 index 00000000..e96210a2 --- /dev/null +++ b/commands/interpolatepoint.html @@ -0,0 +1,241 @@ + + + + + + + interpolatepoint — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

interpolatepoint

+

Name:

+

geom interpolatepoint

+

Description:

+

geom Interpolate the location of a point on the input linear geometry given a percentage position.

+

Arguments:

+
+
    +
  • -p –position: The position between 0 and 1

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom interpolatepoint -g "LINESTRING (0 0, 5 5, 10 10)" -p 0.25
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/intersection.html b/commands/intersection.html new file mode 100644 index 00000000..1699cb34 --- /dev/null +++ b/commands/intersection.html @@ -0,0 +1,241 @@ + + + + + + + intersection — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

intersection

+

Name:

+

geom intersection

+

Description:

+

geom Calculate the intersection between two geometries.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom intersection -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/intersects.html b/commands/intersects.html new file mode 100644 index 00000000..4492b4c7 --- /dev/null +++ b/commands/intersects.html @@ -0,0 +1,241 @@ + + + + + + + intersects — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

intersects

+

Name:

+

geom intersects

+

Description:

+

geom Determine if the first geometry intersects the second geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom intersects -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/isccw.html b/commands/isccw.html new file mode 100644 index 00000000..1aac485d --- /dev/null +++ b/commands/isccw.html @@ -0,0 +1,240 @@ + + + + + + + isccw — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

isccw

+

Name:

+

geom isccw

+

Description:

+

geom Is the geometry’s coordinates oriented counter clockwise of not.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom isccw -g "LINEARRING (15 20, 10 20, 10 10, 15 10, 15 20)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/isclosed.html b/commands/isclosed.html new file mode 100644 index 00000000..ec504150 --- /dev/null +++ b/commands/isclosed.html @@ -0,0 +1,240 @@ + + + + + + + isclosed — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

isclosed

+

Name:

+

geom isclosed

+

Description:

+

geom Determine if the input geometry is closed or not.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom isclosed -g "LINESTRING (1 1, 1 5, 5 5, 5 1, 1 1)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/isempty.html b/commands/isempty.html new file mode 100644 index 00000000..4dc2b773 --- /dev/null +++ b/commands/isempty.html @@ -0,0 +1,240 @@ + + + + + + + isempty — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

isempty

+

Name:

+

geom isempty

+

Description:

+

geom Determine if the input geometry is empty or not.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom isempty -g "POINT EMPTY"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/isrectangle.html b/commands/isrectangle.html new file mode 100644 index 00000000..7613fa92 --- /dev/null +++ b/commands/isrectangle.html @@ -0,0 +1,240 @@ + + + + + + + isrectangle — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

isrectangle

+

Name:

+

geom isrectangle

+

Description:

+

geom Determine if the input geometry is rectangular or not.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom isrectangle -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/isring.html b/commands/isring.html new file mode 100644 index 00000000..80a36104 --- /dev/null +++ b/commands/isring.html @@ -0,0 +1,240 @@ + + + + + + + isring — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

isring

+

Name:

+

geom isring

+

Description:

+

geom Determine if the input geometry is a ring or not.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom isring -g "LINESTRING (1 1, 1 5, 5 5, 5 1, 1 1)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/issimple.html b/commands/issimple.html new file mode 100644 index 00000000..029e5451 --- /dev/null +++ b/commands/issimple.html @@ -0,0 +1,240 @@ + + + + + + + issimple — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

issimple

+

Name:

+

geom issimple

+

Description:

+

geom Determine if the input geometry is simple or not.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom issimple -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/isvalid.html b/commands/isvalid.html new file mode 100644 index 00000000..6cc7e2d4 --- /dev/null +++ b/commands/isvalid.html @@ -0,0 +1,241 @@ + + + + + + + isvalid — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

isvalid

+

Name:

+

geom isvalid

+

Description:

+

geom Determine if the input geometry is valid or not.

+

Arguments:

+
+
    +
  • -t –type: The flag to show the validation error message, the error location, or validity (msg, loc, or val)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom isvalid -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/iswithindistance.html b/commands/iswithindistance.html new file mode 100644 index 00000000..70707fad --- /dev/null +++ b/commands/iswithindistance.html @@ -0,0 +1,242 @@ + + + + + + + iswithindistance — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

iswithindistance

+

Name:

+

geom iswithindistance

+

Description:

+

geom Determine if the input geometry is within the given distance of the other geometry.

+

Arguments:

+
+
    +
  • -d –distance: The distance

  • +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom iswithindistance -g "POINT (1 1)" -o "POINT (20 23)" -d 30
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/kochsnowflake.html b/commands/kochsnowflake.html new file mode 100644 index 00000000..edca080a --- /dev/null +++ b/commands/kochsnowflake.html @@ -0,0 +1,242 @@ + + + + + + + kochsnowflake — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

kochsnowflake

+

Name:

+

geom kochsnowflake

+

Description:

+

geom Generate a koch snow flake.

+

Arguments:

+
+
    +
  • -n –number: The number of points.

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom kochsnowflake -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 100
+
+
+../_images/kochsnowflake.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/largestemptycircle.html b/commands/largestemptycircle.html new file mode 100644 index 00000000..c450695d --- /dev/null +++ b/commands/largestemptycircle.html @@ -0,0 +1,241 @@ + + + + + + + largestemptycircle — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

largestemptycircle

+

Name:

+

geom largestemptycircle

+

Description:

+

geom Calculate the largest empty circle.

+

Arguments:

+
+
    +
  • -t –tolerance: The tolerance

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom largestemptycircle -g "MULTIPOINT ((-122.3935317993164 47.57571508225466),(-122.38838195800781 47.57444120741259),(-122.39061355590819 47.5823155737249))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/linedissolve.html b/commands/linedissolve.html new file mode 100644 index 00000000..671099a4 --- /dev/null +++ b/commands/linedissolve.html @@ -0,0 +1,240 @@ + + + + + + + linedissolve — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

linedissolve

+

Name:

+

geom linedissolve

+

Description:

+

geom Dissolve LinesStrings

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom linedissolve -g "LINESTRING (1143429.5177049513 646812.5700195221, 1148620.8088546866 646812.5700195221, 1149092.7444137533 643980.956665121, 1150980.4866500208 640677.4077516531)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/linemerge.html b/commands/linemerge.html new file mode 100644 index 00000000..623bbf6a --- /dev/null +++ b/commands/linemerge.html @@ -0,0 +1,240 @@ + + + + + + + linemerge — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

linemerge

+

Name:

+

geom linemerge

+

Description:

+

geom Merge lines of the input geometry together.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom linemerge -g "MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/list.html b/commands/list.html new file mode 100644 index 00000000..807cb186 --- /dev/null +++ b/commands/list.html @@ -0,0 +1,240 @@ + + + + + + + list — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

list

+

Name:

+

geom list

+

Description:

+

geom List all of the geometry commands.

+

Arguments:

+
+
    +
  • -d –description: Include the description

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom list
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/locatepoint.html b/commands/locatepoint.html new file mode 100644 index 00000000..7aac2a40 --- /dev/null +++ b/commands/locatepoint.html @@ -0,0 +1,241 @@ + + + + + + + locatepoint — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

locatepoint

+

Name:

+

geom locatepoint

+

Description:

+

geom Locate the position of a point on the linear geometry as a percentage of the distance.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom locatepoint -g "LINESTRING (0 0, 5 5, 10 10)" -o "POINT (2.5 2.5)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/maximuminscribedcircle.html b/commands/maximuminscribedcircle.html new file mode 100644 index 00000000..12c8e326 --- /dev/null +++ b/commands/maximuminscribedcircle.html @@ -0,0 +1,241 @@ + + + + + + + maximuminscribedcircle — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

maximuminscribedcircle

+

Name:

+

geom maximuminscribedcircle

+

Description:

+

geom Calculate the maximum inscribed circle.

+

Arguments:

+
+
    +
  • -t –tolerance: The tolerance

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom maximuminscribedcircle -g "POLYGON ((-122.38855361938475 47.5805786829606, -122.38636493682861 47.5783206388176, -122.38700866699219 47.5750491969984, -122.38177299499512 47.57502024527343, -122.38481998443604 47.5780600889959, -122.38151550292969 47.5805786829606, -122.38855361938475 47.5805786829606))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/mincircle.html b/commands/mincircle.html new file mode 100644 index 00000000..aee238a8 --- /dev/null +++ b/commands/mincircle.html @@ -0,0 +1,241 @@ + + + + + + + mincircle — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

mincircle

+

Name:

+

geom mincircle

+

Description:

+

geom Calculate the minimum bounding circle of the input geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom mincircle -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"
+
+
+../_images/mincircle.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/minclearance.html b/commands/minclearance.html new file mode 100644 index 00000000..23091ce1 --- /dev/null +++ b/commands/minclearance.html @@ -0,0 +1,240 @@ + + + + + + + minclearance — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

minclearance

+

Name:

+

geom minclearance

+

Description:

+

geom Calculate the minimum clearance of the input geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom minclearance -g "POLYGON ((16 51, 7 53, 12 46, 5 41, 12 41, 16 51))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/mindiameter.html b/commands/mindiameter.html new file mode 100644 index 00000000..16159db4 --- /dev/null +++ b/commands/mindiameter.html @@ -0,0 +1,240 @@ + + + + + + + mindiameter — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

mindiameter

+

Name:

+

geom mindiameter

+

Description:

+

geom Calculate the minimum diameter of the input geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom mindiameter -g "POLYGON ((16 51, 7 53, 12 46, 5 41, 12 41, 16 51))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/minrect.html b/commands/minrect.html new file mode 100644 index 00000000..230ad4fe --- /dev/null +++ b/commands/minrect.html @@ -0,0 +1,241 @@ + + + + + + + minrect — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

minrect

+

Name:

+

geom minrect

+

Description:

+

geom Calculate the minimum rectangle of the input geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom minrect -g "POLYGON ((16 51, 7 53, 12 46, 5 41, 12 41, 16 51))"
+
+
+../_images/minrect.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/mortoncurve.html b/commands/mortoncurve.html new file mode 100644 index 00000000..e5143175 --- /dev/null +++ b/commands/mortoncurve.html @@ -0,0 +1,242 @@ + + + + + + + mortoncurve — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

mortoncurve

+

Name:

+

geom mortoncurve

+

Description:

+

geom Create a morton curve.

+

Arguments:

+
+
    +
  • -n –number: The number of points.

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom mortoncurve -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 54
+
+
+../_images/mortoncurve.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/narrow.html b/commands/narrow.html new file mode 100644 index 00000000..b61e825c --- /dev/null +++ b/commands/narrow.html @@ -0,0 +1,240 @@ + + + + + + + narrow — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

narrow

+

Name:

+

geom narrow

+

Description:

+

geom Convert a geometry collection to it’s most specific type.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom narrow -g "GEOMETRYCOLLECTION (POINT (1 1), POINT(10 10))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/nearestpoints.html b/commands/nearestpoints.html new file mode 100644 index 00000000..9df7d920 --- /dev/null +++ b/commands/nearestpoints.html @@ -0,0 +1,241 @@ + + + + + + + nearestpoints — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

nearestpoints

+

Name:

+

geom nearestpoints

+

Description:

+

geom Get the nearest points between two geometries

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
null
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/node.html b/commands/node.html new file mode 100644 index 00000000..7c0fdcb0 --- /dev/null +++ b/commands/node.html @@ -0,0 +1,241 @@ + + + + + + + node — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

node

+

Name:

+

geom node

+

Description:

+

geom Node the linestrings from the input geometry.

+

Arguments:

+
+
    +
  • -n –number: The number of decimal places

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom node -g "LINESTRING (5 51, 8 54, 12 50, 8 47, 10 55, 7 52, 5 53, 6 51)" -n 5
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/normalize.html b/commands/normalize.html new file mode 100644 index 00000000..eea3f633 --- /dev/null +++ b/commands/normalize.html @@ -0,0 +1,240 @@ + + + + + + + normalize — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

normalize

+

Name:

+

geom normalize

+

Description:

+

geom Calculate the normalized version of the input geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom normalize -g "MULTIPOINT ((12.5 12.5), (13.5 7.5), (7 9), (9.5 13), (8 7.5))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/octagonalenvelope.html b/commands/octagonalenvelope.html new file mode 100644 index 00000000..c69a99fc --- /dev/null +++ b/commands/octagonalenvelope.html @@ -0,0 +1,240 @@ + + + + + + + octagonalenvelope — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

octagonalenvelope

+

Name:

+

geom octagonalenvelope

+

Description:

+

geom Calculate the octagonal envelope of the input geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom octagonalenvelope -g "MULTIPOINT ((12.5 12.5), (13.5 7.5), (7 9), (9.5 13), (8 7.5))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/offsetCurve.html b/commands/offsetCurve.html new file mode 100644 index 00000000..cf14147a --- /dev/null +++ b/commands/offsetCurve.html @@ -0,0 +1,247 @@ + + + + + + + offsetCurve — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

offsetCurve

+

Name:

+

geom offsetCurve

+

Description:

+

geom Calculate the offsetCurve of a Geometry.

+

Arguments:

+
+
    +
  • -d –distance: The buffer distance

  • +
  • -q –quadrantSegments: The number of quadrant segments

  • +
  • -c –endCapStyle: The end cap style (round, flat/butt, square)

  • +
  • -s –singleSided: The flag for whether the buffer should be single sided

  • +
  • -f –simplifyFactor: The simplify factor

  • +
  • -m –mitreLimit: The mitre limit

  • +
  • -j –joinStyle: The join style (round, mitre, bevel)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom offsetcurve -g "LINESTRING (-122.38774895668028 47.579341113135314, -122.38665461540221 47.57931940112287, -122.38654732704164 47.58122278667477, -122.38340377807616 47.58118660128292, -122.38322138786316 47.581939252282744)" -d 0.001
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/overlaps.html b/commands/overlaps.html new file mode 100644 index 00000000..e67c7293 --- /dev/null +++ b/commands/overlaps.html @@ -0,0 +1,241 @@ + + + + + + + overlaps — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

overlaps

+

Name:

+

geom overlaps

+

Description:

+

geom Determine whether the first geometry overlaps with the other geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom overlaps -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((2 2, 2 14, 14 14, 14 2, 2 2))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/pipe.html b/commands/pipe.html new file mode 100644 index 00000000..ffa1dd16 --- /dev/null +++ b/commands/pipe.html @@ -0,0 +1,240 @@ + + + + + + + pipe — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

pipe

+

Name:

+

geom pipe

+

Description:

+

geom Combine multiple commands together with a pipe.

+

Arguments:

+
+
    +
  • -c –commands: Commands separate by pipe

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom pipe -c "buffer -g 'POINT(1 1)' -d 10 | centroid"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/placepoint.html b/commands/placepoint.html new file mode 100644 index 00000000..83137cb4 --- /dev/null +++ b/commands/placepoint.html @@ -0,0 +1,241 @@ + + + + + + + placepoint — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

placepoint

+

Name:

+

geom placepoint

+

Description:

+

geom Place a point on the input linear geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom placepoint -g "LINESTRING (0 0, 5 5, 10 10)" -o "POINT (3 4.5)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/pointatangle.html b/commands/pointatangle.html new file mode 100644 index 00000000..ef682626 --- /dev/null +++ b/commands/pointatangle.html @@ -0,0 +1,242 @@ + + + + + + + pointatangle — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

pointatangle

+

Name:

+

geom pointatangle

+

Description:

+

geom Calculate a point at a given angle distance from the input point.

+

Arguments:

+
+
    +
  • -d –distance: The distance

  • +
  • -a –angle: The angle (in degrees)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom pointatangle -g "POINT (10 10)" -a 90 -d 10
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/pointsalong.html b/commands/pointsalong.html new file mode 100644 index 00000000..9f145845 --- /dev/null +++ b/commands/pointsalong.html @@ -0,0 +1,242 @@ + + + + + + + pointsalong — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

pointsalong

+

Name:

+

geom pointsalong

+

Description:

+

geom Place points along a line

+

Arguments:

+
+
    +
  • -d –distance: The distance between points

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom pointsalong -g "LINESTRING (0 0, 10 10)" -d 1
+
+
+../_images/pointsalong.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/polygonize.html b/commands/polygonize.html new file mode 100644 index 00000000..7042f4db --- /dev/null +++ b/commands/polygonize.html @@ -0,0 +1,241 @@ + + + + + + + polygonize — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

polygonize

+

Name:

+

geom polygonize

+

Description:

+

geom Creates polygons from lines.

+

Arguments:

+
+
    +
  • -f –full: Whether to include a full report (polygons, cutEdges, dangles, and invalidRingLines)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom polygonize -g "MULTILINESTRING ((-5.5 45, -4.5 46.5), (-4.5 46.5, 1 52), (1 52, 2.5 54), (-1 54, 1 52), (1 52, 5.5 48.5), (5.5 48.5, 9 46), (0.5 42.5, 2 44), (2 44, 5.5 48.5), (5.5 48.5, 7 50.5), (-6 47, -4.5 46.5), (-4.5 46.5, 2 44), (2 44, 4.5 43))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/project.html b/commands/project.html new file mode 100644 index 00000000..3261c67a --- /dev/null +++ b/commands/project.html @@ -0,0 +1,242 @@ + + + + + + + project — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

project

+

Name:

+

geom project

+

Description:

+

geom Project the input geometry from one coordinate system to another.

+

Arguments:

+
+
    +
  • -s –source: The source projection

  • +
  • -t –target: The target projection

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom project -g "POINT (1179931.55 645310.31)" -s EPSG:2927 -t EPSG:4326
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/random.html b/commands/random.html new file mode 100644 index 00000000..298bc515 --- /dev/null +++ b/commands/random.html @@ -0,0 +1,244 @@ + + + + + + + random — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

random

+

Name:

+

geom random

+

Description:

+

geom Generate random points inside the input geometry.

+

Arguments:

+
+
    +
  • -n –number: The number of points

  • +
  • -r –gridded: The flag for whether the random points should be gridded.

  • +
  • -c –constrained: The flag for whether the random points should be constrained to a circle when gridded.

  • +
  • -f –gutterFraction: The gutter distance or padding for random points when gridded.

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom random -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 100
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/randomwalk.html b/commands/randomwalk.html new file mode 100644 index 00000000..e6f0c308 --- /dev/null +++ b/commands/randomwalk.html @@ -0,0 +1,244 @@ + + + + + + + randomwalk — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

randomwalk

+

Name:

+

geom randomwalk

+

Description:

+

geom Generate a random walk as a linestring.

+

Arguments:

+
+
    +
  • -n –number: The number of walks

  • +
  • -d –distance: The distance between Coordinates

  • +
  • -p –probability: The probability of changing direction

  • +
  • -a –angle: The angle increment (in degrees) when changing direction

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom randomwalk -n 100 -a 45 -d 10 -g "POINT (1 1)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/rectangle.html b/commands/rectangle.html new file mode 100644 index 00000000..1efe3daa --- /dev/null +++ b/commands/rectangle.html @@ -0,0 +1,246 @@ + + + + + + + rectangle — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

rectangle

+

Name:

+

geom rectangle

+

Description:

+

geom Create a rectangle from the input geometry.

+

Arguments:

+
+
    +
  • -w –width: The width

  • +
  • -h –height: The height

  • +
  • -p –numberOfPoints: The number of points

  • +
  • -r –rotation: The rotation

  • +
  • -c –center: The flag to use center (true) or the base (false)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom rectangle -g "POINT (100 100)" -p 30 -w 500 -h 500
+
+
+../_images/rectangle.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/reduceprecision.html b/commands/reduceprecision.html new file mode 100644 index 00000000..af87c8ec --- /dev/null +++ b/commands/reduceprecision.html @@ -0,0 +1,244 @@ + + + + + + + reduceprecision — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

reduceprecision

+

Name:

+

geom reduceprecision

+

Description:

+

geom Reduce the precision of the input geometry.

+

Arguments:

+
+
    +
  • -t –type: The precision model type (FIXED, FLOATING, FLOATING_SINGLE)

  • +
  • -s –scale: The precision model scale when type is FLOATING

  • +
  • -p –pointWise: Whether the precision reducer operates pointwise

  • +
  • -r –removeCollapsed: Whether the precision reducer should remove collapsed geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom reduceprecision -g "POINT (-5.70068359375 45.1416015625)" -s 2 -t fixed
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/reflect.html b/commands/reflect.html new file mode 100644 index 00000000..d4021526 --- /dev/null +++ b/commands/reflect.html @@ -0,0 +1,244 @@ + + + + + + + reflect — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

reflect

+

Name:

+

geom reflect

+

Description:

+

geom Create a new geometry by applying the reflect affine transformation on the input geometry.

+

Arguments:

+
+
    +
  • -0 –x0: The x-ordinate of a point on the reflection line

  • +
  • -1 –y0: The y-ordinate of a point on the reflection line

  • +
  • -2 –x1: The x-ordinate of a another point on the reflection line

  • +
  • -3 –y1: The y-ordinate of a another point on the reflection line

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom reflect -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -0 5 -1 2
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/relate.html b/commands/relate.html new file mode 100644 index 00000000..ff1e3eeb --- /dev/null +++ b/commands/relate.html @@ -0,0 +1,242 @@ + + + + + + + relate — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

relate

+

Name:

+

geom relate

+

Description:

+

geom Determine if the input Geometry and the other Geometry are related according to the DE-9IM intersection matrix or calculate the DE-9IM.

+

Arguments:

+
+
    +
  • -m –matrix: The DE-9IM intersection matrix

  • +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom relate -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POINT (5 5)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/reverse.html b/commands/reverse.html new file mode 100644 index 00000000..b4d9ee49 --- /dev/null +++ b/commands/reverse.html @@ -0,0 +1,240 @@ + + + + + + + reverse — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

reverse

+

Name:

+

geom reverse

+

Description:

+

geom Reverse the coordinates of the input geometry

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom reverse -g "LINESTRING (0 0, 5 5, 10 10)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/rotate.html b/commands/rotate.html new file mode 100644 index 00000000..3ed040a6 --- /dev/null +++ b/commands/rotate.html @@ -0,0 +1,245 @@ + + + + + + + rotate — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

rotate

+

Name:

+

geom rotate

+

Description:

+

geom Create a new geometry by rotating the input geometry

+

Arguments:

+
+
    +
  • -t –theta: The rotation angle, in radians

  • +
  • -x –xCoordinate: The x-ordinate of the rotation point

  • +
  • -y –yCoordinate: The y-ordinate of the rotation point

  • +
  • -s –sine: The sine of the rotation angle

  • +
  • -c –cosine: The cosine of the rotation angle

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom rotate -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -t 0.785398163
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/scale.html b/commands/scale.html new file mode 100644 index 00000000..de282cdc --- /dev/null +++ b/commands/scale.html @@ -0,0 +1,244 @@ + + + + + + + scale — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

scale

+

Name:

+

geom scale

+

Description:

+

geom Create a new geometry by scaling the input geometry

+

Arguments:

+
+
    +
  • -s –xscale: The value to scale by in the x direction

  • +
  • -t –yscale: The value to scale by in the y direction

  • +
  • -x –xcoordinate: The x-ordinate of the point to scale around

  • +
  • -y –ycoordinate: The y-ordinate of the point to scale around

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom scale -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -s 2 -t 5
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/shear.html b/commands/shear.html new file mode 100644 index 00000000..99b5eb1a --- /dev/null +++ b/commands/shear.html @@ -0,0 +1,242 @@ + + + + + + + shear — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

shear

+

Name:

+

geom shear

+

Description:

+

geom Create a new geometry by apply a shear affine transformation to the input geometry

+

Arguments:

+
+
    +
  • -x –xDistance: The value to translate by in the x direction

  • +
  • -y -yDistance: The value to translate by in the y direction

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom shear -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -x 4 -y 2
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/sierpinskicarpet.html b/commands/sierpinskicarpet.html new file mode 100644 index 00000000..2a0faf34 --- /dev/null +++ b/commands/sierpinskicarpet.html @@ -0,0 +1,242 @@ + + + + + + + sierpinskicarpet — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sierpinskicarpet

+

Name:

+

geom sierpinskicarpet

+

Description:

+

geom Create a sierpinski carpet.

+

Arguments:

+
+
    +
  • -n –number: The number of points.

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom sierpinskicarpet -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -n 100
+
+
+../_images/sierpinskicarpet.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/similarity.html b/commands/similarity.html new file mode 100644 index 00000000..7a139307 --- /dev/null +++ b/commands/similarity.html @@ -0,0 +1,242 @@ + + + + + + + similarity — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

similarity

+

Name:

+

geom similarity

+

Description:

+

geom Calculate the degree of similarity between two geometries.

+

Arguments:

+
+
    +
  • -a –algorithm: The algorithm (area/a or hausdorff/h)

  • +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom similarity -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((2 2, 2 14, 14 14, 14 2, 2 2))" -a "area"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/simplify.html b/commands/simplify.html new file mode 100644 index 00000000..4cec734c --- /dev/null +++ b/commands/simplify.html @@ -0,0 +1,242 @@ + + + + + + + simplify — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

simplify

+

Name:

+

geom simplify

+

Description:

+

geom Simplify the input geometry.

+

Arguments:

+
+
    +
  • -a –algorithm: The distance tolerance (douglaspeucker/dp or topologypreserving/tp or visvalingamwhyat/vw)

  • +
  • -d –distance: The distance tolerance

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom simplify -g "LINESTRING (1 1, 2.5 2.5, 3.5 3.5, 5 5, 6.5 6.5, 8 8, 9 9, 10.5 10.5, 12 12)" -a dp -d 2
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/sinestar.html b/commands/sinestar.html new file mode 100644 index 00000000..8da4bdc9 --- /dev/null +++ b/commands/sinestar.html @@ -0,0 +1,248 @@ + + + + + + + sinestar — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sinestar

+

Name:

+

geom sinestar

+

Description:

+

geom Create a sine star.

+

Arguments:

+
+
    +
  • -n –numberOfArms: The number of arms

  • +
  • -l –armLengthRatio: The arm length ratio

  • +
  • -w –width: The width

  • +
  • -h –height: The height

  • +
  • -p –numberOfPoints: The number of points

  • +
  • -r –rotation: The rotation

  • +
  • -c –center: The flag to use center (true) or the base (false)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom sinestar -l 0.9 -n 12 -p 1000 -w 500 -h 500 -g "POINT (100 100)"
+
+
+../_images/sinestar.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/slice.html b/commands/slice.html new file mode 100644 index 00000000..a150a88c --- /dev/null +++ b/commands/slice.html @@ -0,0 +1,242 @@ + + + + + + + slice — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

slice

+

Name:

+

geom slice

+

Description:

+

geom Get a subset of geometries using a start and end index.

+

Arguments:

+
+
    +
  • -s –start: The start index number

  • +
  • -e –end: The end index number

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
null
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/snap.html b/commands/snap.html new file mode 100644 index 00000000..b8a88b3c --- /dev/null +++ b/commands/snap.html @@ -0,0 +1,242 @@ + + + + + + + snap — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

snap

+

Name:

+

geom snap

+

Description:

+

geom Snap the input geometry to the other geometry.

+

Arguments:

+
+
    +
  • -d –distance: The distance/tolerance

  • +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom snap -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((11 11, 11 20, 20 20, 20 11, 11 11))" -d 1.5
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/split.html b/commands/split.html new file mode 100644 index 00000000..5c4642f7 --- /dev/null +++ b/commands/split.html @@ -0,0 +1,241 @@ + + + + + + + split — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

split

+

Name:

+

geom split

+

Description:

+

geom Split a Geometry by another Geometry

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom split -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "LINESTRING (0 0, 10 10)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/spoke.html b/commands/spoke.html new file mode 100644 index 00000000..754e5380 --- /dev/null +++ b/commands/spoke.html @@ -0,0 +1,242 @@ + + + + + + + spoke — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

spoke

+

Name:

+

geom spoke

+

Description:

+

geom Create a spoke diagram with lines between a single Geometry to other Geometries

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom spoke -g "MULTIPOINT ((5.875473869469681 1.0101660098606535), (19.64273518313129 8.032868631563336), (19.397302929472787 10.139284609662209), (12.61792804667091 17.61654337241537), (4.802498121787375 9.17962232316298))" -o "POINT (5 5)"
+
+
+../_images/spoke.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/squircle.html b/commands/squircle.html new file mode 100644 index 00000000..4d80502f --- /dev/null +++ b/commands/squircle.html @@ -0,0 +1,246 @@ + + + + + + + squircle — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

squircle

+

Name:

+

geom squircle

+

Description:

+

geom Create a squircle.

+

Arguments:

+
+
    +
  • -w –width: The width

  • +
  • -h –height: The height

  • +
  • -p –numberOfPoints: The number of points

  • +
  • -r –rotation: The rotation

  • +
  • -c –center: The flag to use center (true) or the base (false)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom squircle -g "POINT (100 100)" -p 30 -w 500 -h 500
+
+
+../_images/squircle.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/startpoint.html b/commands/startpoint.html new file mode 100644 index 00000000..e1ef98be --- /dev/null +++ b/commands/startpoint.html @@ -0,0 +1,240 @@ + + + + + + + startpoint — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

startpoint

+

Name:

+

geom startpoint

+

Description:

+

geom Get the start point of a LineString or MultiLineString.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom startpoint -g "LINESTRING (1 1, 5 5, 10 10)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/subline.html b/commands/subline.html new file mode 100644 index 00000000..7e54a0fb --- /dev/null +++ b/commands/subline.html @@ -0,0 +1,242 @@ + + + + + + + subline — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

subline

+

Name:

+

geom subline

+

Description:

+

geom Extract a sub line from a linear geometry.

+

Arguments:

+
+
    +
  • -s startPosition: The start position between 0 and 1

  • +
  • -e endPosition: The end position between 0 and 1

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom subline -g "LINESTRING (0 0, 10 10, 20 20)" -s 0.25 -e 0.75
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/supercircle.html b/commands/supercircle.html new file mode 100644 index 00000000..68c99b29 --- /dev/null +++ b/commands/supercircle.html @@ -0,0 +1,247 @@ + + + + + + + supercircle — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

supercircle

+

Name:

+

geom supercircle

+

Description:

+

geom Create a super circle.

+

Arguments:

+
+
    +
  • -o –power: The positive power

  • +
  • -w –width: The width

  • +
  • -h –height: The height

  • +
  • -p –numberOfPoints: The number of points

  • +
  • -r –rotation: The rotation

  • +
  • -c –center: The flag to use center (true) or the base (false)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom supercircle -g "POINT (100 100)" -p 30 -w 500 -h 500
+
+
+../_images/supercircle.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/symdifference.html b/commands/symdifference.html new file mode 100644 index 00000000..dc39e5fa --- /dev/null +++ b/commands/symdifference.html @@ -0,0 +1,241 @@ + + + + + + + symdifference — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

symdifference

+

Name:

+

geom symdifference

+

Description:

+

geom Calculate the symetric difference between two geometries

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom symdifference -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((5 5, 5 20, 20 20, 20 5, 5 5))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/text.html b/commands/text.html new file mode 100644 index 00000000..ceacbb14 --- /dev/null +++ b/commands/text.html @@ -0,0 +1,243 @@ + + + + + + + text — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

text

+

Name:

+

geom text

+

Description:

+

geom Create a geometry from a string.

+

Arguments:

+
+
    +
  • -t –text: The text

  • +
  • -f –fontName: The font name

  • +
  • -s –pointSize: The font size

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom text -t "JTS"
+
+
+../_images/text.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/touches.html b/commands/touches.html new file mode 100644 index 00000000..c392a9b1 --- /dev/null +++ b/commands/touches.html @@ -0,0 +1,241 @@ + + + + + + + touches — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

touches

+

Name:

+

geom touches

+

Description:

+

geom Determine if the input geometry touches another geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom touches -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((10 10, 10 14, 14 14, 14 10, 10 10))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/towkb.html b/commands/towkb.html new file mode 100644 index 00000000..5918c66d --- /dev/null +++ b/commands/towkb.html @@ -0,0 +1,242 @@ + + + + + + + towkb — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

towkb

+

Name:

+

geom towkb

+

Description:

+

geom Write a Geometry to WKB.

+

Arguments:

+
+
    +
  • -d –dimension: The output dimension (2 or 3)

  • +
  • -b –byte-order: The byte order (1 = big endian, 2 = little endian)

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom towkb -g "POINT (10 10)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/translate.html b/commands/translate.html new file mode 100644 index 00000000..dc179e39 --- /dev/null +++ b/commands/translate.html @@ -0,0 +1,242 @@ + + + + + + + translate — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

translate

+

Name:

+

geom translate

+

Description:

+

geom Create a new geometry by applying the translate affine transformation on the input geometry.

+

Arguments:

+
+
    +
  • -x –xDistance: The value to translate by in the x direction

  • +
  • -y –yDistance: The value to translate by in the y direction

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom translate -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -x 4 -y 2
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/type.html b/commands/type.html new file mode 100644 index 00000000..a20faa34 --- /dev/null +++ b/commands/type.html @@ -0,0 +1,240 @@ + + + + + + + type — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

type

+

Name:

+

geom type

+

Description:

+

geom Get the type of the geometry.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom type -g "POINT (1 1)"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/union.html b/commands/union.html new file mode 100644 index 00000000..2ede8e77 --- /dev/null +++ b/commands/union.html @@ -0,0 +1,241 @@ + + + + + + + union — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

union

+

Name:

+

geom union

+

Description:

+

geom Calculate the union between two geometries.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom union -g "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" -o "POLYGON ((10 10, 10 14, 14 14, 14 10, 10 10))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/variablebuffer.html b/commands/variablebuffer.html new file mode 100644 index 00000000..bcc9a550 --- /dev/null +++ b/commands/variablebuffer.html @@ -0,0 +1,241 @@ + + + + + + + variablebuffer — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

variablebuffer

+

Name:

+

geom variablebuffer

+

Description:

+

geom Calculate a variable buffer around a Geometry.

+

Arguments:

+
+
    +
  • -d –distance: The buffer distance

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom variablebuffer -g "LINESTRING(1 2, 3 4, 5 6)" -d 10 -d 15 -d 20
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/version.html b/commands/version.html new file mode 100644 index 00000000..aa33524a --- /dev/null +++ b/commands/version.html @@ -0,0 +1,239 @@ + + + + + + + version — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

version

+

Name:

+

geom version

+

Description:

+

geom Get the version

+

Arguments:

+
+
    +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom version
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/voronoi.html b/commands/voronoi.html new file mode 100644 index 00000000..9a7a3fd7 --- /dev/null +++ b/commands/voronoi.html @@ -0,0 +1,241 @@ + + + + + + + voronoi — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

voronoi

+

Name:

+

geom voronoi

+

Description:

+

geom Generate a voronoi diagram.

+

Arguments:

+
+
    +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom voronoi -g "MULTIPOINT ((12.5 12.5), (13.5 7.5), (7 9), (9.5 13), (8 7))"
+
+
+../_images/voronoi.png +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/commands/within.html b/commands/within.html new file mode 100644 index 00000000..1f07bb7e --- /dev/null +++ b/commands/within.html @@ -0,0 +1,239 @@ + + + + + + + within — geom 0.9.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

within

+

Name:

+

geom within

+

Description:

+

geom Determine if the input geometry is within the other geometry.

+

Arguments:

+
+
    +
  • -o –otherGeometry: The other geometry

  • +
  • -g –geometry: The input geometry

  • +
  • –help: Print help message

  • +
  • –web-help: Open help in a web browser

  • +
+
+

Example:

+
geom within -g "POINT (2 2)" -o "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))"
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/genindex.html b/genindex.html new file mode 100644 index 00000000..07fb6569 --- /dev/null +++ b/genindex.html @@ -0,0 +1,106 @@ + + + + + + Index — geom 0.9.0 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Index

+ +
+ +
+ + +
+
+
+ +
+ +
+

© Copyright 2021, Jared Erickson.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 00000000..7d613179 --- /dev/null +++ b/index.html @@ -0,0 +1,245 @@ + + + + + + + Geometry Commands — geom 0.9.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Geometry Commands

+

Geometry Commands is a command line application for processing geometry. It is inspired by the wonderful Java Topology Suite (JTS) library and the Unix Philosophy.

+

It contains one command line application (geom) with numerous subcommands (buffer, centroid, envelope) that generally read WKT geometry from standard input and then write WKT geometry to standard output. This enables several geometry commands to be chained together using pipes.:

+
echo "POINT (1 1)" | geom buffer -d 10 | geom envelope
+
+
+

Geometry Commands is open source under the MIT license. I hope you find it useful. The code is available at github. If you find any bugs or would like any enhancements please use the GitHub issue tracker.

+
+

Command Documentation

+ +
+
+
+

Indices and tables

+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/install.html b/install.html new file mode 100644 index 00000000..57a268d7 --- /dev/null +++ b/install.html @@ -0,0 +1,112 @@ + + + + + + + Install — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Install

+

To install, simple download the latest zip file and place the bin directory in your path. You should then be able to run the geom command.

+

You can also download an uber jar that contains all of the required code and dependencies in one file that you can run with the java -jar geom.X.X.jar command.

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/objects.inv b/objects.inv new file mode 100644 index 00000000..4eb59135 Binary files /dev/null and b/objects.inv differ diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 293e812d..00000000 --- a/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 4.0.0 - org.geometrycommands - geometrycommands - 0.1 - - - opengeo - OpenGeo Maven Repository - http://repo.opengeo.org/ - - true - - - - osgeo - Open Source Geospatial Foundation Repository - http://download.osgeo.org/webdav/geotools/ - - - maven2-repository.dev.java.net - Java.net repository - http://download.java.net/maven/2 - - - - - com.vividsolutions - jts - 1.12 - - - org.osgeo - proj4j - 0.1.0 - - - args4j - args4j - 2.0.16 - - - junit - junit - 4.7 - test - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - - - - maven-assembly-plugin - 2.2.2 - - - src/assembly/dir.xml - src/assembly/zip.xml - - - - - make-assembly - package - - single - - - - - - - \ No newline at end of file diff --git a/search.html b/search.html new file mode 100644 index 00000000..a3d5a23d --- /dev/null +++ b/search.html @@ -0,0 +1,121 @@ + + + + + + Search — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2021, Jared Erickson.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 00000000..9e44795d --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["commands", "commands/angle", "commands/arc", "commands/arcpoly", "commands/area", "commands/asciiart", "commands/boundary", "commands/buffer", "commands/centroid", "commands/closelinestring", "commands/combine", "commands/concaveHull", "commands/concaveHullOfPolygons", "commands/contains", "commands/convexHull", "commands/coordinates", "commands/count", "commands/countpoints", "commands/coveredby", "commands/covers", "commands/crosses", "commands/delaunay", "commands/densify", "commands/difference", "commands/dimension", "commands/disjoint", "commands/distance", "commands/distanceline", "commands/draw", "commands/drawbase64", "commands/dump", "commands/ellipse", "commands/endpoint", "commands/envelope", "commands/equals", "commands/fix", "commands/fromwkb", "commands/get", "commands/grid", "commands/hausdorffdistance", "commands/help", "commands/hilbertcurve", "commands/interiorpoint", "commands/interpolatepoint", "commands/intersection", "commands/intersects", "commands/isccw", "commands/isclosed", "commands/isempty", "commands/isrectangle", "commands/isring", "commands/issimple", "commands/isvalid", "commands/iswithindistance", "commands/kochsnowflake", "commands/largestemptycircle", "commands/linedissolve", "commands/linemerge", "commands/list", "commands/locatepoint", "commands/maximuminscribedcircle", "commands/mincircle", "commands/minclearance", "commands/mindiameter", "commands/minrect", "commands/mortoncurve", "commands/narrow", "commands/nearestpoints", "commands/node", "commands/normalize", "commands/octagonalenvelope", "commands/offsetCurve", "commands/overlaps", "commands/pipe", "commands/placepoint", "commands/pointatangle", "commands/pointsalong", "commands/polygonize", "commands/project", "commands/random", "commands/randomwalk", "commands/rectangle", "commands/reduceprecision", "commands/reflect", "commands/relate", "commands/reverse", "commands/rotate", "commands/scale", "commands/shear", "commands/sierpinskicarpet", "commands/similarity", "commands/simplify", "commands/sinestar", "commands/slice", "commands/snap", "commands/split", "commands/spoke", "commands/squircle", "commands/startpoint", "commands/subline", "commands/supercircle", "commands/symdifference", "commands/text", "commands/touches", "commands/towkb", "commands/translate", "commands/type", "commands/union", "commands/variablebuffer", "commands/version", "commands/voronoi", "commands/within", "index", "install", "usage"], "filenames": ["commands.rst", "commands/angle.rst", "commands/arc.rst", "commands/arcpoly.rst", "commands/area.rst", "commands/asciiart.rst", "commands/boundary.rst", "commands/buffer.rst", "commands/centroid.rst", "commands/closelinestring.rst", "commands/combine.rst", "commands/concaveHull.rst", "commands/concaveHullOfPolygons.rst", "commands/contains.rst", "commands/convexHull.rst", "commands/coordinates.rst", "commands/count.rst", "commands/countpoints.rst", "commands/coveredby.rst", "commands/covers.rst", "commands/crosses.rst", "commands/delaunay.rst", "commands/densify.rst", "commands/difference.rst", "commands/dimension.rst", "commands/disjoint.rst", "commands/distance.rst", "commands/distanceline.rst", "commands/draw.rst", "commands/drawbase64.rst", "commands/dump.rst", "commands/ellipse.rst", "commands/endpoint.rst", "commands/envelope.rst", "commands/equals.rst", "commands/fix.rst", "commands/fromwkb.rst", "commands/get.rst", "commands/grid.rst", "commands/hausdorffdistance.rst", "commands/help.rst", "commands/hilbertcurve.rst", "commands/interiorpoint.rst", "commands/interpolatepoint.rst", "commands/intersection.rst", "commands/intersects.rst", "commands/isccw.rst", "commands/isclosed.rst", "commands/isempty.rst", "commands/isrectangle.rst", "commands/isring.rst", "commands/issimple.rst", "commands/isvalid.rst", "commands/iswithindistance.rst", "commands/kochsnowflake.rst", "commands/largestemptycircle.rst", "commands/linedissolve.rst", "commands/linemerge.rst", "commands/list.rst", "commands/locatepoint.rst", "commands/maximuminscribedcircle.rst", "commands/mincircle.rst", "commands/minclearance.rst", "commands/mindiameter.rst", "commands/minrect.rst", "commands/mortoncurve.rst", "commands/narrow.rst", "commands/nearestpoints.rst", "commands/node.rst", "commands/normalize.rst", "commands/octagonalenvelope.rst", "commands/offsetCurve.rst", "commands/overlaps.rst", "commands/pipe.rst", "commands/placepoint.rst", "commands/pointatangle.rst", "commands/pointsalong.rst", "commands/polygonize.rst", "commands/project.rst", "commands/random.rst", "commands/randomwalk.rst", "commands/rectangle.rst", "commands/reduceprecision.rst", "commands/reflect.rst", "commands/relate.rst", "commands/reverse.rst", "commands/rotate.rst", "commands/scale.rst", "commands/shear.rst", "commands/sierpinskicarpet.rst", "commands/similarity.rst", "commands/simplify.rst", "commands/sinestar.rst", "commands/slice.rst", "commands/snap.rst", "commands/split.rst", "commands/spoke.rst", "commands/squircle.rst", "commands/startpoint.rst", "commands/subline.rst", "commands/supercircle.rst", "commands/symdifference.rst", "commands/text.rst", "commands/touches.rst", "commands/towkb.rst", "commands/translate.rst", "commands/type.rst", "commands/union.rst", "commands/variablebuffer.rst", "commands/version.rst", "commands/voronoi.rst", "commands/within.rst", "index.rst", "install.rst", "usage.rst"], "titles": ["Commands", "angle", "arc", "arcpoly", "area", "asciiart", "boundary", "buffer", "centroid", "closelinestring", "combine", "concaveHull", "concaveHullOfPolygons", "contains", "convexHull", "coordinates", "count", "countpoints", "coveredby", "covers", "crosses", "delaunay", "densify", "difference", "dimension", "disjoint", "distance", "distanceline", "draw", "drawbase64", "dump", "ellipse", "endpoint", "envelope", "equals", "fix", "fromwkb", "get", "grid", "hausdorffdistance", "help", "hilbertcurve", "interiorpoint", "interpolatepoint", "intersection", "intersects", "isccw", "isclosed", "isempty", "isrectangle", "isring", "issimple", "isvalid", "iswithindistance", "kochsnowflake", "largestemptycircle", "linedissolve", "linemerge", "list", "locatepoint", "maximuminscribedcircle", "mincircle", "minclearance", "mindiameter", "minrect", "mortoncurve", "narrow", "nearestpoints", "node", "normalize", "octagonalenvelope", "offsetCurve", "overlaps", "pipe", "placepoint", "pointatangle", "pointsalong", "polygonize", "project", "random", "randomwalk", "rectangle", "reduceprecision", "reflect", "relate", "reverse", "rotate", "scale", "shear", "sierpinskicarpet", "similarity", "simplify", "sinestar", "slice", "snap", "split", "spoke", "squircle", "startpoint", "subline", "supercircle", "symdifference", "text", "touches", "towkb", "translate", "type", "union", "variablebuffer", "version", "voronoi", "within", "Geometry Commands", "Install", "Usage"], "terms": {"list": [0, 112, 114], "version": [0, 69, 112], "help": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 114], "angl": [0, 2, 3, 75, 80, 86, 112], "arc": [0, 3, 112], "arcpoli": [0, 112], "area": [0, 90, 112], "asciiart": [0, 112], "boundari": [0, 112], "buffer": [0, 21, 71, 73, 108, 112, 114], "centroid": [0, 73, 112], "closelinestr": [0, 112], "combin": [0, 73, 112], "contain": [0, 112, 113], "concavehul": [0, 112], "concavehullofpolygon": [0, 112], "convexhul": [0, 112], "coordin": [0, 22, 28, 29, 46, 78, 80, 85, 112], "count": [0, 17, 112], "countpoint": [0, 112], "coveredbi": [0, 112], "cover": [0, 18, 112], "cross": [0, 112], "delaunai": [0, 112], "densifi": [0, 112], "differ": [0, 101, 112], "dimens": [0, 104, 112], "disjoint": [0, 112], "distanc": [0, 7, 22, 27, 33, 39, 53, 59, 71, 75, 76, 79, 80, 91, 94, 108, 112, 114], "distancelin": [0, 112], "draw": [0, 29, 112, 114], "drawbase64": [0, 112], "dump": [0, 112], "ellips": [0, 112], "endpoint": [0, 112], "envelop": [0, 28, 29, 70, 112], "equal": [0, 112], "fix": [0, 82, 112], "fromwkb": [0, 112], "get": [0, 5, 15, 24, 32, 40, 67, 93, 98, 106, 109, 112, 114], "grid": [0, 79, 112], "hausdorffdist": [0, 112], "hilbertcurv": [0, 112], "interiorpoint": [0, 112], "interpolatepoint": [0, 112], "intersect": [0, 84, 112], "isccw": [0, 112], "isclos": [0, 112], "isempti": [0, 112], "isrectangl": [0, 112], "isr": [0, 112], "issimpl": [0, 112], "isvalid": [0, 112], "iswithindist": [0, 112], "kochsnowflak": [0, 112], "largestemptycircl": [0, 112], "linedissolv": [0, 112], "linemerg": [0, 112], "locatepoint": [0, 112], "maximuminscribedcircl": [0, 112], "mincircl": [0, 112], "minclear": [0, 112], "mindiamet": [0, 112], "minrect": [0, 112], "mortoncurv": [0, 112], "narrow": [0, 112], "nearestpoint": [0, 112], "node": [0, 112], "normal": [0, 112], "octagonalenvelop": [0, 112], "offsetcurv": [0, 112], "overlap": [0, 112], "pipe": [0, 112, 114], "placepoint": [0, 112], "pointatangl": [0, 112], "pointsalong": [0, 112], "polygon": [0, 3, 4, 6, 8, 12, 13, 14, 15, 17, 18, 19, 23, 25, 28, 29, 33, 34, 38, 39, 41, 42, 44, 45, 49, 51, 52, 54, 60, 61, 62, 63, 64, 65, 72, 79, 83, 84, 86, 87, 88, 89, 90, 94, 95, 101, 103, 105, 107, 111, 112], "project": [0, 112, 114], "random": [0, 21, 80, 112, 114], "randomwalk": [0, 112], "rectangl": [0, 64, 112], "reduceprecis": [0, 112], "reflect": [0, 112], "relat": [0, 112], "revers": [0, 112], "rotat": [0, 2, 3, 31, 81, 92, 97, 100, 112], "scale": [0, 82, 112], "shear": [0, 112], "sierpinskicarpet": [0, 112], "similar": [0, 112], "simplifi": [0, 7, 71, 112], "sinestar": [0, 112], "slice": [0, 112], "snap": [0, 112], "split": [0, 112], "spoke": [0, 112], "squircl": [0, 112], "startpoint": [0, 112], "sublin": [0, 112], "supercircl": [0, 112], "symdiffer": [0, 112], "text": [0, 36, 112, 114], "touch": [0, 112], "towkb": [0, 112], "translat": [0, 88, 112], "type": [0, 1, 29, 34, 52, 66, 82, 112], "union": [0, 112], "variablebuff": [0, 112], "voronoi": [0, 112], "within": [0, 53, 112], "name": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111], "geom": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114], "descript": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111], "calcul": [1, 4, 6, 8, 11, 12, 13, 14, 23, 26, 33, 38, 39, 42, 44, 55, 60, 61, 62, 63, 64, 69, 70, 71, 75, 84, 90, 101, 107, 108], "between": [1, 23, 26, 27, 39, 43, 44, 67, 76, 80, 90, 96, 99, 101, 107], "two": [1, 26, 27, 39, 44, 67, 90, 101, 107], "point": [1, 2, 3, 5, 7, 10, 13, 17, 18, 19, 21, 24, 26, 27, 31, 32, 41, 42, 43, 48, 53, 54, 59, 65, 66, 67, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 86, 87, 89, 92, 96, 97, 98, 100, 104, 106, 111, 112, 114], "argument": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111], "t": [1, 12, 28, 29, 34, 52, 55, 60, 78, 82, 86, 87, 102, 114], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 111, 112, 114], "can": [1, 113], "degre": [1, 2, 3, 75, 80, 90], "default": 1, "radian": [1, 2, 3, 86], "o": [1, 13, 18, 19, 20, 23, 25, 26, 27, 28, 29, 34, 39, 44, 45, 53, 59, 67, 72, 74, 84, 90, 94, 95, 96, 100, 101, 103, 107, 111], "othergeometri": [1, 13, 18, 19, 20, 23, 25, 26, 27, 34, 39, 44, 45, 53, 59, 67, 72, 74, 84, 90, 94, 95, 96, 101, 103, 107, 111], "other": [1, 13, 18, 19, 20, 23, 25, 26, 27, 34, 39, 44, 45, 53, 59, 67, 72, 74, 84, 90, 94, 95, 96, 101, 103, 107, 111], "geometri": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 111, 114], "g": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 103, 104, 105, 106, 107, 108, 110, 111, 114], "input": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 103, 104, 105, 106, 107, 108, 110, 111, 112, 114], "print": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 114], "messag": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 114], "web": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111], "open": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 114], "browser": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111], "exampl": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111], "1": [1, 4, 6, 7, 8, 10, 13, 15, 16, 17, 18, 19, 20, 21, 22, 24, 30, 32, 35, 37, 43, 47, 50, 53, 66, 73, 76, 77, 80, 83, 91, 94, 96, 98, 99, 104, 106, 108, 111, 112, 114], "10": [1, 2, 4, 5, 6, 7, 8, 13, 14, 15, 17, 18, 19, 20, 23, 25, 32, 33, 34, 37, 38, 39, 41, 43, 44, 45, 46, 49, 51, 52, 54, 59, 61, 65, 66, 68, 72, 73, 74, 75, 76, 79, 80, 83, 84, 85, 86, 87, 88, 89, 90, 91, 94, 95, 96, 98, 99, 101, 103, 104, 105, 107, 108, 111, 112, 114], "creat": [2, 3, 10, 31, 41, 65, 77, 81, 83, 86, 87, 88, 89, 92, 96, 97, 100, 102, 105], "an": [2, 3, 9, 28, 31, 35, 113, 114], "linestr": [2, 9, 20, 22, 25, 27, 32, 35, 43, 47, 50, 56, 59, 68, 71, 74, 76, 80, 85, 91, 95, 98, 99, 108], "from": [2, 3, 25, 30, 37, 68, 75, 77, 78, 81, 99, 102, 112], "start": [2, 3, 93, 98, 99], "extent": [2, 3], "startangl": [2, 3], "e": [2, 3, 10, 28, 29, 33, 93, 99], "angleext": [2, 3], "size": [2, 3, 28, 29, 102], "d": [2, 3, 7, 21, 22, 53, 58, 71, 73, 75, 76, 80, 91, 94, 104, 108, 112, 114], "flag": [2, 3, 7, 15, 21, 28, 29, 31, 52, 71, 79, 81, 92, 97, 100, 114], "whether": [2, 3, 7, 11, 12, 13, 18, 19, 20, 21, 25, 34, 71, 72, 77, 79, 82, 114], "given": [2, 3, 43, 53, 75], "measur": [2, 3], "ar": [2, 3, 11, 12, 84], "true": [2, 3, 31, 81, 92, 97, 100], "fals": [2, 3, 31, 81, 92, 97, 100], "w": [2, 3, 28, 29, 31, 81, 92, 97, 100], "width": [2, 3, 28, 29, 31, 81, 92, 97, 100], "h": [2, 3, 28, 29, 31, 81, 90, 92, 97, 100], "height": [2, 3, 28, 29, 31, 81, 92, 97, 100], "p": [2, 3, 29, 31, 43, 80, 81, 82, 92, 97, 100], "numberofpoint": [2, 3, 31, 81, 92, 97, 100], "number": [2, 3, 7, 16, 17, 31, 37, 38, 41, 54, 65, 68, 71, 79, 80, 81, 89, 92, 93, 97, 100, 114], "r": [2, 3, 28, 29, 31, 38, 79, 81, 82, 92, 97, 100], "c": [2, 3, 7, 21, 28, 29, 31, 38, 71, 73, 79, 81, 86, 92, 97, 100, 114], "center": [2, 3, 31, 81, 92, 97, 100], "us": [2, 3, 21, 31, 81, 92, 93, 97, 100, 112], "base": [2, 3, 29, 31, 81, 92, 97, 100], "100": [2, 3, 21, 22, 31, 54, 79, 80, 81, 89, 92, 97, 100, 114], "45": [2, 3, 42, 57, 77, 80, 82], "90": [2, 3, 75], "50": [2, 14, 33, 68, 77], "20": [3, 22, 25, 26, 27, 46, 53, 94, 99, 101, 108], "500": [3, 31, 81, 92, 97, 100], "wkt": [5, 36, 112], "ascii": 5, "art": 5, "q": [7, 71, 114], "quadrantseg": [7, 71, 114], "quadrant": [7, 71, 114], "segment": [7, 71, 114], "endcapstyl": [7, 71, 114], "end": [7, 32, 71, 93, 99, 114], "cap": [7, 71, 114], "style": [7, 71, 114], "round": [7, 71, 114], "flat": [7, 71, 114], "butt": [7, 71, 114], "squar": [7, 28, 29, 71, 114], "": [7, 28, 29, 30, 46, 66, 71, 78, 82, 86, 87, 93, 99, 102, 114], "singlesid": [7, 71, 114], "should": [7, 12, 71, 79, 82, 113, 114], "singl": [7, 71, 96, 114], "side": [7, 71, 114], "f": [7, 28, 71, 77, 79, 102], "simplifyfactor": [7, 71], "factor": [7, 71], "m": [7, 11, 28, 29, 71, 84], "mitrelimit": [7, 71], "mitr": [7, 71], "limit": [7, 71], "j": [7, 71], "joinstyl": [7, 71], "join": [7, 71], "bevel": [7, 71], "close": [9, 47], "0": [9, 12, 23, 25, 34, 35, 38, 39, 41, 43, 44, 45, 49, 51, 52, 54, 59, 61, 65, 71, 72, 74, 76, 77, 79, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 95, 99, 101, 103, 105, 107], "4": [9, 74, 77, 88, 96, 105, 108], "separ": [10, 73], "line": [10, 30, 57, 76, 77, 83, 96, 99, 112], "geometrycollect": [10, 30, 66], "echo": [10, 112, 114], "2": [10, 13, 16, 18, 19, 30, 59, 72, 77, 82, 83, 87, 88, 90, 91, 104, 105, 108, 111], "concav": [11, 12], "hull": [11, 12, 14], "max": [11, 12], "edg": [11, 12], "length": [11, 12, 92], "maximum": [11, 12, 60], "hole": [11, 12], "allow": [11, 12], "multipoint": [11, 16, 30, 37, 55, 69, 70, 96, 110], "122": [11, 12, 55, 60, 71], "38657951354979": 11, "47": [11, 12, 14, 33, 42, 55, 60, 68, 71, 77], "58451555263637": 11, "38649368286131": 11, "5772205307505": 11, "39078521728516": 11, "58167872046887": 11, "38177299499512": [11, 60], "5823155737249": [11, 55], "3876953125": 11, "5828366297174": 11, "38494873046875": 11, "58301031389572": 11, "58121554959838": 11, "38486289978027": 11, "5812734461813": 11, "l": [12, 28, 29, 34, 92], "tight": 12, "now": 12, "5": [12, 23, 26, 27, 28, 29, 32, 37, 39, 43, 44, 45, 47, 50, 59, 62, 63, 64, 68, 69, 70, 74, 77, 82, 83, 84, 85, 87, 91, 94, 96, 98, 101, 108, 110], "multipolygon": 12, "38889694213867": 12, "57595031143529": 12, "3895299434662": 12, "57526633442543": 12, "38845705986023": 12, "57515414686724": 12, "38857507705688": 12, "57558480102301": 12, "38868772983551": 12, "57478501191467": 12, "38879501819609": 12, "574224066564": 12, "38778114318846": 12, "5742566377487": 12, "38817274570465": 12, "574600443462614": 12, "3868852853775": 12, "57554137387374": 12, "38756120204926": 12, "57528442917038": 12, "38598942756653": 12, "575132433118526": 12, "38690674304961": 12, "57534957020037": 12, "first": [13, 18, 19, 20, 25, 34, 45, 72], "convex": 14, "9": [14, 33, 69, 70, 77, 91, 92, 96, 110], "52": [14, 33, 68, 77], "7": [14, 33, 42, 57, 62, 63, 64, 68, 69, 70, 77, 110], "48": [14, 33, 77], "46": [14, 33, 57, 62, 63, 64, 77], "13": [14, 33, 42, 69, 70, 110], "11": [14, 33, 94], "u": 15, "uniqu": 15, "onli": 15, "includ": [15, 29, 58, 77], "3": [16, 74, 83, 91, 104, 108], "determin": [18, 19, 20, 25, 34, 45, 47, 48, 49, 50, 51, 52, 53, 72, 84, 103, 111], "i": [18, 25, 28, 29, 34, 46, 47, 48, 49, 50, 51, 52, 53, 82, 111, 112], "gener": [21, 27, 54, 79, 80, 110, 112, 114], "triangul": 21, "conform": 21, "algorithm": [21, 90, 91], "n": [21, 37, 41, 54, 65, 68, 79, 80, 89, 92, 114], "toler": [22, 34, 55, 60, 91, 94], "15": [23, 25, 28, 29, 39, 44, 45, 46, 108], "21": [26, 27], "repres": 27, "shortest": 27, "imag": [28, 29, 114], "file": [28, 29, 113], "output": [28, 104, 112], "b": [28, 29, 36, 104], "background": [28, 29], "color": [28, 29], "backgroundimag": [28, 29], "url": [28, 29], "stroke": [28, 29], "strokeopac": [28, 29], "opac": [28, 29], "strokewidth": [28, 29], "fill": [28, 29], "fillopac": [28, 29], "shape": [28, 29], "marker": [28, 29], "circl": [28, 29, 31, 55, 60, 61, 79, 100], "ect": [28, 29], "z": [28, 29], "drawcoord": [28, 29], "geograph": [28, 29], "bound": [28, 29, 61], "minx": [28, 29], "mini": [28, 29], "maxx": [28, 29], "maxi": [28, 29], "64": 29, "encod": 29, "string": [29, 102], "y": [29, 83, 86, 87, 88, 105], "png": [29, 114], "jpeg": 29, "prefix": 29, "data": 29, "base64": 29, "put": 30, "each": 30, "own": 30, "around": [31, 38, 87, 108], "30": [31, 53, 57, 81, 97, 100], "multilinestr": [32, 57, 77, 98], "expandbi": 33, "expand": 33, "second": [34, 45], "exact": 34, "norm": 34, "topo": 34, "when": [34, 79, 80, 82], "invalid": 35, "convert": [36, 66], "wkb": [36, 104], "00000000013ff00000000000004000000000000000": 36, "sub": [37, 99], "collect": [37, 66], "index": [37, 93, 112], "column": 38, "row": 38, "discret": 39, "hausdorff": [39, 90], "hilbert": 41, "curv": [41, 65], "18": 41, "interior": 42, "8": [42, 68, 69, 70, 91, 96, 110], "54": [42, 65, 68, 77], "51": [42, 62, 63, 64, 68], "14": [42, 72, 90, 103, 107], "42": [42, 77], "17": [42, 96], "16": [42, 62, 63, 64], "53": [42, 62, 63, 64, 68], "interpol": 43, "locat": [43, 52, 59], "linear": [43, 46, 59, 74, 99], "percentag": [43, 59], "posit": [43, 59, 99, 100], "25": [43, 99], "orient": 46, "counter": 46, "clockwis": 46, "empti": [48, 55], "rectangular": 49, "ring": 50, "simpl": [51, 113], "valid": 52, "show": 52, "error": 52, "msg": 52, "loc": 52, "val": [52, 114], "23": 53, "koch": 54, "snow": 54, "flake": 54, "largest": 55, "3935317993164": 55, "57571508225466": 55, "38838195800781": 55, "57444120741259": 55, "39061355590819": 55, "dissolv": 56, "linesstr": 56, "1143429": 56, "5177049513": 56, "646812": 56, "5700195221": 56, "1148620": 56, "8088546866": 56, "1149092": 56, "7444137533": 56, "643980": 56, "956665121": 56, "1150980": 56, "4866500208": 56, "640677": 56, "4077516531": 56, "merg": 57, "togeth": [57, 73, 112], "29": 57, "27": 57, "36": 57, "31": [57, 78], "33": 57, "32": 57, "all": [58, 113, 114], "command": [58, 73, 113, 114], "inscrib": 60, "38855361938475": 60, "5805786829606": 60, "38636493682861": 60, "5783206388176": 60, "38700866699219": 60, "5750491969984": 60, "57502024527343": 60, "38481998443604": 60, "5780600889959": 60, "38151550292969": 60, "minimum": [61, 62, 63, 64], "clearanc": 62, "12": [62, 63, 64, 68, 69, 70, 91, 92, 96, 110], "41": [62, 63, 64], "diamet": 63, "morton": 65, "most": 66, "specif": 66, "nearest": 67, "null": [67, 93], "decim": 68, "place": [68, 74, 76, 113], "55": [68, 78], "6": [68, 77, 91, 108], "octagon": 70, "38774895668028": 71, "579341113135314": 71, "38665461540221": 71, "57931940112287": 71, "38654732704164": 71, "58122278667477": 71, "38340377807616": 71, "58118660128292": 71, "38322138786316": 71, "581939252282744": 71, "001": 71, "multipl": 73, "along": 76, "full": 77, "report": 77, "cutedg": 77, "dangl": 77, "invalidringlin": 77, "44": 77, "43": 77, "one": [78, 112, 113], "system": 78, "anoth": [78, 83, 95, 103], "sourc": [78, 112], "target": 78, "1179931": 78, "645310": 78, "epsg": [78, 114], "2927": [78, 114], "4326": [78, 114], "insid": 79, "constrain": 79, "gutterfract": 79, "gutter": 79, "pad": 79, "walk": 80, "probabl": 80, "chang": 80, "direct": [80, 87, 88, 105], "increment": 80, "reduc": 82, "precis": 82, "model": 82, "float": 82, "floating_singl": 82, "pointwis": 82, "oper": 82, "removecollaps": 82, "remov": 82, "collaps": 82, "70068359375": 82, "1416015625": 82, "new": [83, 86, 87, 88, 105], "appli": [83, 88, 105], "affin": [83, 88, 105], "transform": [83, 88, 105], "x0": 83, "x": [83, 86, 87, 88, 105, 113], "ordin": [83, 86, 87], "y0": 83, "x1": 83, "y1": 83, "accord": 84, "de": 84, "9im": 84, "matrix": 84, "theta": 86, "xcoordin": [86, 87], "ycoordin": [86, 87], "sine": [86, 92], "cosin": 86, "785398163": 86, "xscale": 87, "valu": [87, 88, 105], "yscale": 87, "xdistanc": [88, 105], "ydistanc": [88, 105], "sierpinski": 89, "carpet": 89, "douglaspeuck": 91, "dp": 91, "topologypreserv": 91, "tp": 91, "visvalingamwhyat": 91, "vw": 91, "star": 92, "numberofarm": 92, "arm": 92, "armlengthratio": 92, "ratio": 92, "1000": 92, "subset": 93, "diagram": [96, 110], "875473869469681": 96, "0101660098606535": 96, "19": 96, "64273518313129": 96, "032868631563336": 96, "397302929472787": 96, "139284609662209": 96, "61792804667091": 96, "61654337241537": 96, "802498121787375": 96, "17962232316298": 96, "extract": 99, "startposit": 99, "endposit": 99, "75": 99, "super": 100, "power": 100, "symetr": 101, "fontnam": 102, "font": 102, "pointsiz": 102, "jt": [102, 112], "write": [104, 112], "byte": 104, "order": 104, "big": 104, "endian": 104, "littl": 104, "variabl": 108, "applic": 112, "process": 112, "It": 112, "inspir": 112, "wonder": 112, "java": [112, 113], "topologi": 112, "suit": 112, "librari": 112, "unix": 112, "philosophi": 112, "numer": 112, "subcommand": 112, "read": 112, "standard": 112, "thi": 112, "enabl": 112, "sever": 112, "chain": 112, "under": 112, "mit": 112, "licens": 112, "hope": 112, "you": [112, 113], "find": 112, "code": [112, 113], "avail": 112, "github": 112, "If": 112, "ani": 112, "bug": 112, "would": 112, "like": 112, "enhanc": 112, "pleas": 112, "issu": 112, "tracker": 112, "instal": 112, "usag": 112, "modul": 112, "search": 112, "page": 112, "To": 113, "download": 113, "latest": 113, "zip": 113, "bin": 113, "directori": 113, "your": 113, "path": 113, "abl": 113, "run": 113, "also": 113, "uber": 113, "jar": 113, "requir": 113, "depend": 113, "view": 114, "Or": 114, "reproject": 114, "200": 114}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"command": [0, 112], "angl": 1, "arc": 2, "arcpoli": 3, "area": 4, "asciiart": 5, "boundari": 6, "buffer": 7, "centroid": 8, "closelinestr": 9, "combin": 10, "concavehul": 11, "concavehullofpolygon": 12, "contain": 13, "convexhul": 14, "coordin": 15, "count": 16, "countpoint": 17, "coveredbi": 18, "cover": 19, "cross": 20, "delaunai": 21, "densifi": 22, "differ": 23, "dimens": 24, "disjoint": 25, "distanc": 26, "distancelin": 27, "draw": 28, "drawbase64": 29, "dump": 30, "ellips": 31, "endpoint": 32, "envelop": 33, "equal": 34, "fix": 35, "fromwkb": 36, "get": 37, "grid": 38, "hausdorffdist": 39, "help": 40, "hilbertcurv": 41, "interiorpoint": 42, "interpolatepoint": 43, "intersect": [44, 45], "isccw": 46, "isclos": 47, "isempti": 48, "isrectangl": 49, "isr": 50, "issimpl": 51, "isvalid": 52, "iswithindist": 53, "kochsnowflak": 54, "largestemptycircl": 55, "linedissolv": 56, "linemerg": 57, "list": 58, "locatepoint": 59, "maximuminscribedcircl": 60, "mincircl": 61, "minclear": 62, "mindiamet": 63, "minrect": 64, "mortoncurv": 65, "narrow": 66, "nearestpoint": 67, "node": 68, "normal": 69, "octagonalenvelop": 70, "offsetcurv": 71, "overlap": 72, "pipe": 73, "placepoint": 74, "pointatangl": 75, "pointsalong": 76, "polygon": 77, "project": 78, "random": 79, "randomwalk": 80, "rectangl": 81, "reduceprecis": 82, "reflect": 83, "relat": 84, "revers": 85, "rotat": 86, "scale": 87, "shear": 88, "sierpinskicarpet": 89, "similar": 90, "simplifi": 91, "sinestar": 92, "slice": 93, "snap": 94, "split": 95, "spoke": 96, "squircl": 97, "startpoint": 98, "sublin": 99, "supercircl": 100, "symdiffer": 101, "text": 102, "touch": 103, "towkb": 104, "translat": 105, "type": 106, "union": 107, "variablebuff": 108, "version": 109, "voronoi": 110, "within": 111, "geometri": 112, "document": 112, "indic": 112, "tabl": 112, "instal": 113, "usag": 114}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"Commands": [[0, "commands"]], "angle": [[1, "angle"]], "arc": [[2, "arc"]], "arcpoly": [[3, "arcpoly"]], "area": [[4, "area"]], "asciiart": [[5, "asciiart"]], "boundary": [[6, "boundary"]], "buffer": [[7, "buffer"]], "centroid": [[8, "centroid"]], "closelinestring": [[9, "closelinestring"]], "combine": [[10, "combine"]], "concaveHull": [[11, "concavehull"]], "concaveHullOfPolygons": [[12, "concavehullofpolygons"]], "contains": [[13, "contains"]], "convexHull": [[14, "convexhull"]], "coordinates": [[15, "coordinates"]], "count": [[16, "count"]], "countpoints": [[17, "countpoints"]], "coveredby": [[18, "coveredby"]], "covers": [[19, "covers"]], "crosses": [[20, "crosses"]], "delaunay": [[21, "delaunay"]], "densify": [[22, "densify"]], "difference": [[23, "difference"]], "dimension": [[24, "dimension"]], "disjoint": [[25, "disjoint"]], "distance": [[26, "distance"]], "distanceline": [[27, "distanceline"]], "draw": [[28, "draw"]], "drawbase64": [[29, "drawbase64"]], "dump": [[30, "dump"]], "ellipse": [[31, "ellipse"]], "endpoint": [[32, "endpoint"]], "envelope": [[33, "envelope"]], "equals": [[34, "equals"]], "fix": [[35, "fix"]], "fromwkb": [[36, "fromwkb"]], "get": [[37, "get"]], "grid": [[38, "grid"]], "hausdorffdistance": [[39, "hausdorffdistance"]], "help": [[40, "help"]], "hilbertcurve": [[41, "hilbertcurve"]], "interiorpoint": [[42, "interiorpoint"]], "interpolatepoint": [[43, "interpolatepoint"]], "intersection": [[44, "intersection"]], "intersects": [[45, "intersects"]], "isccw": [[46, "isccw"]], "isclosed": [[47, "isclosed"]], "isempty": [[48, "isempty"]], "isrectangle": [[49, "isrectangle"]], "isring": [[50, "isring"]], "issimple": [[51, "issimple"]], "isvalid": [[52, "isvalid"]], "iswithindistance": [[53, "iswithindistance"]], "kochsnowflake": [[54, "kochsnowflake"]], "largestemptycircle": [[55, "largestemptycircle"]], "linedissolve": [[56, "linedissolve"]], "linemerge": [[57, "linemerge"]], "list": [[58, "list"]], "locatepoint": [[59, "locatepoint"]], "maximuminscribedcircle": [[60, "maximuminscribedcircle"]], "mincircle": [[61, "mincircle"]], "minclearance": [[62, "minclearance"]], "mindiameter": [[63, "mindiameter"]], "minrect": [[64, "minrect"]], "mortoncurve": [[65, "mortoncurve"]], "narrow": [[66, "narrow"]], "nearestpoints": [[67, "nearestpoints"]], "node": [[68, "node"]], "normalize": [[69, "normalize"]], "octagonalenvelope": [[70, "octagonalenvelope"]], "offsetCurve": [[71, "offsetcurve"]], "overlaps": [[72, "overlaps"]], "pipe": [[73, "pipe"]], "placepoint": [[74, "placepoint"]], "pointatangle": [[75, "pointatangle"]], "pointsalong": [[76, "pointsalong"]], "polygonize": [[77, "polygonize"]], "project": [[78, "project"]], "random": [[79, "random"]], "randomwalk": [[80, "randomwalk"]], "rectangle": [[81, "rectangle"]], "reduceprecision": [[82, "reduceprecision"]], "reflect": [[83, "reflect"]], "relate": [[84, "relate"]], "reverse": [[85, "reverse"]], "rotate": [[86, "rotate"]], "scale": [[87, "scale"]], "shear": [[88, "shear"]], "sierpinskicarpet": [[89, "sierpinskicarpet"]], "similarity": [[90, "similarity"]], "simplify": [[91, "simplify"]], "sinestar": [[92, "sinestar"]], "slice": [[93, "slice"]], "snap": [[94, "snap"]], "split": [[95, "split"]], "spoke": [[96, "spoke"]], "squircle": [[97, "squircle"]], "startpoint": [[98, "startpoint"]], "subline": [[99, "subline"]], "supercircle": [[100, "supercircle"]], "symdifference": [[101, "symdifference"]], "text": [[102, "text"]], "touches": [[103, "touches"]], "towkb": [[104, "towkb"]], "translate": [[105, "translate"]], "type": [[106, "type"]], "union": [[107, "union"]], "variablebuffer": [[108, "variablebuffer"]], "version": [[109, "version"]], "voronoi": [[110, "voronoi"]], "within": [[111, "within"]], "Geometry Commands": [[112, "geometry-commands"]], "Command Documentation": [[112, "command-documentation"]], "Indices and tables": [[112, "indices-and-tables"]], "Install": [[113, "install"]], "Usage": [[114, "usage"]]}, "indexentries": {}}) \ No newline at end of file diff --git a/src/assembly/dir.xml b/src/assembly/dir.xml deleted file mode 100644 index cfcfe323..00000000 --- a/src/assembly/dir.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - app - - dir - - - geom-${project.version} - - - /lib - false - runtime - true - - - - - / - - bin/geom* - - - - / - - README - LICENSE - - - - diff --git a/src/assembly/zip.xml b/src/assembly/zip.xml deleted file mode 100644 index a0a19903..00000000 --- a/src/assembly/zip.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - app - - zip - - geom-${project.version} - - - / - ${basedir}/target/geometrycommands-${project.version}-app/geom-${project.version} - - README - LICENSE - bin/* - lib/* - - - - diff --git a/src/main/java/org/geometrycommands/App.java b/src/main/java/org/geometrycommands/App.java deleted file mode 100644 index fcb3353b..00000000 --- a/src/main/java/org/geometrycommands/App.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.geometrycommands; - -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringWriter; -import java.io.Writer; -import java.util.ServiceLoader; -import org.kohsuke.args4j.CmdLineParser; - -/** - * The command line application - * @author Jared Erickson - */ -public class App { - - /** - * Run the command line application - * @param args The arguments from the command line - */ - public static void main(String[] args) { - - // The usage - final String usage = "Usage: geom "; - - // Check for an argument (the command name is required) - if (args.length == 0) { - System.err.println("Please enter a geometry command!"); - System.err.println(usage); - System.exit(-1); - } - - // Get the command name - String name = args[0]; - - // Lookup the Command by name - Command command = null; - final ServiceLoader commandServiceLoader = ServiceLoader.load(Command.class); - for (Command cmd : commandServiceLoader) { - if (cmd.getName().equalsIgnoreCase(name)) { - command = cmd; - break; - } - } - - // If we couldn't find the Command error out - if (command == null) { - System.err.println("Unknown geometry command: '" + name + "'!"); - System.err.println(usage); - System.exit(-1); - } - - // Get the empty command line POJO - Options options = command.getOptions(); - - // Fill the command line POJO using args4j's CmdLineParser - CmdLineParser cmdLineParser = new CmdLineParser(options); - try { - // Parse the arguments - cmdLineParser.parseArgument(args); - // Print help for the command - if (options.isHelp()) { - System.out.println("geom " + command.getName() + ": " + command.getDescription()); - cmdLineParser.printUsage(System.out); - } else { - // If there are no errors, execute the command - Reader reader = new InputStreamReader(System.in); - Writer writer = new StringWriter(); - command.execute(options, reader, writer); - writer.flush(); - String output = ((StringWriter)writer).getBuffer().toString(); - if (!output.isEmpty()) { - System.out.println(output); - } - } - } catch (Exception e) { - // Print help for the command (if required options are not present) - if (options.isHelp()) { - System.out.println("geom " + command.getName() + ": " + command.getDescription()); - cmdLineParser.printUsage(System.out); - } else { - // Oops, display the error messages to the user - System.err.println(e.getMessage()); - System.err.println("Usage: geom "); - cmdLineParser.printUsage(System.err); - } - - } - } -} diff --git a/src/main/java/org/geometrycommands/ArcCommand.java b/src/main/java/org/geometrycommands/ArcCommand.java deleted file mode 100644 index 1228f43c..00000000 --- a/src/main/java/org/geometrycommands/ArcCommand.java +++ /dev/null @@ -1,135 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.util.GeometricShapeFactory; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.ArcCommand.ArcOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to create an arc linestring - * @author Jared Erickson - */ -public class ArcCommand extends ShapeFactoryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "arc"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Creates an arc linestring from a start angle and an angle extent."; - } - - /** - * Get the ArcOptions - * @return The ArcOptions - */ - @Override - public ArcOptions getOptions() { - return new ArcOptions(); - } - - /** - * Create an arc linestring - * @param shapeFactory The preconfigured GeometricShapeFactory - * @param geometry The input Geometry - * @param options The ArcOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometryWithGeometricShapeFactory(GeometricShapeFactory shapeFactory, Geometry geometry, ArcOptions options, Reader reader, Writer writer) throws Exception { - double startAngle = options.getStartAngle(); - double angleExtent = options.getAngleExtent(); - if (options.isDegrees()) { - startAngle = Math.toRadians(startAngle); - angleExtent = Math.toRadians(angleExtent); - } - Geometry outputGeometry = shapeFactory.createArc(startAngle, angleExtent); - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * The ArcOptions - */ - public static class ArcOptions extends ShapeFactoryOptions { - - /** - * The start angle (in radians) - */ - @Option(name = "-a", aliases = "--startAngle", usage = "The start angle (in radians)", required = true) - private double startAngle; - - /** - * The size of angle (in radians) - */ - @Option(name = "-e", aliases = "--angleExtent", usage = "The size of angle (in radians)", required = true) - private double angleExtent; - - /** - * The flag for whether given angle measures are in degrees (true) or radians (false) - */ - @Option(name = "-d", aliases="-degrees", usage = "The flag for whether given angle measures are in degrees (true) or radians (false)", required = false) - private boolean degrees; - - /** - * Get the flag for whether given angle measures are in degrees (true) or radians (false) - * @return The flag for whether given angle measures are in degrees (true) or radians (false) - */ - public boolean isDegrees() { - return degrees; - } - - /** - * Set the flag for whether given angle measures are in degrees (true) or radians (false) - * @param degrees The flag for whether given angle measures are in degrees (true) or radians (false) - */ - public void setDegrees(boolean degrees) { - this.degrees = degrees; - } - - /** - * Get the size of angle (in radians) - * @return The size of angle (in radians) - */ - public double getAngleExtent() { - return angleExtent; - } - - /** - * Set the size of angle (in radians) - * @param angleExtent The size of angle (in radians) - */ - public void setAngleExtent(double angleExtent) { - this.angleExtent = angleExtent; - } - - /** - * Get the start angle (in radians) - * @return The start angle (in radians) - */ - public double getStartAngle() { - return startAngle; - } - - /** - * Set the start angle (in radians) - * @param startAngle The start angle (in radians) - */ - public void setStartAngle(double startAngle) { - this.startAngle = startAngle; - } - } -} diff --git a/src/main/java/org/geometrycommands/ArcPolygonCommand.java b/src/main/java/org/geometrycommands/ArcPolygonCommand.java deleted file mode 100644 index b6ec0442..00000000 --- a/src/main/java/org/geometrycommands/ArcPolygonCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.util.GeometricShapeFactory; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.ArcPolygonCommand.ArcPolygonOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to create an arc polygon - * @author Jared Erickson - */ -public class ArcPolygonCommand extends ShapeFactoryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "arcpoly"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Creates an arc polygon from a start angle and an angle extent."; - } - - - /** - * Get the ArcPolygonOptions - * @return The ArcPolygonOptions - */ - @Override - public ArcPolygonOptions getOptions() { - return new ArcPolygonOptions(); - } - - /** - * Create an arc polygon - * @param shapeFactory The preconfigured GeometricShapeFactory - * @param geometry The input Geometry - * @param options The ArcPolygonOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometryWithGeometricShapeFactory(GeometricShapeFactory shapeFactory, Geometry geometry, ArcPolygonOptions options, Reader reader, Writer writer) throws Exception { - double startAngle = options.getStartAngle(); - double angleExtent = options.getAngleExtent(); - if (options.isDegrees()) { - startAngle = Math.toRadians(startAngle); - angleExtent = Math.toRadians(angleExtent); - } - Geometry outputGeometry = shapeFactory.createArcPolygon(startAngle, angleExtent); - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * The ArcPolygonOptions - */ - public static class ArcPolygonOptions extends ShapeFactoryOptions { - - /** - * The start angle (in radians) - */ - @Option(name = "-a", aliases = "--startAngle", usage = "The start angle (in radians)", required = true) - private double startAngle; - - /** - * The size of angle (in radians) - */ - @Option(name = "-e", aliases= "--angleExtent", usage = "The size of angle (in radians)", required = true) - private double angleExtent; - - /** - * The flag for whether given angle measures are in degrees (true) or radians (false) - */ - @Option(name = "-d", aliases = "--degrees", usage = "The flag for whether given angle measures are in degrees (true) or radians (false)", required = false) - private boolean degrees; - - /** - * Get the flag for whether given angle measures are in degrees (true) or radians (false) - * @return The flag for whether given angle measures are in degrees (true) or radians (false) - */ - public boolean isDegrees() { - return degrees; - } - - /** - * Set the flag for whether given angle measures are in degrees (true) or radians (false) - * @param degrees The flag for whether given angle measures are in degrees (true) or radians (false) - */ - public void setDegrees(boolean degrees) { - this.degrees = degrees; - } - - /** - * Get the size of angle (in radians) - * @return The size of angle (in radians) - */ - public double getAngleExtent() { - return angleExtent; - } - - /** - * Set the size of angle (in radians) - * @param angleExtent The size of angle (in radians) - */ - public void setAngleExtent(double angleExtent) { - this.angleExtent = angleExtent; - } - - /** - * Get the start angle (in radians) - * @return The start angle (in radians) - */ - public double getStartAngle() { - return startAngle; - } - - /** - * Set the start angle (in radians) - * @param startAngle The start angle (in radians) - */ - public void setStartAngle(double startAngle) { - this.startAngle = startAngle; - } - } -} diff --git a/src/main/java/org/geometrycommands/AreaCommand.java b/src/main/java/org/geometrycommands/AreaCommand.java deleted file mode 100644 index 1d56a140..00000000 --- a/src/main/java/org/geometrycommands/AreaCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * Calculate the area of a Geometry - * @author Jared Erickson - */ -public class AreaCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "area"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the area of a Geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Calculate the area of a Geometry - * @param geometry The Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - double distance = geometry.getArea(); - writer.write(String.valueOf(distance)); - } -} diff --git a/src/main/java/org/geometrycommands/BoundaryCommand.java b/src/main/java/org/geometrycommands/BoundaryCommand.java deleted file mode 100644 index 9a6e5ad7..00000000 --- a/src/main/java/org/geometrycommands/BoundaryCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command for calculating the boundary of a Geometry. - * @author Jared Erickson - */ -public class BoundaryCommand extends GeometryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "boundary"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the boundary of a Geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Calculate the boundary of the input geometry - * @param geometry The input geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry = geometry.getBoundary(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/BufferCommand.java b/src/main/java/org/geometrycommands/BufferCommand.java deleted file mode 100644 index f2ebe5ac..00000000 --- a/src/main/java/org/geometrycommands/BufferCommand.java +++ /dev/null @@ -1,168 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.operation.buffer.BufferOp; -import com.vividsolutions.jts.operation.buffer.BufferParameters; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.BufferCommand.BufferOptions; -import org.kohsuke.args4j.Option; - -/** - * Buffer a Geometry by a distance. - * @author Jared Erickson - */ -public class BufferCommand extends GeometryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "buffer"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Buffer a geometry by a distance."; - } - - /** - * Get a new BufferOptions - * @return The new BufferOptions - */ - @Override - public BufferOptions getOptions() { - return new BufferOptions(); - } - - /** - * Buffer a Geometry by a distance. - * @param geometry The Geometry - * @param options The BufferOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, BufferOptions options, Reader reader, Writer writer) throws Exception { - int capStyle; - if (options.getEndCapStyle().equalsIgnoreCase("butt") - || options.getEndCapStyle().equalsIgnoreCase("flat")) { - capStyle = BufferParameters.CAP_FLAT; - } else if (options.getEndCapStyle().equalsIgnoreCase("square")) { - capStyle = BufferParameters.CAP_SQUARE; - } else { - capStyle = BufferParameters.CAP_ROUND; - } - - BufferParameters params = new BufferParameters(); - params.setSingleSided(options.isSingleSided()); - params.setQuadrantSegments(options.getQuadrantSegements()); - params.setEndCapStyle(capStyle); - - BufferOp bufferOp = new BufferOp(geometry, params); - Geometry bufferedGeometry = bufferOp.getResultGeometry(options.getDistance()); - - writer.write(writeGeometry(bufferedGeometry, options)); - } - - /** - * Options for the BufferCommand - */ - public static class BufferOptions extends GeometryOptions { - - /** - * The buffer distance - */ - @Option(name = "-d", aliases = "--distance", usage = "The buffer distance", required = true) - private double distance; - - /** - * The number of quadrant segments - */ - @Option(name = "-q", aliases = "--quadrantSegments", usage = "The number of quadrant segments", required = false) - private int quadrantSegements = 8; - - /** - * The end cap style (round, flat/butt, square) - */ - @Option(name = "-c", aliases = "--endCapStyle", usage = "The end cap style (round, flat/butt, square)", required = false) - private String endCapStyle = "round"; - - /** - * The flag for whether the buffer should be single sided - */ - @Option(name = "-s", aliases = "--singleSided", usage = "The flag for whether the buffer should be single sided", required = false) - private boolean singleSided; - - /** - * Get the buffer distance - * @return The buffer distance - */ - public double getDistance() { - return distance; - } - - /** - * Set the buffer distance - * @param distance The buffer distance - */ - public void setDistance(double distance) { - this.distance = distance; - } - - /** - * Get the end cap style (round, flat/butt, square) - * @return The end cap style (round, flat/butt, square) - */ - public String getEndCapStyle() { - return endCapStyle; - } - - /** - * Set the end cap style (round, flat/butt, square) - * @param endCapStyle The end cap style (round, flat/butt, square) - */ - public void setEndCapStyle(String endCapStyle) { - this.endCapStyle = endCapStyle; - } - - /** - * Get the number of quadrant segments - * @return The number of quadrant segments - */ - public int getQuadrantSegements() { - return quadrantSegements; - } - - /** - * Set the number of quadrant segments - * @param quadrantSegements The number of quadrant segments - */ - public void setQuadrantSegements(int quadrantSegements) { - this.quadrantSegements = quadrantSegements; - } - - /** - * Get the flag for whether the buffer should be single sided - * @return The flag for whether the buffer should be single sided - */ - public boolean isSingleSided() { - return singleSided; - } - - /** - * Set the flag for whether the buffer should be single sided - * @param singleSided The flag for whether the buffer should be single sided - */ - public void setSingleSided(boolean singleSided) { - this.singleSided = singleSided; - } - } -} diff --git a/src/main/java/org/geometrycommands/CentroidCommand.java b/src/main/java/org/geometrycommands/CentroidCommand.java deleted file mode 100644 index 4d8f5610..00000000 --- a/src/main/java/org/geometrycommands/CentroidCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command for calculating the centroind of a Geometry. - * @author Jared Erickson - */ -public class CentroidCommand extends GeometryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "centroid"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the centroid of a Geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Calculate the centroid of the input geometry - * @param geometry The input geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry = geometry.getCentroid(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/CombineCommand.java b/src/main/java/org/geometrycommands/CombineCommand.java deleted file mode 100644 index e6b72b77..00000000 --- a/src/main/java/org/geometrycommands/CombineCommand.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.util.GeometryCombiner; -import com.vividsolutions.jts.io.WKTReader; -import java.io.BufferedReader; -import java.io.Reader; -import java.io.Writer; -import java.util.ArrayList; -import java.util.List; - -/** - * A Command that takes Geometries on separate lines and creates a GeometryCollection - * from them. - * @author Jared Erickson - */ -public class CombineCommand implements Command { - - /** - * The WKTReader - */ - private final WKTReader wktReader = new WKTReader(); - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "combine"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Combine geometries on separate lines to create a GeometryCollection."; - } - - /** - * Get the Options - * @return The Options - */ - @Override - public Options getOptions() { - return new Options(); - } - - /** - * Collect all Geometries on separate lines and create a GeometryCollection. - * @param options The Options - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - public void execute(Options options, Reader reader, Writer writer) throws Exception { - List geometries = new ArrayList(); - BufferedReader bReader = new BufferedReader(reader); - String str; - while ((str = bReader.readLine()) != null) { - geometries.add(wktReader.read(str)); - } - GeometryCombiner combiner = new GeometryCombiner(geometries); - Geometry outputGeometry = combiner.combine(); - writer.write(outputGeometry.toText()); - } -} diff --git a/src/main/java/org/geometrycommands/Command.java b/src/main/java/org/geometrycommands/Command.java deleted file mode 100644 index 8be52f9a..00000000 --- a/src/main/java/org/geometrycommands/Command.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.geometrycommands; - -/** - * The base interface for all Commands. - * @param The Options - * @author Jared Erickson - */ -public interface Command { - - /** - * Get the Command's name - * @return The Command's name - */ - public String getName(); - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - public String getDescription(); - - /** - * Get a new Options - * @return A new Options - */ - public T getOptions(); - - /** - * Execute this Command with the given Options - * @param options The Options - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - public void execute(T options, java.io.Reader reader, java.io.Writer writer) throws Exception; -} diff --git a/src/main/java/org/geometrycommands/ContainsCommand.java b/src/main/java/org/geometrycommands/ContainsCommand.java deleted file mode 100644 index 29060c59..00000000 --- a/src/main/java/org/geometrycommands/ContainsCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to calculate whether the first geometry contains the other geometry - * @author Jared Erickson - */ -public class ContainsCommand extends OtherGeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "contains"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate whether the first geometry contains the other geometry."; - } - - /** - * Get the new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate whether the first geometry contains the other geometry - * @param geometry The input geometry - * @param other The other geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean contains = geometry.contains(other); - writer.write(String.valueOf(contains)); - } -} diff --git a/src/main/java/org/geometrycommands/ConvexHullCommand.java b/src/main/java/org/geometrycommands/ConvexHullCommand.java deleted file mode 100644 index 862d6f41..00000000 --- a/src/main/java/org/geometrycommands/ConvexHullCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to calculate the convex hull of the input geometry - * @author Jared Erickson - */ -public class ConvexHullCommand extends GeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "convexHull"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the convex hull of a Geometry."; - } - - /** - * Get the new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Calculate the convex hull of the input geometry - * @param geometry The input geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry = geometry.convexHull(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/CoordinatesCommand.java b/src/main/java/org/geometrycommands/CoordinatesCommand.java deleted file mode 100644 index 95e79e7d..00000000 --- a/src/main/java/org/geometrycommands/CoordinatesCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to get the Coordinates of the input Geometry. - * @author Jared Erickson - */ -public class CoordinatesCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "coordinates"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Get the coordinates of the geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Get the coordinates of the input Geometry - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - Coordinate[] coords = geometry.getCoordinates(); - Geometry outputGeometry = geometry.getFactory().createMultiPoint(coords); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/CountGeometriesCommand.java b/src/main/java/org/geometrycommands/CountGeometriesCommand.java deleted file mode 100644 index 3ea988e0..00000000 --- a/src/main/java/org/geometrycommands/CountGeometriesCommand.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to count the number of Geometries in the input Geometry - * @author Jared Erickson - */ -public class CountGeometriesCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "count"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Count the number of geometries in the input geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Count the number of Geometries in the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - writer.write(String.valueOf(geometry.getNumGeometries())); - } -} diff --git a/src/main/java/org/geometrycommands/CountPointsCommand.java b/src/main/java/org/geometrycommands/CountPointsCommand.java deleted file mode 100644 index 4158fabb..00000000 --- a/src/main/java/org/geometrycommands/CountPointsCommand.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to count the number of Points in the input Geometry - * @author Jared Erickson - */ -public class CountPointsCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "countpoints"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Count the number of Points in the input Geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Count the number of Points in the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - writer.write(String.valueOf(geometry.getNumPoints())); - } -} diff --git a/src/main/java/org/geometrycommands/CoveredByCommand.java b/src/main/java/org/geometrycommands/CoveredByCommand.java deleted file mode 100644 index 0b79c59a..00000000 --- a/src/main/java/org/geometrycommands/CoveredByCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to calculate whether the first geometry is covered the other geometry. - * @author Jared Erickson - */ -public class CoveredByCommand extends OtherGeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "coveredby"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine whether the first geometry is covered by the other geometry."; - } - - /** - * Get the new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate whether the first geometry is covered the other geometry. - * @param geometry The input geometry - * @param other The other geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean coveredBy = geometry.coveredBy(other); - writer.write(String.valueOf(coveredBy)); - } -} diff --git a/src/main/java/org/geometrycommands/CoversCommand.java b/src/main/java/org/geometrycommands/CoversCommand.java deleted file mode 100644 index 953f3b10..00000000 --- a/src/main/java/org/geometrycommands/CoversCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to calculate whether the first geometry covers the other geometry. - * @author Jared Erickson - */ -public class CoversCommand extends OtherGeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "covers"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine whether the first geometry covers the other geometry."; - } - - /** - * Get the new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate whether the first geometry covers the other geometry. - * @param geometry The input geometry - * @param other The other geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean covers = geometry.covers(other); - writer.write(String.valueOf(covers)); - } -} diff --git a/src/main/java/org/geometrycommands/CrossesCommand.java b/src/main/java/org/geometrycommands/CrossesCommand.java deleted file mode 100644 index 520c7e1c..00000000 --- a/src/main/java/org/geometrycommands/CrossesCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to calculate whether one geometry crosses another - * @author Jared Erickson - */ -public class CrossesCommand extends OtherGeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "crosses"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine whether the first geometry crosses the other geometry."; - } - - /** - * Get the new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate whether the first geometry crosses the other geometry. - * @param geometry The input geometry - * @param other The other geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean crosses = geometry.crosses(other); - writer.write(String.valueOf(crosses)); - } -} diff --git a/src/main/java/org/geometrycommands/DelaunayTriangulationCommand.java b/src/main/java/org/geometrycommands/DelaunayTriangulationCommand.java deleted file mode 100644 index 87e2b8e0..00000000 --- a/src/main/java/org/geometrycommands/DelaunayTriangulationCommand.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.triangulate.ConformingDelaunayTriangulationBuilder; -import com.vividsolutions.jts.triangulate.DelaunayTriangulationBuilder; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.DelaunayTriangulationCommand.DelaunayTriangulationOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command that generates a Delaunay Triangulation for the input Geometry. - * @author Jared Erickson - */ -public class DelaunayTriangulationCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "delaunay"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Generate a delaunay triangulation of the input geometry."; - } - - /** - * Get a new DelaunayTriangulationOptions - * @return A new DelaunayTriangulationOptions - */ - @Override - public DelaunayTriangulationOptions getOptions() { - return new DelaunayTriangulationOptions(); - } - - /** - * Calculate a Delaunay Triangulation of the input Geometry - * @param geometry The input Geometry - * @param options The DelaunayTriangulationOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, DelaunayTriangulationOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry; - if (options.isConforming()) { - ConformingDelaunayTriangulationBuilder builder = new ConformingDelaunayTriangulationBuilder(); - builder.setSites(geometry); - outputGeometry = builder.getTriangles(geometry.getFactory()); - } else { - DelaunayTriangulationBuilder builder = new DelaunayTriangulationBuilder(); - builder.setSites(geometry); - outputGeometry = builder.getTriangles(geometry.getFactory()); - } - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * Options for the DelaunayTriangulationCommand - */ - public static class DelaunayTriangulationOptions extends GeometryOptions { - - /** - * The flag for whether to use conforming algorithm - */ - @Option(name = "-c", aliases = "--conforming", usage = "The flag for whether to use conforming algorithm", required = false) - private boolean conforming; - - /** - * Get the flag for whether to use conforming algorithm - * @return The flag for whether to use conforming algorithm - */ - public boolean isConforming() { - return conforming; - } - - /** - * Set the flag for whether to use conforming algorithm - * @param conforming The flag for whether to use conforming algorithm - */ - public void setConforming(boolean conforming) { - this.conforming = conforming; - } - } -} diff --git a/src/main/java/org/geometrycommands/DensifyCommand.java b/src/main/java/org/geometrycommands/DensifyCommand.java deleted file mode 100644 index 7b4fcf6a..00000000 --- a/src/main/java/org/geometrycommands/DensifyCommand.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.densify.Densifier; -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.DensifyCommand.DensifyOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to densify the Coordinates of the input Geometry - * @author Jared Erickson - */ -public class DensifyCommand extends GeometryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "densify"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Densify the coordinates of the input geometry."; - } - - /** - * Get a new DensifyOptions - * @return A new DensifyOptions - */ - @Override - public DensifyOptions getOptions() { - return new DensifyOptions(); - } - - /** - * Densify the Geometry - * @param geometry The input Geometry - * @param options The DensifyOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, DensifyOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry = Densifier.densify(geometry, options.getDistanceTolerance()); - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * The DensifyOptions - */ - public static class DensifyOptions extends GeometryOptions { - - /** - * The distance tolerance - */ - @Option(name="-d", aliases = "--distance", usage="The distance tolerance", required=true) - private double distanceTolerance; - - /** - * Get the distance tolerance - * @return The distance tolerance - */ - public double getDistanceTolerance() { - return distanceTolerance; - } - - /** - * Set the distance tolerance - * @param distanceTolerance The distance tolerance - */ - public void setDistanceTolerance(double distanceTolerance) { - this.distanceTolerance = distanceTolerance; - } - } -} diff --git a/src/main/java/org/geometrycommands/DifferenceCommand.java b/src/main/java/org/geometrycommands/DifferenceCommand.java deleted file mode 100644 index 5a656076..00000000 --- a/src/main/java/org/geometrycommands/DifferenceCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command for calculating the difference between two Geometries - * @author jericks - */ -public class DifferenceCommand extends OtherGeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "difference"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the difference between the input geometries."; - } - - /** - * Get the new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate the difference between two Geometries - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry differenceGeometry = geometry.difference(other); - writer.write(writeGeometry(differenceGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/DiscreteHausdorffDistanceCommand.java b/src/main/java/org/geometrycommands/DiscreteHausdorffDistanceCommand.java deleted file mode 100644 index 97c0980b..00000000 --- a/src/main/java/org/geometrycommands/DiscreteHausdorffDistanceCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.algorithm.distance.DiscreteHausdorffDistance; -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * Calculate the discrete hausdorff distance between two Geometries - * @author Jared Erickson - */ -public class DiscreteHausdorffDistanceCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "hausdorffdistance"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the discrete hausdorff distance between the two input geometries."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate the discrete hausdorff distance between two Geometries - * @param geometry The Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - double distance = DiscreteHausdorffDistance.distance(geometry, other); - writer.write(String.valueOf(distance)); - } -} diff --git a/src/main/java/org/geometrycommands/DisjointCommand.java b/src/main/java/org/geometrycommands/DisjointCommand.java deleted file mode 100644 index ea86a45f..00000000 --- a/src/main/java/org/geometrycommands/DisjointCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * Determine whether the first geometry is disjoint from the other geometry. - * @author Jared Erickson - */ -public class DisjointCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "disjoint"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine whether the first geometry is disjoint from the other geometry."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Determine whether the first geometry is disjoint from the other geometry. - * @param geometry The Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean disjoint = geometry.disjoint(other); - writer.write(String.valueOf(disjoint)); - } -} diff --git a/src/main/java/org/geometrycommands/DistanceCommand.java b/src/main/java/org/geometrycommands/DistanceCommand.java deleted file mode 100644 index 7d4d6bd9..00000000 --- a/src/main/java/org/geometrycommands/DistanceCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * Calculate the distance between two Geometries - * @author Jared Erickson - */ -public class DistanceCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "distance"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the distance between the two input geometries."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate the distance between two Geometries - * @param geometry The Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - double distance = geometry.distance(other); - writer.write(String.valueOf(distance)); - } -} diff --git a/src/main/java/org/geometrycommands/DistanceLineStringCommand.java b/src/main/java/org/geometrycommands/DistanceLineStringCommand.java deleted file mode 100644 index 5beb3cc7..00000000 --- a/src/main/java/org/geometrycommands/DistanceLineStringCommand.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryFactory; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.operation.distance.DistanceOp; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to calculate a LineString representing the shortest distance between - * two geometries - * @author Jared Erickson - */ -public class DistanceLineStringCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "distanceline"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Generate a LineString representing the shortest distance between two geometries."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate a LineString representing the shortest distance between - * @param geometry The Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - DistanceOp op = new DistanceOp(geometry, other); - Coordinate[] coords = op.nearestPoints(); - GeometryFactory factory = new GeometryFactory(); - LineString line = factory.createLineString(coords); - writer.write(writeGeometry(line, options)); - } -} diff --git a/src/main/java/org/geometrycommands/DrawCommand.java b/src/main/java/org/geometrycommands/DrawCommand.java deleted file mode 100644 index 6cadedf3..00000000 --- a/src/main/java/org/geometrycommands/DrawCommand.java +++ /dev/null @@ -1,450 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.awt.PointShapeFactory; -import com.vividsolutions.jts.awt.PointTransformation; -import com.vividsolutions.jts.awt.ShapeWriter; -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Lineal; -import java.awt.AlphaComposite; -import java.awt.BasicStroke; -import java.awt.Color; -import java.awt.Composite; -import java.awt.Graphics2D; -import java.awt.Shape; -import java.awt.geom.Point2D; -import java.awt.image.BufferedImage; -import java.io.File; -import java.io.FileOutputStream; -import java.io.Reader; -import java.io.Writer; -import java.net.URL; -import javax.imageio.ImageIO; -import org.geometrycommands.DrawCommand.DrawOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to draw the input Geometry to an image File - * @author Jared Erickson - */ -public class DrawCommand extends GeometryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "draw"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Draw the input geometry to an image file."; - } - - /** - * Get a new DrawOptions - * @return A new DrawOptions - */ - @Override - public DrawOptions getOptions() { - return new DrawOptions(); - } - - /** - * Get a java.awt.Color from a String - * @param value A String value - * @return The java.awt.Color - */ - private Color getColor(String value) { - String[] parts = value.split(","); - int r = Integer.parseInt(parts[0]); - int g = Integer.parseInt(parts[1]); - int b = Integer.parseInt(parts[2]); - int a = 255; - if (parts.length > 3) { - a = Integer.parseInt(parts[3]); - } - return new Color(r, g, b, a); - } - - /** - * Draw the input Geometry to an image File - * @param geometry The input Geometry - * @param options The DrawOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - */ - @Override - protected void processGeometry(Geometry geometry, DrawOptions options, Reader reader, Writer writer) throws Exception { - - final int imageWidth = options.getWidth(); - final int imageHeight = options.getHeight(); - - BufferedImage image = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_ARGB); - Graphics2D g2d = image.createGraphics(); - g2d.setColor(getColor(options.getBackgroundColor())); - g2d.fillRect(0, 0, imageWidth, imageHeight); - - // Draw background image - if (options.getBackgroundImage() != null && options.getBackgroundImage().trim().length() > 0) { - String backgroundImagePath = options.getBackgroundImage().trim(); - BufferedImage backgroundImage; - if (backgroundImagePath.startsWith("http")) { - URL url = new URL(backgroundImagePath); - backgroundImage = ImageIO.read(url); - } - else { - File file = new File(backgroundImagePath); - backgroundImage = ImageIO.read(file); - } - g2d.drawImage(backgroundImage, 0, 0, null); - } - - final Envelope env = getEnvelope(geometry, options); - - Color strokeColor = getColor(options.getStrokeColor()); - Color fillColor = getColor(options.getFillColor()); - - String shape = options.getShape(); - double markerSize = options.getMarkerSize(); - PointShapeFactory pointShapeFactory; - if (shape.equalsIgnoreCase("circle")) { - pointShapeFactory = new PointShapeFactory.Circle(markerSize); - } else if (shape.equalsIgnoreCase("cross")) { - pointShapeFactory = new PointShapeFactory.Cross(markerSize); - } else if (shape.equalsIgnoreCase("star")) { - pointShapeFactory = new PointShapeFactory.Star(markerSize); - } else if (shape.equalsIgnoreCase("Triangle")) { - pointShapeFactory = new PointShapeFactory.Triangle(markerSize); - } else if (shape.equalsIgnoreCase("X")) { - pointShapeFactory = new PointShapeFactory.X(markerSize); - } else { - pointShapeFactory = new PointShapeFactory.Square(markerSize); - } - - float opacity = 0.75f; - float strokeWidth = 1.0f; - - ShapeWriter shapeWriter = new ShapeWriter(new PointTransformation() { - - @Override - public void transform(Coordinate coord, Point2D point) { - double imageX = (1 - (env.getMaxX() - coord.x) / env.getWidth()) * imageWidth; - double imageY = ((env.getMaxY() - coord.y) / env.getHeight()) * imageHeight; - point.setLocation(imageX, imageY); - } - }, pointShapeFactory); - - Composite strokeComposite = g2d.getComposite(); - Composite fillComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity); - - Shape shp = shapeWriter.toShape(geometry); - g2d.setComposite(fillComposite); - // Fill - if (!(geometry instanceof Lineal)) { - g2d.setComposite(fillComposite); - g2d.setColor(fillColor); - g2d.fill(shp); - } - // Stroke - g2d.setComposite(strokeComposite); - g2d.setStroke(new BasicStroke(strokeWidth)); - g2d.setColor(strokeColor); - g2d.draw(shp); - - if (options.isDrawingCoordinates()) { - g2d.setStroke(new BasicStroke(strokeWidth)); - Coordinate[] coords = geometry.getCoordinates(); - for (Coordinate c : coords) { - Shape coordinateShp = shapeWriter.toShape(geometry.getFactory().createPoint(c)); - // Fill - g2d.setComposite(fillComposite); - g2d.setColor(fillColor); - g2d.fill(coordinateShp); - // Stroke - g2d.setComposite(strokeComposite); - g2d.setColor(strokeColor); - g2d.draw(coordinateShp); - } - } - - g2d.dispose(); - - String fileName = options.getFile().getName(); - String imageFormat = fileName.substring(fileName.lastIndexOf(".") + 1); - FileOutputStream out = new FileOutputStream(options.getFile()); - ImageIO.write(image, imageFormat, out); - out.close(); - } - - /** - * Get an Envelope either from the Geometry or from the DrawOptions bounds property - * @param geometry The input Geometry - * @param options The DrawOptions - * @return An Envelope - */ - private Envelope getEnvelope(Geometry geometry, DrawOptions options) { - Envelope env; - String bounds = options.getBounds(); - if (bounds != null && bounds.split(",").length == 4) { - String[] parts = bounds.split(","); - double minX = Double.parseDouble(parts[0].trim()); - double minY = Double.parseDouble(parts[1].trim()); - double maxX = Double.parseDouble(parts[2].trim()); - double maxY = Double.parseDouble(parts[3].trim()); - env = new Envelope(minX, maxX, minY, maxY); - } else { - env = geometry.getEnvelopeInternal(); - env.expandBy(env.getWidth() * 0.1); - } - return env; - } - - /** - * The DrawOptions - */ - public static class DrawOptions extends GeometryOptions { - - /** - * The image width - */ - @Option(name = "-w", aliases = "--width", usage = "The image width", required = false) - private int width = 400; - - /** - * The image height - */ - @Option(name = "-h", aliases = "--height", usage = "The image height", required = false) - private int height = 400; - - /** - * The output File - */ - @Option(name = "-f", aliases = "--file", usage = "The output File", required = false) - private File file = new File("image.png"); - - /** - * The background Color - */ - @Option(name = "-b", aliases = "--background", usage = "The background color", required = false) - private String backgroundColor = "255,255,255"; - - /** - * The background image url or file - */ - @Option(name = "-i", aliases = "--backgroundImage", usage = "The background image url or file", required = false) - private String backgroundImage; - - /** - * The stroke Color - */ - @Option(name = "-s", aliases = "--stroke", usage = "The stroke Color", required = false) - private String strokeColor = "99,99,99"; - - /** - * The fill Color - */ - @Option(name = "-l", aliases = "--fill", usage = "The fill Color", required = false) - private String fillColor = "206,206,206,100"; - - /** - * The marker shape - */ - @Option(name = "-m", aliases = "--shape", usage = "The marker shape (circle, square, ect..)", required = false) - private String shape = "circle"; - - /** - * The marker size - */ - @Option(name = "-s", aliases = "--size", usage = "The marker size", required = false) - private double markerSize = 8; - - /** - * The flag for drawing coordinates or not - */ - @Option(name = "-c", aliases = "--drawCoords", usage = "The flag for drawing coordinates or not", required = false) - private boolean drawingCoordinates; - - /** - * The geographical bounds (minx, miny, maxx, maxy) - */ - @Option(name = "-e", aliases = "--envelope", usage = "The geographical bounds (minx, miny, maxx, maxy)", required = false) - private String bounds; - - /** - * Get the geographical bounds (minx, miny, maxx, maxy) - * @return The geographical bounds (minx, miny, maxx, maxy) - */ - public String getBounds() { - return bounds; - } - - /** - * Set the geographical bounds (minx, miny, maxx, maxy) - * @param bounds The geographical bounds (minx, miny, maxx, maxy) - */ - public void setBounds(String bounds) { - this.bounds = bounds; - } - - public String getBackgroundImage() { - return backgroundImage; - } - - public void setBackgroundImage(String backgroundImage) { - this.backgroundImage = backgroundImage; - } - - - /** - * Get the flag for drawing coordinates or not - * @return The flag for drawing coordinates or not - */ - public boolean isDrawingCoordinates() { - return drawingCoordinates; - } - - /** - * Set the flag for drawing coordinates or not - * @param drawingCoordinates The flag for drawing coordinates or not - */ - public void setDrawingCoordinates(boolean drawingCoordinates) { - this.drawingCoordinates = drawingCoordinates; - } - - /** - * Get the output File - * @return The output File - */ - public File getFile() { - return file; - } - - /** - * Set the output File - * @param file The output File - */ - public void setFile(File file) { - this.file = file; - } - - /** - * Get the marker size - * @return The marker size - */ - public double getMarkerSize() { - return markerSize; - } - - /** - * Set the marker size - * @param markerSize The marker size - */ - public void setMarkerSize(double markerSize) { - this.markerSize = markerSize; - } - - /** - * Get the image height - * @return The image height - */ - public int getHeight() { - return height; - } - - /** - * Set the image height - * @param height The image height - */ - public void setHeight(int height) { - this.height = height; - } - - /** - * Get the image width - * @return The image width - */ - public int getWidth() { - return width; - } - - /** - * Set the image width - * @param width The image width - */ - public void setWidth(int width) { - this.width = width; - } - - /** - * Get the background Color - * @return The background Color - */ - public String getBackgroundColor() { - return backgroundColor; - } - - /** - * Set the background Color - * @param backgroundColor The background Color - */ - public void setBackgroundColor(String backgroundColor) { - this.backgroundColor = backgroundColor; - } - - /** - * Get the fill Color - * @return The fill Color - */ - public String getFillColor() { - return fillColor; - } - - /** - * Set the fill Color - * @param fillColor The fill Color - */ - public void setFillColor(String fillColor) { - this.fillColor = fillColor; - } - - /** - * Get the stroke Color - * @return The stroke Color - */ - public String getStrokeColor() { - return strokeColor; - } - - /** - * Set the stroke Color - * @param strokeColor The stroke Color - */ - public void setStrokeColor(String strokeColor) { - this.strokeColor = strokeColor; - } - - /** - * Get the marker shape - * @return The marker shape - */ - public String getShape() { - return shape; - } - - /** - * Set the marker shape - * @param shape The marker shape - */ - public void setShape(String shape) { - this.shape = shape; - } - } -} diff --git a/src/main/java/org/geometrycommands/DumpCommand.java b/src/main/java/org/geometrycommands/DumpCommand.java deleted file mode 100644 index 5ecf55d8..00000000 --- a/src/main/java/org/geometrycommands/DumpCommand.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command that takes a GeometryCollection and puts each Geometry - * on it's own line. - * @author Jared Erickson - */ -public class DumpCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "dump"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Put each geometry from a GeometryCollection on it's own line."; - } - - /** - * Get the GeometryOptions - * @return The GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Write the input Geometry, one Geometry per line. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - write(geometry, options, writer); - } - - /** - * The new line string - */ - private final static String NEW_LINE = System.getProperty("line.separator"); - - /** - * Recursively write each sub Geometry to it's own line - * @param geometry The Geometry - * @param options The GeometryOptions - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - private void write(Geometry geometry, GeometryOptions options, Writer writer) throws Exception { - int num = geometry.getNumGeometries(); - if (num == 1) { - writer.write(writeGeometry(geometry, options)); - writer.write(NEW_LINE); - } - else { - for (int i = 0; i < num; i++) { - Geometry geom = geometry.getGeometryN(i); - write(geom, options, writer); - } - } - } - -} diff --git a/src/main/java/org/geometrycommands/EllipseCommand.java b/src/main/java/org/geometrycommands/EllipseCommand.java deleted file mode 100644 index 6055ebcb..00000000 --- a/src/main/java/org/geometrycommands/EllipseCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.util.GeometricShapeFactory; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to create an Ellipse or Circle - * @author Jared Erickson - */ -public class EllipseCommand extends ShapeFactoryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "ellipse"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create an ellipse of circle around the input geometry."; - } - - /** - * Get the ShapeFactoryOptions - * @return The ShapeFactoryOptions - */ - @Override - public ShapeFactoryOptions getOptions() { - return new ShapeFactoryOptions(); - } - - /** - * Create an Ellipse or Circle Geometry - * @param shapeFactory The preconfigured GeometricShapeFactory - * @param geometry The input Geometry - * @param options The ShapeFactoryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometryWithGeometricShapeFactory(GeometricShapeFactory shapeFactory, Geometry geometry, ShapeFactoryOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry = shapeFactory.createEllipse(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/EnvelopeCommand.java b/src/main/java/org/geometrycommands/EnvelopeCommand.java deleted file mode 100644 index fea37f70..00000000 --- a/src/main/java/org/geometrycommands/EnvelopeCommand.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.EnvelopeCommand.EnvelopeOptions; -import org.kohsuke.args4j.Option; - -/** - * Calculate the input Geometries Envelope - * @author Jared Erickson - */ -public class EnvelopeCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "envelope"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the envelope of a Geometry."; - } - - /** - * Get a new EnvelopeOptions - * @return A new EnvelopeOptions - */ - @Override - public EnvelopeOptions getOptions() { - return new EnvelopeOptions(); - } - - /** - * Calculate the input Geometries Envelope - * @param geometry The input Geometry - * @param options The EnvelopeOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, EnvelopeOptions options, Reader reader, Writer writer) throws Exception { - Envelope env = geometry.getEnvelopeInternal(); - if (options.getExpandBy() > 0) { - env.expandBy(options.getExpandBy()); - } - Geometry outputGeometry = geometry.getFactory().toGeometry(env); - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * The EnvelopeOptions - */ - public static class EnvelopeOptions extends GeometryOptions { - - /** - * The distance to expand the Envelope - */ - @Option(name = "-e", aliases = "--expandBy", usage = "The distance to expand the Envelope", required = false) - private double expandBy; - - /** - * Get the distance to expand the Envelope - * @return The distance to expand the Envelope - */ - public double getExpandBy() { - return expandBy; - } - - /** - * Set the distance to expand the Envelope - * @param expandBy The distance to expand the Envelope - */ - public void setExpandBy(double expandBy) { - this.expandBy = expandBy; - } - } -} diff --git a/src/main/java/org/geometrycommands/EqualsCommand.java b/src/main/java/org/geometrycommands/EqualsCommand.java deleted file mode 100644 index a0e951fc..00000000 --- a/src/main/java/org/geometrycommands/EqualsCommand.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.EqualsCommand.EqualsOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command that determines if the input Geometry equals the other Geometry. - * @author Jared Erickson - */ -public class EqualsCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "equals"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine whether the first geometry equals the second geometry."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public EqualsOptions getOptions() { - return new EqualsOptions(); - } - - /** - * Determine if the input Geometry equals the other Geometry. - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The EqualsOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, EqualsOptions options, Reader reader, Writer writer) throws Exception { - boolean equals; - if (options.getType() != null && options.getType().equalsIgnoreCase("exact")) { - if (options.getTolerance() > 0) { - equals = geometry.equalsExact(other, options.getTolerance()); - } else { - equals = geometry.equalsExact(other); - } - } else if (options.getType() != null && options.getType().equalsIgnoreCase("norm")) { - equals = geometry.equalsNorm(other); - } else if (options.getType() != null && options.getType().equalsIgnoreCase("topo")) { - equals = geometry.equalsTopo(other); - } else { - equals = geometry.equals(other); - } - writer.write(String.valueOf(equals)); - } - - /** - * The EqualsOptions - */ - public static class EqualsOptions extends OtherGeometryOptions { - - /** - * The type of equals (exact, norm, topo) - */ - @Option(name = "-t", aliases = "--type", usage = "The type of equals (exact, norm, topo)", required = false) - private String type; - - /** - * The tolerance when type is exact - */ - @Option(name = "-l", aliases = "--tolerance", usage = "The tolerance when type is exact", required = false) - private double tolerance; - - /** - * Get the type of equals (exact, norm, topo) - * @return The type of equals (exact, norm, topo) - */ - public String getType() { - return type; - } - - /** - * Set the type of equals (exact, norm, topo) - * @param type The type of equals (exact, norm, topo) - */ - public void setType(String type) { - this.type = type; - } - - /** - * Get the tolerance when type is exact - * @return The tolerance when type is exact - */ - public double getTolerance() { - return tolerance; - } - - /** - * Set the tolerance when type is exact - * @param tolerance The tolerance when type is exact - */ - public void setTolerance(double tolerance) { - this.tolerance = tolerance; - } - } -} diff --git a/src/main/java/org/geometrycommands/GeometryCommand.java b/src/main/java/org/geometrycommands/GeometryCommand.java deleted file mode 100644 index 39bfb0d1..00000000 --- a/src/main/java/org/geometrycommands/GeometryCommand.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.io.WKBReader; -import com.vividsolutions.jts.io.WKTReader; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.Writer; - -/** - * The base class Command that deals with at least one Geometry - * @param A GeometryOptions or subclass - * @author Jared Erickson - */ -public abstract class GeometryCommand implements Command { - - /** - * The WKTReader - */ - private final WKTReader wktReader = new WKTReader(); - - /** - * The WKBReader - */ - private final WKBReader wkbReader = new WKBReader(); - - /** - * Execute the Command against at least one input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - public void execute(T options, Reader reader, Writer writer) throws Exception { - // Get Geometry from the GeometryOption - Geometry geometry; - if (options.getGeometry() != null && options.getGeometry().trim().length() > 0) { - geometry = readGeometry(options.getGeometry(), options); - } else { - // Or Read it from the Standard Inputstream - BufferedReader inputStreamReader = new BufferedReader(new InputStreamReader(System.in)); - String str; - StringBuilder builder = new StringBuilder(); - while ((str = inputStreamReader.readLine()) != null) { - builder.append(str); - } - String text = builder.toString(); - geometry = wktReader.read(text); - } - // Process the Geometry - processGeometry(geometry, options, reader, writer); - } - - /** - * Read a Geometry. - * @param geometry A Geometry encoded as a String - * @param options The GeometryOptions - * @return The Geometry - * @throws Exception if an error occurs - */ - protected Geometry readGeometry(String geometry, T options) throws Exception { - return wktReader.read(geometry); - } - - /** - * Write a Geometry - * @param geometry A Geometry - * @param options The GeometryOptions - * @return The Geometry encoded as a String - * @throws Exception if an error occurs - */ - protected String writeGeometry(Geometry geometry, T options) throws Exception { - return geometry.toText(); - } - - /** - * Process the input Geometry - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - protected abstract void processGeometry(Geometry geometry, T options, Reader reader, Writer writer) throws Exception; - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public abstract String getName(); - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public abstract T getOptions(); -} diff --git a/src/main/java/org/geometrycommands/GeometryOptions.java b/src/main/java/org/geometrycommands/GeometryOptions.java deleted file mode 100644 index a8e654cf..00000000 --- a/src/main/java/org/geometrycommands/GeometryOptions.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.geometrycommands; - -import org.kohsuke.args4j.Option; - -/** - * An Options subclass that adds input Geometry. - * @author Jared Erickson - */ -public class GeometryOptions extends Options { - - /** - * The input geometry - */ - @Option(name = "-g", aliases = "--geometry", usage = "The input geometry", required = false) - private String geometry; - - /** - * Get the input geometry - * @return The input geometry - */ - public String getGeometry() { - return geometry; - } - - /** - * Set the input geometry - * @param geometry The input geometry - */ - public void setGeometry(String geometry) { - this.geometry = geometry; - } -} diff --git a/src/main/java/org/geometrycommands/GeometryTypeCommand.java b/src/main/java/org/geometrycommands/GeometryTypeCommand.java deleted file mode 100644 index 302b4368..00000000 --- a/src/main/java/org/geometrycommands/GeometryTypeCommand.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to get the geometry type of the input Geometry - * @author Jared Erickson - */ -public class GeometryTypeCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "type"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Get the type of the geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Count the number of Points in the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - writer.write(geometry.getGeometryType()); - } -} diff --git a/src/main/java/org/geometrycommands/GetEndPointCommand.java b/src/main/java/org/geometrycommands/GetEndPointCommand.java deleted file mode 100644 index b40bf8c4..00000000 --- a/src/main/java/org/geometrycommands/GetEndPointCommand.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.Lineal; -import com.vividsolutions.jts.geom.MultiLineString; -import com.vividsolutions.jts.geom.Point; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to get the end point of a LineString or a MultiLineString. - * @author Jared Erickson - */ -public class GetEndPointCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "endpoint"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Get the end point of a LineString or a MultiLineString."; - } - - /** - * Get the GeometryOptions - * @return The GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Get the end Point of a LineString or a MultiLineString - * @param geometry The Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs especially if the input Geometry is not Lineal - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - if (!(geometry instanceof Lineal)) { - throw new IllegalArgumentException("The input geometry a LineString or a MultiLineString!"); - } - LineString lineString; - if (geometry instanceof MultiLineString) { - int i = geometry.getNumGeometries() - 1; - lineString = (LineString)((MultiLineString)geometry).getGeometryN(i); - } - else { - lineString = (LineString)geometry; - } - Point point = lineString.getEndPoint(); - writer.write(writeGeometry(point, options)); - } -} diff --git a/src/main/java/org/geometrycommands/GetGeometryCommand.java b/src/main/java/org/geometrycommands/GetGeometryCommand.java deleted file mode 100644 index 56c9ab1b..00000000 --- a/src/main/java/org/geometrycommands/GetGeometryCommand.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.GetGeometryCommand.GetGeometryOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to get a sub Geometry from an input Geometry - * @author Jared Erickson - */ -public class GetGeometryCommand extends GeometryCommand{ - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "get"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Get a sub geometry from a geometry collection by index."; - } - - /** - * Get a new GetGeometryOptions - * @return A new GetGeometryOptions - */ - @Override - public GetGeometryOptions getOptions() { - return new GetGeometryOptions(); - } - - /** - * Get a sub Geometry from the input Geometry. - * @param geometry The input Geometry - * @param options The GetGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GetGeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry = geometry.getGeometryN(options.getIndex()); - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * The GetGeometryOptions - */ - public static class GetGeometryOptions extends GeometryOptions { - - /** - * The index number of the Geometry - */ - @Option(name="-n", aliases = "--index", usage="The index number of the Geometry", required=true) - private int index; - - /** - * Get the index number of the Geometry - * @return The index number of the Geometry - */ - public int getIndex() { - return index; - } - - /** - * Set the index number of the Geometry - * @param index The index number of the Geometry - */ - public void setIndex(int index) { - this.index = index; - } - - } - -} diff --git a/src/main/java/org/geometrycommands/GetStartPointCommand.java b/src/main/java/org/geometrycommands/GetStartPointCommand.java deleted file mode 100644 index 1a40115a..00000000 --- a/src/main/java/org/geometrycommands/GetStartPointCommand.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.Lineal; -import com.vividsolutions.jts.geom.MultiLineString; -import com.vividsolutions.jts.geom.Point; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to get the start point of a LineString or a MultiLineString. - * @author Jared Erickson - */ -public class GetStartPointCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "startpoint"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Get the start point of a LineString or MultiLineString."; - } - - /** - * Get the GeometryOptions - * @return The GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Get the start Point of a LineString or a MultiLineString - * @param geometry The Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs especially if the input Geometry is not Lineal - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - if (!(geometry instanceof Lineal)) { - throw new IllegalArgumentException("The input geometry a LineString or a MultiLineString!"); - } - LineString lineString; - if (geometry instanceof MultiLineString) { - lineString = (LineString)((MultiLineString)geometry).getGeometryN(0); - } - else { - lineString = (LineString)geometry; - } - Point point = lineString.getStartPoint(); - writer.write(writeGeometry(point, options)); - } -} diff --git a/src/main/java/org/geometrycommands/GridCommand.java b/src/main/java/org/geometrycommands/GridCommand.java deleted file mode 100644 index 5a37de37..00000000 --- a/src/main/java/org/geometrycommands/GridCommand.java +++ /dev/null @@ -1,144 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryFactory; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.GridCommand.GridOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to create a vector grid - * @author Jared Erickson - */ -public class GridCommand extends GeometryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "grid"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate a grid around the input geometry."; - } - - /** - * Get the GridOptions - * @return The GridOptions - */ - @Override - public GridOptions getOptions() { - return new GridOptions(); - } - - /** - * Create a vector grid - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GridOptions options, Reader reader, Writer writer) throws Exception { - - // Get the input Geometry's Envelope - Envelope env = geometry.getEnvelopeInternal(); - - // Extract the min X and Y - double minX = env.getMinX(); - double minY = env.getMinY(); - - // Calculate hte envelop's width and height - double w = env.getWidth(); - double h = env.getHeight(); - - // Get the number of columns and rows - int numberOfColumns = options.getNumberOfColumns(); - int numberOfRows = options.getNumberOfRows(); - - // Calculate the cell width and height - double cellWidth = w / options.getNumberOfColumns(); - double cellHeight = h / options.getNumberOfRows(); - - // Create the cells - GeometryFactory geometryFactory = new GeometryFactory(); - Geometry[] geoms = new Geometry[numberOfRows * numberOfColumns]; - int i = 0; - for (int r = 0; r < numberOfRows; r++) { - for (int c = 0; c < numberOfColumns; c++) { - double x = minX + (c * cellWidth); - double y = minY + (r * cellHeight); - Envelope e = new Envelope(x, x + cellWidth, y, y + cellHeight); - geoms[i] = geometryFactory.toGeometry(e); - i++; - } - } - - // Create the Geometry grid - Geometry grid = geometryFactory.createGeometryCollection(geoms); - - // Write the Geometry grid - writer.write(writeGeometry(grid, options)); - } - - /** - * The GridOptions - */ - public static class GridOptions extends GeometryOptions { - - /** - * The number of columns - */ - @Option(name = "-c", aliases = "--columns", usage = "The number of columns", required = true) - private int numberOfColumns; - - /** - * The number of rows - */ - @Option(name = "-r", aliases = "--rows", usage = "The number of rows", required = true) - private int numberOfRows; - - /** - * Get the number of columns - * @return The number of columns - */ - public int getNumberOfColumns() { - return numberOfColumns; - } - - /** - * Set the number of columns - * @param numberOfColumns The number of columns - */ - public void setNumberOfColumns(int numberOfColumns) { - this.numberOfColumns = numberOfColumns; - } - - /** - * Get the number of rows - * @return The number of rows - */ - public int getNumberOfRows() { - return numberOfRows; - } - - /** - * Set the number of rows - * @param numberOfRows The number of rows - */ - public void setNumberOfRows(int numberOfRows) { - this.numberOfRows = numberOfRows; - } - } -} diff --git a/src/main/java/org/geometrycommands/InteriorPointCommand.java b/src/main/java/org/geometrycommands/InteriorPointCommand.java deleted file mode 100644 index 59a901d5..00000000 --- a/src/main/java/org/geometrycommands/InteriorPointCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to get the interior Point of the input Geometry - * @author Jared Erickson - */ -public class InteriorPointCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "interiorpoint"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the interior point of the input geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Get the interior point of the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry = geometry.getInteriorPoint(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/InterpolatePointCommand.java b/src/main/java/org/geometrycommands/InterpolatePointCommand.java deleted file mode 100644 index 610305ec..00000000 --- a/src/main/java/org/geometrycommands/InterpolatePointCommand.java +++ /dev/null @@ -1,97 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryFactory; -import com.vividsolutions.jts.geom.Lineal; -import com.vividsolutions.jts.geom.Point; -import com.vividsolutions.jts.linearref.LengthIndexedLine; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.InterpolatePointCommand.InterpolatePointOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to interpolate the location of a Point on the input linear Geometry given - * a percentage position along the Geometry. - * @author Jared Erickson - */ -public class InterpolatePointCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "interpolatepoint"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Interpolate the location of a point on the input linear geometry given a percentage position."; - } - - /** - * Get a new InterpolatePointOptions - * @return A new InterpolatePointOptions - */ - @Override - public InterpolatePointOptions getOptions() { - return new InterpolatePointOptions(); - } - - /** - * Interpolate the location of a Point on the input linear Geometry given - * a percentage position along the Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, InterpolatePointOptions options, Reader reader, Writer writer) throws Exception { - if (!(geometry instanceof Lineal)) { - throw new IllegalArgumentException("The input geometry a LineString or a MultiLineString!"); - } - LengthIndexedLine indexedLine = new LengthIndexedLine(geometry); - double length = geometry.getLength(); - Coordinate coord = indexedLine.extractPoint(options.getPosition() * length); - GeometryFactory factory = new GeometryFactory(); - Point point = factory.createPoint(coord); - writer.write(writeGeometry(point, options)); - } - - /** - * The InterpolatePointOptions - */ - public static class InterpolatePointOptions extends GeometryOptions { - - /** - * The position between 0 and 1 - */ - @Option(name = "-p", aliases = "--position", usage = "The position between 0 and 1", required = true) - private double position; - - /** - * Get the position between 0 and 1 - * @return The position between 0 and 1 - */ - public double getPosition() { - return position; - } - - /** - * Set the position between 0 and 1 - * @param position The position between 0 and 1 - */ - public void setPosition(double position) { - this.position = position; - } - } -} diff --git a/src/main/java/org/geometrycommands/IntersectionCommand.java b/src/main/java/org/geometrycommands/IntersectionCommand.java deleted file mode 100644 index 09cca490..00000000 --- a/src/main/java/org/geometrycommands/IntersectionCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * Calculate the intersection between two geometries. - * @author Jared Erickson - */ -public class IntersectionCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "intersection"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the intersection between two geometries."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate the intersection between the two geometries - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry intersectionGeometry = geometry.intersection(other); - writer.write(writeGeometry(intersectionGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/IntersectsCommand.java b/src/main/java/org/geometrycommands/IntersectsCommand.java deleted file mode 100644 index 911ad176..00000000 --- a/src/main/java/org/geometrycommands/IntersectsCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command that determines if the input Geometry intersects the other Geometry. - * @author Jared Erickson - */ -public class IntersectsCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "intersects"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the first geometry intersects the second geometry."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Determine if the input Geometry intersects the other Geometry. - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean intersects = geometry.intersects(other); - writer.write(String.valueOf(intersects)); - } -} diff --git a/src/main/java/org/geometrycommands/IsClosedCommand.java b/src/main/java/org/geometrycommands/IsClosedCommand.java deleted file mode 100644 index 2ac456c8..00000000 --- a/src/main/java/org/geometrycommands/IsClosedCommand.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.Lineal; -import com.vividsolutions.jts.geom.MultiLineString; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command that determines if the input Geometry is closed or not. - * @author Jared Erickson - */ -public class IsClosedCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "isclosed"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input geometry is closed or not."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Determine if the input Geometry is closed or not. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - if (!(geometry instanceof Lineal)) { - throw new IllegalArgumentException("Input geometry must be a LineString or a MultiLineString!"); - } - boolean closed = false; - if (geometry instanceof LineString) { - closed = ((LineString) geometry).isClosed(); - } else { - closed = ((MultiLineString) geometry).isClosed(); - } - writer.write(String.valueOf(closed)); - } -} diff --git a/src/main/java/org/geometrycommands/IsEmptyCommand.java b/src/main/java/org/geometrycommands/IsEmptyCommand.java deleted file mode 100644 index ad845b60..00000000 --- a/src/main/java/org/geometrycommands/IsEmptyCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command that determines if the input Geometry is empty or not. - * @author Jared Erickson - */ -public class IsEmptyCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "isempty"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input geometry is empty or not."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Determine if the input Geometry is empty or not. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean empty = geometry.isEmpty(); - writer.write(String.valueOf(empty)); - } -} diff --git a/src/main/java/org/geometrycommands/IsRectangleCommand.java b/src/main/java/org/geometrycommands/IsRectangleCommand.java deleted file mode 100644 index 2e553b3f..00000000 --- a/src/main/java/org/geometrycommands/IsRectangleCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command that determines if the input Geometry is a rectangle or not. - * @author Jared Erickson - */ -public class IsRectangleCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "isrectangle"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input geometry is rectangular or not."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Determine if the input Geometry is a rectangle or not. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean rectangle = geometry.isRectangle(); - writer.write(String.valueOf(rectangle)); - } -} diff --git a/src/main/java/org/geometrycommands/IsRingCommand.java b/src/main/java/org/geometrycommands/IsRingCommand.java deleted file mode 100644 index 5c28f6ec..00000000 --- a/src/main/java/org/geometrycommands/IsRingCommand.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command that determines if the input Geometry is a ring or not. - * @author Jared Erickson - */ -public class IsRingCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "isring"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input geometry is a ring or not."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Determine if the input Geometry is a ring or not. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - if (!(geometry instanceof LineString)) { - throw new IllegalArgumentException("Input geometry must be a LineString!"); - } - boolean isRing = ((LineString) geometry).isRing(); - writer.write(String.valueOf(isRing)); - } -} diff --git a/src/main/java/org/geometrycommands/IsSimpleCommand.java b/src/main/java/org/geometrycommands/IsSimpleCommand.java deleted file mode 100644 index 8156b64b..00000000 --- a/src/main/java/org/geometrycommands/IsSimpleCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command that determines if the input Geometry is simple or not. - * @author Jared Erickson - */ -public class IsSimpleCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "issimple"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input geometry is simple or not."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Determine if the input Geometry is simple or not. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean simple = geometry.isSimple(); - writer.write(String.valueOf(simple)); - } -} diff --git a/src/main/java/org/geometrycommands/IsValidCommand.java b/src/main/java/org/geometrycommands/IsValidCommand.java deleted file mode 100644 index 083091f3..00000000 --- a/src/main/java/org/geometrycommands/IsValidCommand.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryFactory; -import com.vividsolutions.jts.geom.Point; -import com.vividsolutions.jts.operation.valid.IsValidOp; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.IsValidCommand.IsValidOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command that determines if the input Geometry is valid or not. - * @author Jared Erickson - */ -public class IsValidCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "isvalid"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input geometry is valid or not."; - } - - /** - * Get a new IsValidOptions - * @return A new IsValidOptions - */ - @Override - public IsValidOptions getOptions() { - return new IsValidOptions(); - } - - /** - * Determine if the input Geometry is valid or not. - * @param geometry The input Geometry - * @param options The IsValidOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, IsValidOptions options, Reader reader, Writer writer) throws Exception { - IsValidOp op = new IsValidOp(geometry); - boolean valid = op.isValid(); - if (options.getType().equalsIgnoreCase("msg") || options.getType().equalsIgnoreCase("message")) { - writer.write(op.getValidationError().getMessage()); - } else if (options.getType().equalsIgnoreCase("loc") || options.getType().equalsIgnoreCase("location")) { - Coordinate coord = op.getValidationError().getCoordinate(); - GeometryFactory factory = new GeometryFactory(); - Point point = factory.createPoint(coord); - writer.write(writeGeometry(point, options)); - } else if (options.getType().equalsIgnoreCase("val") || options.getType().equalsIgnoreCase("validity")) { - writer.write(String.valueOf(valid)); - } else { - throw new IllegalArgumentException("Unknown type!"); - } - } - - /** - * The IsValidOptions - */ - public static class IsValidOptions extends GeometryOptions { - - /** - * The flag to show the validation error message, the error location, or validity (msg, loc, or val). - */ - @Option(name = "-t", aliases = "--type", usage = "The flag to show the validation error message, the error location, or validity (msg, loc, or val)", required = false) - private String type = "val"; - - /** - * Get the flag to show the validation error message, the error location, or validity (msg, loc, or val). - * @return The flag to show the validation error message, the error location, or validity (msg, loc, or val). - */ - public String getType() { - return type; - } - - /** - * Set the flag to show the validation error message, the error location, or validity (msg, loc, or val). - * @param type The flag to show the validation error message, the error location, or validity (msg, loc, or val). - */ - public void setType(String type) { - this.type = type; - } - } -} diff --git a/src/main/java/org/geometrycommands/IsWithinDistanceCommand.java b/src/main/java/org/geometrycommands/IsWithinDistanceCommand.java deleted file mode 100644 index ab7a77c8..00000000 --- a/src/main/java/org/geometrycommands/IsWithinDistanceCommand.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.IsWithinDistanceCommand.IsWithinDistanceOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to determine if the input Geometry is with in the given distance of the other Geometry. - * @author Jared Erickson - */ -public class IsWithinDistanceCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "iswithindistance"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input geometry is within the given distance of the other geometry."; - } - - /** - * Get a new IsWithinDistanceOptions - * @return A new IsWithinDistanceOptions - */ - @Override - public IsWithinDistanceOptions getOptions() { - return new IsWithinDistanceOptions(); - } - - /** - * Determine if the input Geometry is with in the given distance of the other Geometry. - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The IsWithinDistanceOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, IsWithinDistanceOptions options, Reader reader, Writer writer) throws Exception { - boolean isWithDistance = geometry.isWithinDistance(other, options.getDistance()); - writer.write(String.valueOf(isWithDistance)); - } - - /** - * IsWithinDistanceOptions - */ - public static class IsWithinDistanceOptions extends OtherGeometryOptions { - - /** - * The distance - */ - @Option(name = "-d", aliases = "--distance", usage = "The distance", required = true) - private double distance; - - /** - * Get the distance - * @return The distance - */ - public double getDistance() { - return distance; - } - - /** - * Set the distance - * @param distance The distance - */ - public void setDistance(double distance) { - this.distance = distance; - } - } -} diff --git a/src/main/java/org/geometrycommands/KochSnowflakeCommand.java b/src/main/java/org/geometrycommands/KochSnowflakeCommand.java deleted file mode 100644 index 26ddfa98..00000000 --- a/src/main/java/org/geometrycommands/KochSnowflakeCommand.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryFactory; -import com.vividsolutions.jts.shape.fractal.KochSnowflakeBuilder; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.KochSnowflakeCommand.KochSnowflakeOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to create a Koch snow flake as a Geometry. - * @author Jared Erickson - */ -public class KochSnowflakeCommand extends GeometryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "kochsnowflake"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Generate a koch snow flake."; - } - - /** - * Get the new KochSnowflakeOptions - * @return The new KochSnowflakeOptions - */ - @Override - public KochSnowflakeOptions getOptions() { - return new KochSnowflakeOptions(); - } - - /** - * Create a Koch snow flake as a Geometry. - * @param geometry The input Geometry - * @param options The KochSnowflakeOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, KochSnowflakeOptions options, Reader reader, Writer writer) throws Exception { - KochSnowflakeBuilder builder = new KochSnowflakeBuilder(new GeometryFactory()); - builder.setExtent(geometry.getEnvelopeInternal()); - builder.setNumPoints(options.getNumberOfPoints()); - Geometry outputGeometry = builder.getGeometry(); - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * The KochSnowflakeOptions - */ - public static class KochSnowflakeOptions extends GeometryOptions { - - /** - * The number of points. - */ - @Option(name = "-n", aliases = "--number", usage = "The number of points.", required = true) - private int numberOfPoints; - - /** - * Get the number of points. - * @return The number of points. - */ - public int getNumberOfPoints() { - return numberOfPoints; - } - - /** - * Set the number of points. - * @param numberOfPoints The number of points. - */ - public void setNumberOfPoints(int numberOfPoints) { - this.numberOfPoints = numberOfPoints; - } - } - -} diff --git a/src/main/java/org/geometrycommands/LineMergeCommand.java b/src/main/java/org/geometrycommands/LineMergeCommand.java deleted file mode 100644 index cf67634d..00000000 --- a/src/main/java/org/geometrycommands/LineMergeCommand.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.MultiLineString; -import com.vividsolutions.jts.operation.linemerge.LineMerger; -import java.io.Reader; -import java.io.Writer; -import java.util.Collection; - -/** - * A Command to merge the lines of the input Geometry. - * @author Jared Erickson - */ -public class LineMergeCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "linemerge"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Merge lines of the input geoemtry together."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Merge the lines of the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - LineMerger lineMerger = new LineMerger(); - int n = geometry.getNumGeometries(); - for (int i = 0; i < n; i++) { - Geometry g = geometry.getGeometryN(i); - lineMerger.add(g); - } - Collection lines = lineMerger.getMergedLineStrings(); - MultiLineString multiLineString = geometry.getFactory().createMultiLineString((LineString[]) lines.toArray(new LineString[]{})); - writer.write(writeGeometry(multiLineString, options)); - } -} diff --git a/src/main/java/org/geometrycommands/ListCommand.java b/src/main/java/org/geometrycommands/ListCommand.java deleted file mode 100644 index 79ea6d0d..00000000 --- a/src/main/java/org/geometrycommands/ListCommand.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.Writer; -import java.util.Iterator; -import java.util.ServiceLoader; - -/** - * List all Commands - * @author Jared Erickson - */ -public class ListCommand implements Command { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "list"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "List all of the geometry commands."; - } - - /** - * Get a new Options - * @return A new Options - */ - @Override - public Options getOptions() { - return new Options(); - } - - /** - * Get a List of all Geometry Commands - * @param options The Options - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - public void execute(Options options, Reader reader, Writer writer) throws Exception { - final ServiceLoader commandServiceLoader = ServiceLoader.load(Command.class); - String NEW_LINE = System.getProperty("line.separator"); - StringBuilder builder = new StringBuilder(); - for (Iterator it = commandServiceLoader.iterator(); it.hasNext();) { - Command cmd = it.next(); - builder.append(cmd.getName()); - if (it.hasNext()) { - builder.append(NEW_LINE); - } - } - writer.write(builder.toString()); - } -} diff --git a/src/main/java/org/geometrycommands/LocatePointCommand.java b/src/main/java/org/geometrycommands/LocatePointCommand.java deleted file mode 100644 index e7068804..00000000 --- a/src/main/java/org/geometrycommands/LocatePointCommand.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Lineal; -import com.vividsolutions.jts.geom.Point; -import com.vividsolutions.jts.linearref.LengthIndexedLine; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to locate the position of a Point on the input linear Geometry as a percentage of the distance. - * @author Jared Erickson - */ -public class LocatePointCommand extends OtherGeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "locatepoint"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Locate the position of a point on the linear geometry as a percentage of the distance."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Locate the position of a Point on the input linear Geometry as a percentage of the distance. - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - - Point point = null; - Geometry line = null; - - if (geometry instanceof Point) { - point = (Point)geometry; - }else if (other instanceof Point) { - point = (Point)other; - } - if (geometry instanceof Lineal) { - line = geometry; - }else if (other instanceof Lineal) { - line = other; - } - - if (point == null || line == null) { - throw new IllegalArgumentException("Please provide a Point and a Linear Geometry!"); - } - - LengthIndexedLine indexedLine = new LengthIndexedLine(line); - double position = indexedLine.indexOf(point.getCoordinate()); - double length = line.getLength(); - double percentAlong = position / length; - writer.write(String.valueOf(percentAlong)); - } - -} diff --git a/src/main/java/org/geometrycommands/MinimumBoundingCircleCommand.java b/src/main/java/org/geometrycommands/MinimumBoundingCircleCommand.java deleted file mode 100644 index 01efdea9..00000000 --- a/src/main/java/org/geometrycommands/MinimumBoundingCircleCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.algorithm.MinimumBoundingCircle; -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * Calculate the minimum bounding circle of the input Geometry. - * @author Jared Erickson - */ -public class MinimumBoundingCircleCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "mincircle"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the minimum bounding circle of the input geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Calculate the minimum bounding circle of the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - MinimumBoundingCircle circle = new MinimumBoundingCircle(geometry); - Geometry outputGeometry = circle.getCircle(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/MinimumClearanceCommand.java b/src/main/java/org/geometrycommands/MinimumClearanceCommand.java deleted file mode 100644 index 8595313d..00000000 --- a/src/main/java/org/geometrycommands/MinimumClearanceCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.precision.MinimumClearance; -import java.io.Reader; -import java.io.Writer; - -/** - * Calculate the minimum clearance of the input Geometry. - * @author Jared Erickson - */ -public class MinimumClearanceCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "minclearance"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the minimum clearance of the input geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Calculate the minimum clearance of the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - MinimumClearance minimumClearance = new MinimumClearance(geometry); - Geometry outputGeometry = minimumClearance.getLine(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/MinimumDiameterCommand.java b/src/main/java/org/geometrycommands/MinimumDiameterCommand.java deleted file mode 100644 index 7a53ab2f..00000000 --- a/src/main/java/org/geometrycommands/MinimumDiameterCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.algorithm.MinimumDiameter; -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * Calculate the minimum diameter of the input Geometry. - * @author Jared Erickson - */ -public class MinimumDiameterCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "mindiameter"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the minimum diameter of the input geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Calculate the minimum diameter of the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - MinimumDiameter minimumDiameter = new MinimumDiameter(geometry); - Geometry outputGeometry = minimumDiameter.getDiameter(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/MinimumRectangleCommand.java b/src/main/java/org/geometrycommands/MinimumRectangleCommand.java deleted file mode 100644 index 2aad5eb8..00000000 --- a/src/main/java/org/geometrycommands/MinimumRectangleCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.algorithm.MinimumDiameter; -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * Calculate the minimum rectangle of the input Geometry. - * @author Jared Erickson - */ -public class MinimumRectangleCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "minrect"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the minimum rectangle of the input geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Calculate the minimum rectangle of the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - MinimumDiameter minimumDiameter = new MinimumDiameter(geometry); - Geometry outputGeometry = minimumDiameter.getMinimumRectangle(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/NodeCommand.java b/src/main/java/org/geometrycommands/NodeCommand.java deleted file mode 100644 index 8050d30f..00000000 --- a/src/main/java/org/geometrycommands/NodeCommand.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.PrecisionModel; -import com.vividsolutions.jts.noding.snapround.GeometryNoder; -import java.io.Reader; -import java.io.Writer; -import java.util.ArrayList; -import java.util.List; -import org.geometrycommands.NodeCommand.NodeOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to node LineStrings from the input Geometry. - * @author jericks - */ -public class NodeCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "node"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Node the linestrings from the input geometry."; - } - - /** - * Get a new NodeOptions - * @return A new NodeOptions - */ - @Override - public NodeOptions getOptions() { - return new NodeOptions(); - } - - /** - * Node the LineStrings from the input Geometry. - * @param geometry The input Geometry - * @param options The NodeOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, NodeOptions options, Reader reader, Writer writer) throws Exception { - PrecisionModel precisionModel = new PrecisionModel(options.getNumberOfDecimalPlaces()); - GeometryNoder noder = new GeometryNoder(precisionModel); - List geometries = new ArrayList(); - for (int i = 0; i < geometry.getNumGeometries(); i++) { - geometries.add(geometry.getGeometryN(i)); - } - List lineStrings = noder.node(geometries); - Geometry nodedGeometry = geometry.getFactory().createMultiLineString((LineString[])lineStrings.toArray(new LineString[]{})); - writer.write(writeGeometry(nodedGeometry, options)); - } - - /** - * The NodeOpions - */ - public static class NodeOptions extends GeometryOptions { - - /** - * The number of decimal places - */ - @Option(name = "-n", aliases = "--number", usage = "The number of decimal places", required = true) - private int numberOfDecimalPlaces; - - /** - * Set the number of decimal places - * @return The number of decimal places - */ - public int getNumberOfDecimalPlaces() { - return numberOfDecimalPlaces; - } - - /** - * Get the number of decimal places - * @param numberOfDecimalPlaces The number of decimal places - */ - public void setNumberOfDecimalPlaces(int numberOfDecimalPlaces) { - this.numberOfDecimalPlaces = numberOfDecimalPlaces; - } - } -} diff --git a/src/main/java/org/geometrycommands/NormalizeCommand.java b/src/main/java/org/geometrycommands/NormalizeCommand.java deleted file mode 100644 index 6a488c40..00000000 --- a/src/main/java/org/geometrycommands/NormalizeCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to normalize the input Geometry - * @author Jared Erickson - */ -public class NormalizeCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "normalize"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the normalized version of the input geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Normalize the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry = geometry.norm(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/OctagonalEnvelopeCommand.java b/src/main/java/org/geometrycommands/OctagonalEnvelopeCommand.java deleted file mode 100644 index 0c12c29f..00000000 --- a/src/main/java/org/geometrycommands/OctagonalEnvelopeCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.OctagonalEnvelope; -import java.io.Reader; -import java.io.Writer; - -/** - * Calculate the octagonal envelope of the input Geometry. - * @author Jared Erickson - */ -public class OctagonalEnvelopeCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "octagonalenvelope"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the octagonal envelope of the input geometry."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Calculate the octagonal envelope of the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - OctagonalEnvelope octagonalEnvelope = new OctagonalEnvelope(geometry); - Geometry outputGeometry = octagonalEnvelope.toGeometry(geometry.getFactory()); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/Options.java b/src/main/java/org/geometrycommands/Options.java deleted file mode 100644 index 8b91750b..00000000 --- a/src/main/java/org/geometrycommands/Options.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import org.kohsuke.args4j.Argument; -import org.kohsuke.args4j.Option; - -/** - * The base class Options for all Commands - * @author Jared Erickson - */ -public class Options { - - /** - * The Command name - */ - @Argument(index = 0, required = true) - private String name; - - /** - * The flag to print the help message - */ - @Option(name = "--help", usage = "Print help message", required = false) - private boolean help; - - /** - * Get the Command name - * @return The Command name - */ - public String getName() { - return name; - } - - /** - * Set the Command name - * @param name The Command name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Get the flag to print the help message - * @return The flag to print the help message - */ - public boolean isHelp() { - return help; - } - - /** - * Set the flag to print the help message - * @param help The flag to print the help message - */ - public void setHelp(boolean help) { - this.help = help; - } -} diff --git a/src/main/java/org/geometrycommands/OtherGeometryCommand.java b/src/main/java/org/geometrycommands/OtherGeometryCommand.java deleted file mode 100644 index 605cb4e2..00000000 --- a/src/main/java/org/geometrycommands/OtherGeometryCommand.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command that executes against two Geometries. This is a good base class - * for predicates and overlays. - * @param The OtherGeometryOptions or subclass - * @author Jared Erickson - */ -public abstract class OtherGeometryCommand extends GeometryCommand { - - /** - * Execute with the given Geometry and Options - * @param geometry The input Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, T options, Reader reader, Writer writer) throws Exception { - Geometry otherGeometry = readGeometry(options.getOtherGeometry(), options); - processGeometries(geometry, otherGeometry, options, reader, writer); - } - - /** - * Process the input Geometry and another Geometry - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - protected abstract void processGeometries(Geometry geometry, Geometry other, T options, Reader reader, Writer writer) throws Exception; -} diff --git a/src/main/java/org/geometrycommands/OtherGeometryOptions.java b/src/main/java/org/geometrycommands/OtherGeometryOptions.java deleted file mode 100644 index 687b7a53..00000000 --- a/src/main/java/org/geometrycommands/OtherGeometryOptions.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.geometrycommands; - -import org.kohsuke.args4j.Option; - -/** - * An Options that adds an other Geometry for predicate or overlay operations. - * @author Jared Erickson - */ -public class OtherGeometryOptions extends GeometryOptions { - - /** - * The other Geometry - */ - @Option(name = "-o", aliases = "--otherGeometry", usage="The other geometry", required = true) - private String otherGeometry; - - /** - * Get the other Geometry - * @return The other Geometry - */ - public String getOtherGeometry() { - return otherGeometry; - } - - /** - * Set the other Geometry - * @param otherGeometry The other Geometry - */ - public void setOtherGeometry(String otherGeometry) { - this.otherGeometry = otherGeometry; - } -} diff --git a/src/main/java/org/geometrycommands/OverlapsCommand.java b/src/main/java/org/geometrycommands/OverlapsCommand.java deleted file mode 100644 index 525d0cc5..00000000 --- a/src/main/java/org/geometrycommands/OverlapsCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to calculate whether the first geometry overlaps the other geometry - * @author Jared Erickson - */ -public class OverlapsCommand extends OtherGeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "overlaps"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine whether the first geometry overlaps with the other geometry."; - } - - /** - * Get the new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate whether the first geometry overlaps the other geometry - * @param geometry The input geometry - * @param other The other geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean overlaps = geometry.overlaps(other); - writer.write(String.valueOf(overlaps)); - } -} diff --git a/src/main/java/org/geometrycommands/PlacePointCommand.java b/src/main/java/org/geometrycommands/PlacePointCommand.java deleted file mode 100644 index 603555f3..00000000 --- a/src/main/java/org/geometrycommands/PlacePointCommand.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryFactory; -import com.vividsolutions.jts.geom.Lineal; -import com.vividsolutions.jts.geom.Point; -import com.vividsolutions.jts.linearref.LengthIndexedLine; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to place a Point on the input linear Geometry. - * @author Jared Erickson - */ -public class PlacePointCommand extends OtherGeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "placepoint"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Place a point on the input linear geometry."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Locate a Point on the input linear Geometry. - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - - Point point = null; - Geometry line = null; - - if (geometry instanceof Point) { - point = (Point) geometry; - } else if (other instanceof Point) { - point = (Point) other; - } - if (geometry instanceof Lineal) { - line = geometry; - } else if (other instanceof Lineal) { - line = other; - } - - if (point == null || line == null) { - throw new IllegalArgumentException("Please provide a Point and a Linear Geometry!"); - } - - LengthIndexedLine indexedLine = new LengthIndexedLine(line); - double position = indexedLine.indexOf(point.getCoordinate()); - Coordinate coord = indexedLine.extractPoint(position); - GeometryFactory factory = new GeometryFactory(); - Point snappedPoint = factory.createPoint(coord); - writer.write(writeGeometry(snappedPoint, options)); - } -} diff --git a/src/main/java/org/geometrycommands/PointAtAngleCommand.java b/src/main/java/org/geometrycommands/PointAtAngleCommand.java deleted file mode 100644 index 2b6aa7f2..00000000 --- a/src/main/java/org/geometrycommands/PointAtAngleCommand.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Point; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.PointAtAngleCommand.PointAtAngleOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command for calculating a new Point at a given angle and distance from the input - * Point - * @author Jared Erickson - */ -public class PointAtAngleCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "pointatangle"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate a point at a given angle distance from the input point."; - } - - /** - * Get the PointAtAngleOptions - * @return The PointAtAngleOptions - */ - @Override - public PointAtAngleOptions getOptions() { - return new PointAtAngleOptions(); - } - - /** - * Calculating a new Point at a given angle and distance from the input Point - * @param geometry The input Geometry - * @param options The PointAtAngleOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, PointAtAngleOptions options, Reader reader, Writer writer) throws Exception { - Coordinate start = geometry.getCoordinate(); - double angleAsRadians = Math.toRadians(options.getAngle()); - double x = start.x + (options.getDistance() * Math.cos(angleAsRadians)); - double y = start.y + (options.getDistance() * Math.sin(angleAsRadians)); - Coordinate newCoordinate = new Coordinate(x, y); - Point point = geometry.getFactory().createPoint(newCoordinate); - writer.write(writeGeometry(point, options)); - } - - /** - * The PointAtAngleOptions - */ - public static class PointAtAngleOptions extends GeometryOptions { - - /** - * The distance - */ - @Option(name = "-d", aliases = "--distance", usage = "The distance", required = true) - private double distance; - - /** - * The angle (in degrees). - */ - @Option(name = "-a", aliases = "--angle", usage = "The angle (in degrees)", required = true) - private int angle; - - /** - * Get the angle (in degrees) - * @return The angle (in degrees) - */ - public int getAngle() { - return angle; - } - - /** - * Set the angle (in degrees) - * @param angle The angle (in degrees) - */ - public void setAngle(int angle) { - this.angle = angle; - } - - /** - * Get the distance - * @return The distance - */ - public double getDistance() { - return distance; - } - - /** - * Set the distance - * @param distance The distance - */ - public void setDistance(double distance) { - this.distance = distance; - } - } -} diff --git a/src/main/java/org/geometrycommands/PolygonizeCommand.java b/src/main/java/org/geometrycommands/PolygonizeCommand.java deleted file mode 100644 index fdd75cd3..00000000 --- a/src/main/java/org/geometrycommands/PolygonizeCommand.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.MultiPolygon; -import com.vividsolutions.jts.geom.Polygon; -import com.vividsolutions.jts.operation.polygonize.Polygonizer; -import java.io.Reader; -import java.io.Writer; -import java.util.Collection; - -/** - * A Command to create Polygons from Lines - * @author jericks - */ -public class PolygonizeCommand extends GeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "polygonize"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Creates polygons from lines."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Create Polygons from the input Geometry. Often the input Geometry - * needs to be noded first. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - Polygonizer polygonizer = new Polygonizer(); - int n = geometry.getNumGeometries(); - for (int i = 0; i < n; i++) { - Geometry g = geometry.getGeometryN(i); - polygonizer.add(g); - } - Collection polygons = polygonizer.getPolygons(); - MultiPolygon multiPolygon = geometry.getFactory().createMultiPolygon((Polygon[]) polygons.toArray(new Polygon[]{})); - writer.write(writeGeometry(multiPolygon, options)); - } -} diff --git a/src/main/java/org/geometrycommands/PrecisionReducerCommand.java b/src/main/java/org/geometrycommands/PrecisionReducerCommand.java deleted file mode 100644 index b79331c8..00000000 --- a/src/main/java/org/geometrycommands/PrecisionReducerCommand.java +++ /dev/null @@ -1,167 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.PrecisionModel; -import com.vividsolutions.jts.precision.GeometryPrecisionReducer; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.PrecisionReducerCommand.PrecisionReducerOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command for reducing the precision of the input Geometry. - * @author Jared Erickson - */ -public class PrecisionReducerCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "reduceprecision"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Reduce the precision of the input geometry."; - } - - /** - * Get the PrecisionReducerOptions - * @return The PrecisionReducerOptions - */ - @Override - public PrecisionReducerOptions getOptions() { - return new PrecisionReducerOptions(); - } - - /** - * Reduce the precision of the input Geometry - * @param geometry The input Geometry - * @param options The PrecisionReducerOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, PrecisionReducerOptions options, Reader reader, Writer writer) throws Exception { - - PrecisionModel precisionModel = null; - if (options.getPrecisionModelType().equalsIgnoreCase("fixed")) { - precisionModel = new PrecisionModel(options.getPrecisionModelScale()); - } else if (options.getPrecisionModelType().equalsIgnoreCase("floating")) { - precisionModel = new PrecisionModel(PrecisionModel.FLOATING); - } else if (options.getPrecisionModelType().equalsIgnoreCase("floating_single")) { - precisionModel = new PrecisionModel(PrecisionModel.FLOATING_SINGLE); - } else { - throw new IllegalArgumentException("Unsupported Precision Model Type: '" + options.getPrecisionModelType() + "'!"); - } - - GeometryPrecisionReducer reducer = new GeometryPrecisionReducer(precisionModel); - reducer.setPointwise(options.isPointwise()); - reducer.setRemoveCollapsedComponents(options.isRemoveCollapsed()); - Geometry reducedGeoemtry = reducer.reduce(geometry); - - writer.write(writeGeometry(reducedGeoemtry, options)); - } - - /** - * The PrecisionReducerOptions - */ - public static class PrecisionReducerOptions extends GeometryOptions { - - /** - * The precision model type (FIXED, FLOATING, FLOATING_SINGLE) - */ - @Option(name = "-t", aliases = "--type", usage = "The precision model type (FIXED, FLOATING, FLOATING_SINGLE)", required = true) - private String precisionModelType; - - /** - * The precision model scale when type is FLOATING - */ - @Option(name = "-s", aliases = "--scale", usage = "The precision model scale when type is FLOATING", required = false) - private double precisionModelScale; - - /** - * Whether the precision reducer operates pointwise - */ - @Option(name = "-p", aliases = "--pointWise", usage = "Whether the precision reducer operates pointwise", required = false) - private boolean pointwise = false; - - /** - * Whether the precision reducer should remove collapsed geometry - */ - @Option(name = "-r", aliases = "--removeCollapsed", usage = "Whether the precision reducer should remove collapsed geometry", required = false) - private boolean removeCollapsed = false; - - /** - * Get whether the precision reducer operates pointwise - * @return Whether the precision reducer operates pointwise - */ - public boolean isPointwise() { - return pointwise; - } - - /** - * Set whether the precision reducer operates pointwise - * @param pointwise Whether the precision reducer operates pointwise - */ - public void setPointwise(boolean pointwise) { - this.pointwise = pointwise; - } - - /** - * Get the precision model scale when type is FLOATING - * @return The precision model scale when type is FLOATING - */ - public double getPrecisionModelScale() { - return precisionModelScale; - } - - /** - * Set the precision model scale when type is FLOATING - * @param precisionModelScale The precision model scale when type is FLOATING - */ - public void setPrecisionModelScale(double precisionModelScale) { - this.precisionModelScale = precisionModelScale; - } - - /** - * Get the precision model type (FIXED, FLOATING, FLOATING_SINGLE) - * @return The precision model type (FIXED, FLOATING, FLOATING_SINGLE) - */ - public String getPrecisionModelType() { - return precisionModelType; - } - - /** - * Set the precision model type (FIXED, FLOATING, FLOATING_SINGLE) - * @param precisionModelType The precision model type (FIXED, FLOATING, FLOATING_SINGLE) - */ - public void setPrecisionModelType(String precisionModelType) { - this.precisionModelType = precisionModelType; - } - - /** - * Get whether the precision reducer should remove collapsed geometry - * @return Whether the precision reducer should remove collapsed geometry - */ - public boolean isRemoveCollapsed() { - return removeCollapsed; - } - - /** - * Set whether the precision reducer should remove collapsed geometry - * @param removeCollapsed Whether the precision reducer should remove collapsed geometry - */ - public void setRemoveCollapsed(boolean removeCollapsed) { - this.removeCollapsed = removeCollapsed; - } - } -} diff --git a/src/main/java/org/geometrycommands/ProjectCommand.java b/src/main/java/org/geometrycommands/ProjectCommand.java deleted file mode 100644 index 2e1f79ac..00000000 --- a/src/main/java/org/geometrycommands/ProjectCommand.java +++ /dev/null @@ -1,263 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryCollection; -import com.vividsolutions.jts.geom.GeometryFactory; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.LinearRing; -import com.vividsolutions.jts.geom.MultiLineString; -import com.vividsolutions.jts.geom.MultiPoint; -import com.vividsolutions.jts.geom.MultiPolygon; -import com.vividsolutions.jts.geom.Point; -import com.vividsolutions.jts.geom.Polygon; -import java.io.Reader; -import java.io.Writer; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.geometrycommands.ProjectCommand.ProjectOptions; -import org.kohsuke.args4j.Option; -import org.osgeo.proj4j.CRSFactory; -import org.osgeo.proj4j.CoordinateReferenceSystem; -import org.osgeo.proj4j.CoordinateTransform; -import org.osgeo.proj4j.CoordinateTransformFactory; -import org.osgeo.proj4j.ProjCoordinate; - -/** - * A Command to project the input Geometry from one coordinate system to another - * @author Jared Erickson - */ -public class ProjectCommand extends GeometryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "project"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Project the input geometry from one coordinate system to another."; - } - - /** - * Get a new ProjectOptions - * @return The new ProjectOptions - */ - @Override - public ProjectOptions getOptions() { - return new ProjectOptions(); - } - - /** - * Project the input Geometry from one coordinate system to another - * @param geometry The Geometry - * @param options The ProjectOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, ProjectOptions options, Reader reader, Writer writer) throws Exception { - - CoordinateTransformFactory ctFactory = new CoordinateTransformFactory(); - CRSFactory csFactory = new CRSFactory(); - - CoordinateReferenceSystem sourceCrs; - if (isName(options.getSource())) { - sourceCrs = csFactory.createFromName(options.getSource()); - } else { - sourceCrs = csFactory.createFromParameters(null, options.getSource()); - } - CoordinateReferenceSystem targetCrs; - if (isName(options.getTarget())) { - targetCrs = csFactory.createFromName(options.getTarget()); - } else { - targetCrs = csFactory.createFromParameters(null, options.getTarget()); - } - - CoordinateTransform transform = ctFactory.createTransform(sourceCrs, targetCrs); - Geometry projectedGeometry = transformGeometry(transform, geometry); - writer.write(writeGeometry(projectedGeometry, options)); - } - - private boolean isName(String projString) { - final List authorities = new ArrayList(Arrays.asList(new String[]{"world", "nad83", "nad27", "esri", "epsg"})); - int i = projString.indexOf(":"); - if (i > -1) { - String authority = projString.substring(0, i).toLowerCase(); - String code = projString.substring(i + 1); - if (authority.trim().length() > 0 && code.trim().length() > 0) { - return authorities.contains(authority); - } - } - return false; - } - - private Geometry transformGeometry(CoordinateTransform transform, Geometry g) { - if (g instanceof Point) { - return transformPoint(transform, (Point) g); - } else if (g instanceof LinearRing) { - return transformLinearRing(transform, (LinearRing) g); - } else if (g instanceof LineString) { - return transformLineString(transform, (LineString) g); - } else if (g instanceof Polygon) { - return transformPolygon(transform, (Polygon) g); - } else if (g instanceof MultiPoint) { - return transformMultiPoint(transform, (MultiPoint) g); - } else if (g instanceof MultiPoint) { - return transformMultiPoint(transform, (MultiPoint) g); - } else if (g instanceof MultiLineString) { - return transformMultiLineString(transform, (MultiLineString) g); - } else if (g instanceof MultiPolygon) { - return transformMultiPolygon(transform, (MultiPolygon) g); - } else if (g instanceof GeometryCollection) { - return transformGeometryCollection(transform, (GeometryCollection) g); - } else { - return g; - } - } - - private Coordinate transformCoordinate(CoordinateTransform transform, Coordinate c) { - ProjCoordinate in = new ProjCoordinate(c.x, c.y); - ProjCoordinate out = new ProjCoordinate(); - transform.transform(in, out); - return new Coordinate(out.x, out.y); - } - - private Coordinate[] transformCoordinates(CoordinateTransform transform, Coordinate[] coords) { - Coordinate[] projectedCoords = new Coordinate[coords.length]; - for (int i = 0; i < coords.length; i++) { - projectedCoords[i] = transformCoordinate(transform, coords[i]); - } - return projectedCoords; - } - - private Point transformPoint(CoordinateTransform transform, Point pt) { - Coordinate c = transformCoordinate(transform, pt.getCoordinate()); - return pt.getFactory().createPoint(c); - } - - private MultiPoint transformMultiPoint(CoordinateTransform transform, MultiPoint mp) { - int num = mp.getNumGeometries(); - Point[] points = new Point[num]; - for (int i = 0; i < num; i++) { - points[i] = transformPoint(transform, (Point) mp.getGeometryN(i)); - } - return mp.getFactory().createMultiPoint(points); - } - - private LineString transformLineString(CoordinateTransform transform, LineString line) { - Coordinate[] coords = line.getCoordinates(); - Coordinate[] projectedCoords = new Coordinate[coords.length]; - for (int i = 0; i < coords.length; i++) { - projectedCoords[i] = transformCoordinate(transform, coords[i]); - } - return line.getFactory().createLineString(projectedCoords); - } - - private LinearRing transformLinearRing(CoordinateTransform transform, LinearRing ring) { - Coordinate[] coords = ring.getCoordinates(); - Coordinate[] projectedCoords = new Coordinate[coords.length]; - for (int i = 0; i < coords.length; i++) { - projectedCoords[i] = transformCoordinate(transform, coords[i]); - } - return ring.getFactory().createLinearRing(projectedCoords); - } - - private MultiLineString transformMultiLineString(CoordinateTransform transform, MultiLineString ml) { - int num = ml.getNumGeometries(); - LineString[] lines = new LineString[num]; - for (int i = 0; i < num; i++) { - lines[i] = transformLineString(transform, (LineString) ml.getGeometryN(i)); - } - return ml.getFactory().createMultiLineString(lines); - } - - private Polygon transformPolygon(CoordinateTransform transform, Polygon polygon) { - GeometryFactory factory = polygon.getFactory(); - LinearRing shell = factory.createLinearRing(transformCoordinates(transform, polygon.getExteriorRing().getCoordinates())); - int num = polygon.getNumInteriorRing(); - LinearRing[] holes = new LinearRing[num]; - for (int i = 0; i < num; i++) { - holes[i] = factory.createLinearRing(transformCoordinates(transform, polygon.getInteriorRingN(i).getCoordinates())); - } - return polygon.getFactory().createPolygon(shell, holes); - } - - private MultiPolygon transformMultiPolygon(CoordinateTransform transform, MultiPolygon ml) { - int num = ml.getNumGeometries(); - Polygon[] polygons = new Polygon[num]; - for (int i = 0; i < num; i++) { - polygons[i] = transformPolygon(transform, (Polygon) ml.getGeometryN(i)); - } - return ml.getFactory().createMultiPolygon(polygons); - } - - private GeometryCollection transformGeometryCollection(CoordinateTransform transform, GeometryCollection gc) { - int num = gc.getNumGeometries(); - Geometry[] geometries = new Geometry[num]; - for (int i = 0; i < num; i++) { - geometries[i] = transformGeometry(transform, (Geometry) gc.getGeometryN(i)); - } - return gc.getFactory().createGeometryCollection(geometries); - } - - /** - * Options for the ProjectOptions - */ - public static class ProjectOptions extends GeometryOptions { - - /** - * The source projection - */ - @Option(name = "-s", aliases = "--source", usage = "The source projection", required = true) - private String source; - - /** - * The target projection - */ - @Option(name = "-t", aliases = "--target", usage = "The target projection", required = true) - private String target; - - /** - * Get the source projection - * @return The source projection - */ - public String getSource() { - return source; - } - - /** - * Set the source projection - * @param source The source projection - */ - public void setSource(String source) { - this.source = source; - } - - /** - * Get the target projection - * @return The target projection - */ - public String getTarget() { - return target; - } - - /** - * Set the target projection - * @param target The target projection - */ - public void setTarget(String target) { - this.target = target; - } - } -} diff --git a/src/main/java/org/geometrycommands/RandomCommand.java b/src/main/java/org/geometrycommands/RandomCommand.java deleted file mode 100644 index 49f05a79..00000000 --- a/src/main/java/org/geometrycommands/RandomCommand.java +++ /dev/null @@ -1,174 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Polygonal; -import com.vividsolutions.jts.shape.random.RandomPointsBuilder; -import com.vividsolutions.jts.shape.random.RandomPointsInGridBuilder; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.RandomCommand.RandomOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command that generates random Points inside the input Geometry or Envelope - * @author Jared Erickson - */ -public class RandomCommand extends GeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "random"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Generate random points inside the input geometry."; - } - - /** - * Get a new RandomOptions - * @return The new RandomOptions - */ - @Override - public RandomOptions getOptions() { - return new RandomOptions(); - } - - /** - * Generate random Points inside the input Geometry or Envelope - * @param geometry The input Geometry - * @param options The RandomOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, RandomOptions options, Reader reader, Writer writer) throws Exception { - if (!(geometry instanceof Polygonal)) { - geometry = geometry.getEnvelope(); - } - if (!(geometry instanceof Polygonal)) { - throw new IllegalArgumentException("Geometry must be a Polygon or MultiPolygon!"); - } - Geometry randomGeometry; - if (options.isGridded()) { - RandomPointsInGridBuilder builder = new RandomPointsInGridBuilder(); - builder.setExtent(geometry.getEnvelopeInternal()); - builder.setNumPoints(options.getNumber()); - builder.setConstrainedToCircle(options.isConstrainedToCircle()); - if (!Double.isNaN(options.getGutterFraction())) { - builder.setGutterFraction(options.getGutterFraction()); - } - randomGeometry = builder.getGeometry(); - } else { - RandomPointsBuilder builder = new RandomPointsBuilder(); - builder.setExtent(geometry); - builder.setNumPoints(options.getNumber()); - randomGeometry = builder.getGeometry(); - } - - writer.write(writeGeometry(randomGeometry, options)); - } - - /** - * The RandomOptions - */ - public static class RandomOptions extends GeometryOptions { - - /** - * The number of points - */ - @Option(name = "-n", aliases = "--number", usage = "The number of points", required = true) - private int number; - - /** - * The flag for whether the random points should be gridded. - */ - @Option(name = "-r", aliases = "--gridded", usage = "The flag for whether the random points should be gridded.", required = false) - private boolean gridded; - - /** - * The flag for whether the random points should be constrained to a circle when gridded. - */ - @Option(name = "-c", aliases = "--constrained", usage = "The flag for whether the random points should be constrained to a circle when gridded.", required = false) - private boolean constrainedToCircle; - - /** - * The gutter distance or padding for random points when gridded. - */ - @Option(name = "-f", aliases = "--gutterFraction", usage = "The gutter distance or padding for random points when gridded.", required = false) - private double gutterFraction = Double.NaN; - - /** - * Get the number of points - * @return The number of points - */ - public int getNumber() { - return number; - } - - /** - * Set the number of points - * @param number The number of points - */ - public void setNumber(int number) { - this.number = number; - } - - /** - * Get the flag for whether the random points should be constrained to a circle when gridded. - * @return The flag for whether the random points should be constrained to a circle when gridded. - */ - public boolean isConstrainedToCircle() { - return constrainedToCircle; - } - - /** - * Set the flag for whether the random points should be constrained to a circle when gridded. - * @param constrainedToCircle The flag for whether the random points should be constrained to a circle when gridded. - */ - public void setConstrainedToCircle(boolean constrainedToCircle) { - this.constrainedToCircle = constrainedToCircle; - } - - /** - * Get the flag for whether the random points should be gridded. - * @return The flag for whether the random points should be gridded. - */ - public boolean isGridded() { - return gridded; - } - - /** - * Set the flag for whether the random points should be gridded. - * @param gridded The flag for whether the random points should be gridded. - */ - public void setGridded(boolean gridded) { - this.gridded = gridded; - } - - /** - * Get the gutter distance or padding for random points when gridded. - * @return The gutter distance or padding for random points when gridded. - */ - public double getGutterFraction() { - return gutterFraction; - } - - /** - * Set the gutter distance or padding for random points when gridded. - * @param gutterFraction The gutter distance or padding for random points when gridded. - */ - public void setGutterFraction(double gutterFraction) { - this.gutterFraction = gutterFraction; - } - } -} diff --git a/src/main/java/org/geometrycommands/RandomWalkCommand.java b/src/main/java/org/geometrycommands/RandomWalkCommand.java deleted file mode 100644 index d1467827..00000000 --- a/src/main/java/org/geometrycommands/RandomWalkCommand.java +++ /dev/null @@ -1,208 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import java.io.Reader; -import java.io.Writer; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import org.geometrycommands.RandomWalkCommand.RandomWalkOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to simulate a random walk - * @author Jared Erickson - */ -public class RandomWalkCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "randomwalk"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Generate a random walk as a linestring."; - } - - /** - * Get the RandomWalkOptions - * @return The RandomWalkOptions - */ - @Override - public RandomWalkOptions getOptions() { - return new RandomWalkOptions(); - } - - /** - * Generate a random walk - * @param geometry The input Geometry that serves as the starting Point - * @param options The RandomWalkOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, RandomWalkOptions options, Reader reader, Writer writer) throws Exception { - - Coordinate start = geometry.getCoordinate(); - - List coordinates = new ArrayList(); - coordinates.add(start); - - int previousAngle = -1; - Coordinate previousCoord = start; - int angleRange = 360 / options.getAngleIncrement(); - - for (int i = 0; i < options.getNumberOfWalks(); i++) { - Random random = new Random(); - double r = random.nextDouble(); - boolean changeDirection = (r <= options.getProbability()) ? true : false; - int angle = previousAngle; - if (previousAngle > -1 || changeDirection) { - while ((angle = random.nextInt(angleRange) * options.getAngleIncrement()) == getOpposite(previousAngle)) { - // Don't go back - } - } else { - angle = random.nextInt(angleRange) * options.getAngleIncrement(); - } - previousAngle = angle; - previousCoord = getCoordinateAtAngle(previousCoord, angle, options.getDistance()); - coordinates.add(previousCoord); - } - LineString lineString = geometry.getFactory().createLineString((Coordinate[]) coordinates.toArray(new Coordinate[]{})); - writer.write(writeGeometry(lineString, options)); - - } - - /** - * Get a new Coordinate at the given angle and distance from the input Coordinate - * @param coord The input Coordinate - * @param angle The angle (in degrees) - * @param distance The distance - * @return A new Coordinate - */ - private Coordinate getCoordinateAtAngle(Coordinate coord, double angle, double distance) { - double angleAsRadians = Math.toRadians(angle); - double x = coord.x + (distance * Math.cos(angleAsRadians)); - double y = coord.y + (distance * Math.sin(angleAsRadians)); - return new Coordinate(x, y); - } - - /** - * Get the opposite of the given angle - * @param angle The angle (in degrees) - * @return The opposite angle (+/- 180) - */ - private double getOpposite(double angle) { - if (angle >= 180) { - return angle - 180; - } else { - return 180 + angle; - } - } - - /** - * The RandomWalkOptions - */ - public static class RandomWalkOptions extends GeometryOptions { - - /** - * The number of walks - */ - @Option(name = "-n", aliases = "--number", usage = "The number of walks", required = true) - private int numberOfWalks; - - /** - * The distance between Coordinates - */ - @Option(name = "-d", aliases = "--distance", usage = "The distance between Coordinates", required = true) - private double distance; - - /** - * The probability of changing direction - */ - @Option(name = "-p", aliases = "--probability", usage = "The probability of changing direction", required = false) - private double probability = 0.75; - - /** - * The angle increment (in degrees) when changing direction. - */ - @Option(name = "-a", aliases = "--angle", usage = "The angle increment (in degrees) when changing direction", required = false) - private int angleIncrement = 90; - - /** - * Get the angle increment (in degrees) when changing direction. - * @return The angle increment (in degrees) when changing direction. - */ - public int getAngleIncrement() { - return angleIncrement; - } - - /** - * Set the angle increment (in degrees) when changing direction. - * @param angleIncrement The angle increment (in degrees) when changing direction. - */ - public void setAngleIncrement(int angleIncrement) { - this.angleIncrement = angleIncrement; - } - - /** - * Get the distance between Coordinates - * @return The distance between Coordinates - */ - public double getDistance() { - return distance; - } - - /** - * Set the distance between Coordinates - * @param distance The distance between Coordinates - */ - public void setDistance(double distance) { - this.distance = distance; - } - - /** - * Ge the number of walks - * @return The number of walks - */ - public int getNumberOfWalks() { - return numberOfWalks; - } - - /** - * Set the number of walks - * @param numberOfWalks The number of walks - */ - public void setNumberOfWalks(int numberOfWalks) { - this.numberOfWalks = numberOfWalks; - } - - /** - * Get the probability of changing direction - * @return The probability of changing direction - */ - public double getProbability() { - return probability; - } - - /** - * Set the probability of changing direction - * @param probability The probability of changing direction - */ - public void setProbability(double probability) { - this.probability = probability; - } - } -} diff --git a/src/main/java/org/geometrycommands/RectangleCommand.java b/src/main/java/org/geometrycommands/RectangleCommand.java deleted file mode 100644 index e44b1e35..00000000 --- a/src/main/java/org/geometrycommands/RectangleCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.util.GeometricShapeFactory; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to create a Rectangle - * @author Jared Erickson - */ -public class RectangleCommand extends ShapeFactoryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "rectangle"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a rectangle from the input geometry."; - } - - /** - * Get the ShapeFactoryOptions - * @return The ShapeFactoryOptions - */ - @Override - public ShapeFactoryOptions getOptions() { - return new ShapeFactoryOptions(); - } - - /** - * Create a Rectangle Geometry - * @param shapeFactory The preconfigured GeometricShapeFactory - * @param geometry The input Geometry - * @param options The ShapeFactoryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometryWithGeometricShapeFactory(GeometricShapeFactory shapeFactory, Geometry geometry, ShapeFactoryOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry = shapeFactory.createRectangle(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/ReflectCommand.java b/src/main/java/org/geometrycommands/ReflectCommand.java deleted file mode 100644 index eb90a5df..00000000 --- a/src/main/java/org/geometrycommands/ReflectCommand.java +++ /dev/null @@ -1,156 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.util.AffineTransformation; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.ReflectCommand.ReflectOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command that performs the reflect affine transformation on the input Geometry. - * @author Jared Erickson - */ -public class ReflectCommand extends GeometryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "reflect"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a new geometry by applying the reflect affine transformation on the input geometry."; - } - - /** - * Get a new ReflectOptions - * @return The new ReflectOptions - */ - @Override - public ReflectOptions getOptions() { - return new ReflectOptions(); - } - - /** - * Perform the reflect affine transformation on the input Geometry. - * @param geometry The input Geometry - * @param options The ReflectOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, ReflectOptions options, Reader reader, Writer writer) throws Exception { - AffineTransformation transformation; - if (!Double.isNaN(options.getX1()) && !Double.isNaN(options.getY1())) { - transformation = AffineTransformation.reflectionInstance(options.getX0(), options.getY0(), options.getX1(), options.getY1()); - } else { - transformation = AffineTransformation.reflectionInstance(options.getX0(), options.getY0()); - } - Geometry reflectedGeometry = transformation.transform(geometry); - writer.write(writeGeometry(reflectedGeometry, options)); - } - - /** - * The ReflectOptions - */ - public static class ReflectOptions extends GeometryOptions { - - /** - * The x-ordinate of a point on the reflection line - */ - @Option(name="-0", aliases = "--x0", usage = "The x-ordinate of a point on the reflection line", required = true) - private double x0; - - /** - * The y-ordinate of a point on the reflection line - */ - @Option(name="-1", aliases = "--y0", usage = "The y-ordinate of a point on the reflection line", required = true) - private double y0; - - /** - * The x-ordinate of a another point on the reflection line - */ - @Option(name="-2", aliases = "--x1", usage = "The x-ordinate of a another point on the reflection line", required = false) - private double x1 = Double.NaN; - - /** - * The y-ordinate of a another point on the reflection line - */ - @Option(name="-3", aliases = "--y1", usage = "The y-ordinate of a another point on the reflection line", required = false) - private double y1 = Double.NaN; - - /** - * Get the x-ordinate of a point on the reflection line - * @return The x-ordinate of a point on the reflection line - */ - public double getX0() { - return x0; - } - - /** - * Set the x-ordinate of a point on the reflection line - * @param x0 The x-ordinate of a point on the reflection line - */ - public void setX0(double x0) { - this.x0 = x0; - } - - /** - * Get the x-ordinate of a another point on the reflection line - * @return The x-ordinate of a another point on the reflection line - */ - public double getX1() { - return x1; - } - - /** - * Set the x-ordinate of a another point on the reflection line - * @param x1 The x-ordinate of a another point on the reflection line - */ - public void setX1(double x1) { - this.x1 = x1; - } - - /** - * Get the y-ordinate of a point on the reflection line - * @return The y-ordinate of a point on the reflection line - */ - public double getY0() { - return y0; - } - - /** - * Set the y-ordinate of a point on the reflection line - * @param y0 The y-ordinate of a point on the reflection line - */ - public void setY0(double y0) { - this.y0 = y0; - } - - /** - * Get the y-ordinate of a another point on the reflection line - * @return The y-ordinate of a another point on the reflection line - */ - public double getY1() { - return y1; - } - - /** - * Set the y-ordinate of a another point on the reflection line - * @param y1 The y-ordinate of a another point on the reflection line - */ - public void setY1(double y1) { - this.y1 = y1; - } - } -} diff --git a/src/main/java/org/geometrycommands/RelateCommand.java b/src/main/java/org/geometrycommands/RelateCommand.java deleted file mode 100644 index 828cbc78..00000000 --- a/src/main/java/org/geometrycommands/RelateCommand.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.RelateCommand.RelateOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to determine if the input Geometry and the other Geometry are related - * according to the DE-9IM intersection matrix or calculate the DE-9IM - * @author Jared Erickson - */ -public class RelateCommand extends OtherGeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "relate"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input Geometry and the other Geometry are related according to the DE-9IM intersection matrix or calculate the DE-9IM."; - } - - - /** - * Get the new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public RelateOptions getOptions() { - return new RelateOptions(); - } - - /** - * Either determine if the input Geometry and the other Geometry are related - * according to the DE-9IM intersection matrix or calculate the DE-9IM - * intersection matrix. - * @param geometry The input geometry - * @param other The other geometry - * @param options The RelateOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, RelateOptions options, Reader reader, Writer writer) throws Exception { - if (options.getIntersectionMatrix() != null) { - boolean related = geometry.relate(other, options.getIntersectionMatrix()); - writer.write(String.valueOf(related)); - } else { - String matrix = geometry.relate(other).toString(); - writer.write(matrix); - } - } - - /** - * The RelateOptions - */ - public static class RelateOptions extends OtherGeometryOptions { - - /** - * The DE-9IM intersection matrix - */ - @Option(name = "-m", aliases = "--matrix", usage = "The DE-9IM intersection matrix", required = false) - private String intersectionMatrix; - - /** - * Get the DE-9IM intersection matrix - * @return The DE-9IM intersection matrix - */ - public String getIntersectionMatrix() { - return intersectionMatrix; - } - - /** - * Set the DE-9IM intersection matrix - * @param intersectionMatrix The DE-9IM intersection matrix - */ - public void setIntersectionMatrix(String intersectionMatrix) { - this.intersectionMatrix = intersectionMatrix; - } - } -} diff --git a/src/main/java/org/geometrycommands/ReverseCommand.java b/src/main/java/org/geometrycommands/ReverseCommand.java deleted file mode 100644 index cc5a1bc3..00000000 --- a/src/main/java/org/geometrycommands/ReverseCommand.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command for reversing the coordinates in the input Geometry. - * @author Jared Erickson - */ -public class ReverseCommand extends GeometryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "reverse"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Reverse the coordinates of the input geometry"; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Reverse the coordinates in the input Geometry - * @param geometry The input geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - writer.write(writeGeometry(geometry.reverse(), options)); - } -} diff --git a/src/main/java/org/geometrycommands/RotateCommand.java b/src/main/java/org/geometrycommands/RotateCommand.java deleted file mode 100644 index 4d6d8fdd..00000000 --- a/src/main/java/org/geometrycommands/RotateCommand.java +++ /dev/null @@ -1,188 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.util.AffineTransformation; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.RotateCommand.RotateOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command that performs the rotate affine transformation on the input Geometry. - * @author Jared Erickson - */ -public class RotateCommand extends GeometryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "rotate"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a new geometry by rotating the input geometry"; - } - - /** - * Get a new RotateOptions - * @return The new RotateOptions - */ - @Override - public RotateOptions getOptions() { - return new RotateOptions(); - } - - /** - * Perform the rotate affine transformation on the input Geometry. - * @param geometry The input Geometry - * @param options The RotateOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, RotateOptions options, Reader reader, Writer writer) throws Exception { - AffineTransformation transformation = null; - // theta, x, y - if (!Double.isNaN(options.getTheta()) && !Double.isNaN(options.getX()) && !Double.isNaN(options.getY())) { - transformation = AffineTransformation.rotationInstance(options.getTheta(), options.getX(), options.getY()); - } // theta - else if (!Double.isNaN(options.getTheta())) { - transformation = AffineTransformation.rotationInstance(options.getTheta()); - } // sinTheta, cosTheta, x, y - else if (!Double.isNaN(options.getSinTheta()) && !Double.isNaN(options.getCosTheta()) && !Double.isNaN(options.getX()) && !Double.isNaN(options.getY())) { - transformation = AffineTransformation.rotationInstance(options.getSinTheta(), options.getCosTheta(), options.getX(), options.getY()); - } // sinTheta, cosTheta - else if (!Double.isNaN(options.getSinTheta()) && !Double.isNaN(options.getCosTheta())) { - transformation = AffineTransformation.rotationInstance(options.getSinTheta(), options.getCosTheta()); - } else { - throw new IllegalArgumentException("Illegal combination of arguments (theta | theta,x,y | sinTheta, cosTheta, x, y | sinTheta, cosTheta"); - } - Geometry rotatedGeometry = transformation.transform(geometry); - writer.write(writeGeometry(rotatedGeometry, options)); - } - - /** - * The RotateOptions - */ - public static class RotateOptions extends GeometryOptions { - - /** - * The rotation angle, in radians - */ - @Option(name = "-t", aliases = "--theta", usage = "The rotation angle, in radians", required = false) - private double theta = Double.NaN; - - /** - * The x-ordinate of the rotation point - */ - @Option(name = "-x", aliases = "--xCoordinate", usage = "The x-ordinate of the rotation point", required = false) - private double x = Double.NaN; - - /** - * The y-ordinate of the rotation point - */ - @Option(name = "-y", aliases = "--yCoordinate", usage = "The y-ordinate of the rotation point", required = false) - private double y = Double.NaN; - - /** - * The sine of the rotation angle - */ - @Option(name = "-s", aliases = "--sine", usage = "The sine of the rotation angle", required = false) - private double sinTheta = Double.NaN; - - /** - * The cosine of the rotation angle - */ - @Option(name = "-c", aliases = "--cosine", usage = "The cosine of the rotation angle", required = false) - private double cosTheta = Double.NaN; - - /** - * Get the cosine of the rotation angle - * @return The cosine of the rotation angle - */ - public double getCosTheta() { - return cosTheta; - } - - /** - * Set the cosine of the rotation angle - * @param cosTheta The cosine of the rotation angle - */ - public void setCosTheta(double cosTheta) { - this.cosTheta = cosTheta; - } - - /** - * Get the sine of the rotation angle - * @return The sine of the rotation angle - */ - public double getSinTheta() { - return sinTheta; - } - - /** - * Set the sine of the rotation angle - * @param sinTheta The sine of the rotation angle - */ - public void setSinTheta(double sinTheta) { - this.sinTheta = sinTheta; - } - - /** - * Get the rotation angle, in radians - * @return The rotation angle, in radians - */ - public double getTheta() { - return theta; - } - - /** - * Set the rotation angle, in radians - * @param theta The rotation angle, in radians - */ - public void setTheta(double theta) { - this.theta = theta; - } - - /** - * Get the x-ordinate of the rotation point - * @return The x-ordinate of the rotation point - */ - public double getX() { - return x; - } - - /** - * Set the x-ordinate of the rotation point - * @param x The x-ordinate of the rotation point - */ - public void setX(double x) { - this.x = x; - } - - /** - * Get the y-ordinate of the rotation point - * @return The y-ordinate of the rotation point - */ - public double getY() { - return y; - } - - /** - * Set the y-ordinate of the rotation point - * @param y The y-ordinate of the rotation point - */ - public void setY(double y) { - this.y = y; - } - } -} diff --git a/src/main/java/org/geometrycommands/ScaleCommand.java b/src/main/java/org/geometrycommands/ScaleCommand.java deleted file mode 100644 index e76b8c8c..00000000 --- a/src/main/java/org/geometrycommands/ScaleCommand.java +++ /dev/null @@ -1,156 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.util.AffineTransformation; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.ScaleCommand.ScaleOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command that performs the scale affine transformation on the input Geometry. - * @author Jared Erickson - */ -public class ScaleCommand extends GeometryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "scale"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a new geometry by scaling the input geometry"; - } - - /** - * Get a new ScaleOptions - * @return The new ScaleOptions - */ - @Override - public ScaleOptions getOptions() { - return new ScaleOptions(); - } - - /** - * Perform the scale affine transformation on the input Geometry. - * @param geometry The input Geometry - * @param options The ScaleOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, ScaleOptions options, Reader reader, Writer writer) throws Exception { - AffineTransformation transformation; - if (!Double.isNaN(options.getX()) && !Double.isNaN(options.getY())) { - transformation = AffineTransformation.scaleInstance(options.getXScale(), options.getYScale(), options.getX(), options.getY()); - } else { - transformation = AffineTransformation.scaleInstance(options.getXScale(), options.getYScale()); - } - Geometry scaledGeometry = transformation.transform(geometry); - writer.write(writeGeometry(scaledGeometry, options)); - } - - /** - * The ScaleOptions - */ - public static class ScaleOptions extends GeometryOptions { - - /** - * The value to scale by in the x direction - */ - @Option(name = "-s", aliases = "--xscale", usage = "The value to scale by in the x direction", required = true) - private double xScale; - - /** - * The value to scale by in the y direction - */ - @Option(name = "-t", aliases = "--yscale", usage = "The value to scale by in the y direction", required = true) - private double yScale; - - /** - * The x-ordinate of the point to scale around - */ - @Option(name = "-x", aliases = "--xcoordinate", usage = "The x-ordinate of the point to scale around", required = false) - private double x = Double.NaN; - - /** - * The y-ordinate of the point to scale around - */ - @Option(name = "-y", aliases = "--ycoordinate", usage = "The y-ordinate of the point to scale around", required = false) - private double y = Double.NaN; - - /** - * Get the value to scale by in the x direction - * @return The value to scale by in the x direction - */ - public double getXScale() { - return xScale; - } - - /** - * Set the value to scale by in the x direction - * @param xScale The value to scale by in the x direction - */ - public void setXScale(double xScale) { - this.xScale = xScale; - } - - /** - * Get the value to translate by in the y direction - * @return The value to scale by in the y direction - */ - public double getYScale() { - return yScale; - } - - /** - * Set the value to scale by in the y direction - * @param yScale The value to scale by in the y direction - */ - public void setYScale(double yScale) { - this.yScale = yScale; - } - - /** - * Get the x-ordinate of the point to scale around - * @return The x-ordinate of the point to scale around - */ - public double getX() { - return x; - } - - /** - * Set the x-ordinate of the point to scale around - * @param x The x-ordinate of the point to scale around - */ - public void setX(double x) { - this.x = x; - } - - /** - * Get the y-ordinate of the point to scale around - * @return The y-ordinate of the point to scale around - */ - public double getY() { - return y; - } - - /** - * Set the y-ordinate of the point to scale around - * @param y The y-ordinate of the point to scale around - */ - public void setY(double y) { - this.y = y; - } - } -} diff --git a/src/main/java/org/geometrycommands/ShapeFactoryCommand.java b/src/main/java/org/geometrycommands/ShapeFactoryCommand.java deleted file mode 100644 index 5670a295..00000000 --- a/src/main/java/org/geometrycommands/ShapeFactoryCommand.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Point; -import com.vividsolutions.jts.util.GeometricShapeFactory; -import java.io.Reader; -import java.io.Writer; - -/** - * An abstract base class for creating geometric shapes from input geometry. - * @author Jared Erickson - */ -public abstract class ShapeFactoryCommand extends GeometryCommand { - - /** - * Set up a GeometricShapeFactory to process the input Geometry - * @param geometry The input geometry - * @param options The SineStarOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, T options, Reader reader, Writer writer) throws Exception { - // Validate arguments - if (geometry instanceof Point) { - if (options.getWidth() <= 0 || options.getHeight() <= 0) { - throw new IllegalArgumentException("When the Geometry is a point, then width and height are required!"); - } - } - GeometricShapeFactory shapeFactory = createGeometricShapeFactory(); - shapeFactory.setNumPoints(options.getNumberOfPoints()); - shapeFactory.setRotation(options.getRotation()); - if (geometry instanceof Point) { - shapeFactory.setWidth(options.getWidth()); - shapeFactory.setHeight(options.getHeight()); - if (options.isCenter()) { - shapeFactory.setCentre(geometry.getCoordinate()); - } else { - shapeFactory.setBase(geometry.getCoordinate()); - } - } else { - shapeFactory.setEnvelope(geometry.getEnvelopeInternal()); - } - processGeometryWithGeometricShapeFactory(shapeFactory, geometry, options, reader, writer); - } - - /** - * Create a GeometricShapeFactory or a subclass - * @return A GeometricShapeFactory - */ - protected GeometricShapeFactory createGeometricShapeFactory() { - return new GeometricShapeFactory(); - } - - /** - * Process the input Geometry with the preconfigured GeometricShapeFactory - * @param shapeFactory The preconfigured GeometricShapeFactory - * @param geometry The input geometry - * @param options The SineStarOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - protected abstract void processGeometryWithGeometricShapeFactory(GeometricShapeFactory shapeFactory, Geometry geometry, T options, Reader reader, Writer writer) throws Exception; -} diff --git a/src/main/java/org/geometrycommands/ShapeFactoryOptions.java b/src/main/java/org/geometrycommands/ShapeFactoryOptions.java deleted file mode 100644 index 03252b0f..00000000 --- a/src/main/java/org/geometrycommands/ShapeFactoryOptions.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.geometrycommands; - -import org.kohsuke.args4j.Option; - -/** - * The Options for the ShapeFactoryCommand - * @author Jared Erickson - */ -public class ShapeFactoryOptions extends GeometryOptions { - - /** - * The width - */ - @Option(name = "-w", aliases = "--width", usage = "The width", required = false) - private int width; - - /** - * The height - */ - @Option(name = "-h", aliases = "--height", usage = "The height", required = false) - private int height; - - /** - * The number of points - */ - @Option(name = "-p", aliases = "--numberOfPoints", usage = "The number of points", required = false) - private int numberOfPoints = 100; - - /** - * The rotation - */ - @Option(name = "-r", aliases = "--rotation", usage = "The rotation", required = false) - private double rotation = 0.0; - - /** - * The flag to use center (true) or the base (false). - */ - @Option(name = "-c", aliases = "--center", usage = "The flag to use center (true) or the base (false)", required = false) - private boolean center; - - /** - * Get the flag to use center (true) or the base (false). - * @return The flag to use center (true) or the base (false). - */ - public boolean isCenter() { - return center; - } - - /** - * Set the flag to use center (true) or the base (false). - * @param center The flag to use center (true) or the base (false). - */ - public void setCenter(boolean center) { - this.center = center; - } - - /** - * Get the height - * @return The height - */ - public int getHeight() { - return height; - } - - /** - * Set the height - * @param height The height - */ - public void setHeight(int height) { - this.height = height; - } - - /** - * Get the number of points - * @return The number of points - */ - public int getNumberOfPoints() { - return numberOfPoints; - } - - /** - * Set the number of points - * @param numberOfPoints The number of points - */ - public void setNumberOfPoints(int numberOfPoints) { - this.numberOfPoints = numberOfPoints; - } - - /** - * Get the rotation - * @return The rotation - */ - public double getRotation() { - return rotation; - } - - /** - * Set the rotation - * @param rotation The rotation - */ - public void setRotation(double rotation) { - this.rotation = rotation; - } - - /** - * Get the width - * @return The width - */ - public int getWidth() { - return width; - } - - /** - * Set the width - * @param width The width - */ - public void setWidth(int width) { - this.width = width; - } -} diff --git a/src/main/java/org/geometrycommands/ShearCommand.java b/src/main/java/org/geometrycommands/ShearCommand.java deleted file mode 100644 index 093b3ba0..00000000 --- a/src/main/java/org/geometrycommands/ShearCommand.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.util.AffineTransformation; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.ShearCommand.ShearOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command that performs the shear affine transformation on the input Geometry. - * @author Jared Erickson - */ -public class ShearCommand extends GeometryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "shear"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a new geometry by apply a shear affine transformation to the input geometry"; - } - - /** - * Get a new ShearOptions - * @return The new ShearOptions - */ - @Override - public ShearOptions getOptions() { - return new ShearOptions(); - } - - /** - * Perform the shear affine transformation on the input Geometry. - * @param geometry The input Geometry - * @param options The ShearOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, ShearOptions options, Reader reader, Writer writer) throws Exception { - Geometry shearGeometry = AffineTransformation.shearInstance(options.getX(), options.getY()).transform(geometry); - writer.write(writeGeometry(shearGeometry, options)); - } - - /** - * The ShearOptions - */ - public static class ShearOptions extends GeometryOptions { - - /** - * The value to shear by in the x direction - */ - @Option(name = "-x", aliases = "--xDistance", usage = "The value to translate by in the x direction", required = true) - private double x; - - /** - * The value to shear by in the y direction - */ - @Option(name = "-y", aliases = "-yDistance", usage = "The value to translate by in the y direction", required = true) - private double y; - - /** - * Get the value to shear by in the x direction - * @return The value to shear by in the x direction - */ - public double getX() { - return x; - } - - /** - * Set the value to shear by in the x direction - * @param x The value to shear by in the x direction - */ - public void setX(double x) { - this.x = x; - } - - /** - * Get the value to shear by in the y direction - * @return The value to shear by in the y direction - */ - public double getY() { - return y; - } - - /** - * Set the value to shear by in the y direction - * @param y The value to shear by in the y direction - */ - public void setY(double y) { - this.y = y; - } - } -} diff --git a/src/main/java/org/geometrycommands/SierpinskiCarpetCommand.java b/src/main/java/org/geometrycommands/SierpinskiCarpetCommand.java deleted file mode 100644 index b63f9fc4..00000000 --- a/src/main/java/org/geometrycommands/SierpinskiCarpetCommand.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryFactory; -import com.vividsolutions.jts.shape.fractal.SierpinskiCarpetBuilder; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.SierpinskiCarpetCommand.SierpinskiCarpetOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to create a Sierpinski Carpet Geometry. - * @author Jared Erickson - */ -public class SierpinskiCarpetCommand extends GeometryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "sierpinskicarpet"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a sierpinski carpet."; - } - - /** - * Get the new SierpinskiCarpetOptions - * @return The new SierpinskiCarpetOptions - */ - @Override - public SierpinskiCarpetOptions getOptions() { - return new SierpinskiCarpetOptions(); - } - - /** - * Create a Sierpinski carpet as a Geometry. - * @param geometry The input Geometry - * @param options The KochSnowflakeOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, SierpinskiCarpetOptions options, Reader reader, Writer writer) throws Exception { - SierpinskiCarpetBuilder builder = new SierpinskiCarpetBuilder(new GeometryFactory()); - builder.setExtent(geometry.getEnvelopeInternal()); - builder.setNumPoints(options.getNumberOfPoints()); - Geometry outputGeometry = builder.getGeometry(); - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * The SierpinskiCarpetOptions - */ - public static class SierpinskiCarpetOptions extends GeometryOptions { - - /** - * The number of points. - */ - @Option(name = "-n", aliases = "--number", usage = "The number of points.", required = true) - private int numberOfPoints; - - /** - * Get the number of points. - * @return The number of points. - */ - public int getNumberOfPoints() { - return numberOfPoints; - } - - /** - * Set the number of points. - * @param numberOfPoints The number of points. - */ - public void setNumberOfPoints(int numberOfPoints) { - this.numberOfPoints = numberOfPoints; - } - } -} diff --git a/src/main/java/org/geometrycommands/SimilarityCommand.java b/src/main/java/org/geometrycommands/SimilarityCommand.java deleted file mode 100644 index afb1f617..00000000 --- a/src/main/java/org/geometrycommands/SimilarityCommand.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.algorithm.match.AreaSimilarityMeasure; -import com.vividsolutions.jts.algorithm.match.HausdorffSimilarityMeasure; -import com.vividsolutions.jts.algorithm.match.SimilarityMeasure; -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.SimilarityCommand.SimilarityOptions; -import org.kohsuke.args4j.Option; - -/** - * Calculate the degree of similarity between two Geometries - * @author Jared Erickson - */ -public class SimilarityCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "similarity"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the degree of similarity between two geometries."; - } - - /** - * Get a new SimilarityOptions - * @return A new SimilarityOptions - */ - @Override - public SimilarityOptions getOptions() { - return new SimilarityOptions(); - } - - /** - * Calculate the degree of similarity between two Geometries - * @param geometry The Geometry - * @param other The other Geometry - * @param options The SimilarityOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, SimilarityOptions options, Reader reader, Writer writer) throws Exception { - SimilarityMeasure similarityMeasure; - if (options.getAlgorithm().equalsIgnoreCase("area") || options.getAlgorithm().equalsIgnoreCase("a")) { - similarityMeasure = new AreaSimilarityMeasure(); - } else if (options.getAlgorithm().equalsIgnoreCase("hausdorff") || options.getAlgorithm().equalsIgnoreCase("h")) { - similarityMeasure = new HausdorffSimilarityMeasure(); - } else { - throw new IllegalArgumentException("Unknown similarity measure algorithm!"); - } - double similarity = similarityMeasure.measure(geometry, other); - writer.write(String.valueOf(similarity)); - } - - /** - * The SimilarityOptions - */ - public static class SimilarityOptions extends OtherGeometryOptions { - - /** - * The algorithm (area/a or hausdorff/h) - */ - @Option(name = "-a", aliases = "--algorithm", usage = "The algorithm (area/a or hausdorff/h)", required = true) - private String algorithm; - - /** - * Get the algorithm - * @return The algorithm - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Set the algorithm - * @param algorithm The algorithm - */ - public void setAlgorithm(String algorithm) { - this.algorithm = algorithm; - } - } -} diff --git a/src/main/java/org/geometrycommands/SimplifyCommand.java b/src/main/java/org/geometrycommands/SimplifyCommand.java deleted file mode 100644 index 1ac9016e..00000000 --- a/src/main/java/org/geometrycommands/SimplifyCommand.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.simplify.DouglasPeuckerSimplifier; -import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.SimplifyCommand.SimplifyOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to simplify the Coordinates of the input Geometry - * @author Jared Erickson - */ -public class SimplifyCommand extends GeometryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "simplify"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Simplify the input geometry."; - } - - /** - * Get a new SimplifyOptions - * @return A new SimplifyOptions - */ - @Override - public SimplifyOptions getOptions() { - return new SimplifyOptions(); - } - - /** - * Densify the Geometry - * @param geometry The input Geometry - * @param options The SimplifyOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, SimplifyOptions options, Reader reader, Writer writer) throws Exception { - Geometry outputGeometry; - if (options.getAlgorithm().equalsIgnoreCase("douglaspeucker") - || options.getAlgorithm().equalsIgnoreCase("dp")) { - outputGeometry = DouglasPeuckerSimplifier.simplify(geometry, options.getDistanceTolerance()); - } else if (options.getAlgorithm().equalsIgnoreCase("topologypreserving") - || options.getAlgorithm().equalsIgnoreCase("tp")) { - outputGeometry = TopologyPreservingSimplifier.simplify(geometry, options.getDistanceTolerance()); - } else { - throw new IllegalArgumentException("Unknown simplifier algorithm!"); - } - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * The SimplifyOptions - */ - public static class SimplifyOptions extends GeometryOptions { - - /** - * The algorithm (douglaspeucker/dp or topologypreserving/tp) - */ - @Option(name = "-a", aliases = "--algorithm", usage = "The distance tolerance (douglaspeucker/dp or topologypreserving/tp)", required = true) - private String algorithm; - - /** - * The distance tolerance - */ - @Option(name = "-d", aliases = "--distance", usage = "The distance tolerance", required = true) - private double distanceTolerance; - - /** - * Get the distance tolerance - * @return The distance tolerance - */ - public double getDistanceTolerance() { - return distanceTolerance; - } - - /** - * Set the distance tolerance - * @param distanceTolerance The distance tolerance - */ - public void setDistanceTolerance(double distanceTolerance) { - this.distanceTolerance = distanceTolerance; - } - - /** - * Get the algorithm (douglaspeucker or topologypreserving) - * @return The algorithm (douglaspeucker or topologypreserving) - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Set the algorithm (douglaspeucker or topologypreserving) - * @param algorithm The algorithm (douglaspeucker or topologypreserving) - */ - public void setAlgorithm(String algorithm) { - this.algorithm = algorithm; - } - } -} diff --git a/src/main/java/org/geometrycommands/SineStarCommand.java b/src/main/java/org/geometrycommands/SineStarCommand.java deleted file mode 100644 index 7178aa78..00000000 --- a/src/main/java/org/geometrycommands/SineStarCommand.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.util.SineStarFactory; -import com.vividsolutions.jts.util.GeometricShapeFactory; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.SineStarCommand.SineStarOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command for creating sine star Geometries. - * @author Jared Erickson - */ -public class SineStarCommand extends ShapeFactoryCommand { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "sinestar"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a sine star."; - } - - /** - * Get a new SineStarOptions - * @return A new SineStarOptions - */ - @Override - public SineStarOptions getOptions() { - return new SineStarOptions(); - } - - /** - * Create a SineStarFactory - * @return A SineStarFactory - */ - @Override - protected GeometricShapeFactory createGeometricShapeFactory() { - return new SineStarFactory(); - } - - /** - * Create a sine star with a preconfigured SineStarFactory. - * @param shapeFactory The preconfigured SineStarFactory. - * @param geometry The input Geometry - * @param options The SineStarOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometryWithGeometricShapeFactory(GeometricShapeFactory shapeFactory, Geometry geometry, SineStarOptions options, Reader reader, Writer writer) throws Exception { - SineStarFactory sineStarFactory = (SineStarFactory) shapeFactory; - sineStarFactory.setNumPoints(options.getNumberOfPoints()); - sineStarFactory.setArmLengthRatio(options.getArmLengthRatio()); - sineStarFactory.setNumArms(options.getNumberOfArms()); - Geometry outputGeometry = sineStarFactory.createSineStar(); - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * SineStarOptions - */ - public static class SineStarOptions extends ShapeFactoryOptions { - - /** - * The number of arms - */ - @Option(name = "-n", aliases = "--numberOfArms", usage = "The number of arms", required = true) - private int numberOfArms; - - /** - * The arm length ratio - */ - @Option(name = "-l", aliases = "--armLengthRatio", usage = "The arm length ratio", required = true) - private double armLengthRatio; - - /** - * Get the arm length ratio - * @return The arm length ratio - */ - public double getArmLengthRatio() { - return armLengthRatio; - } - - /** - * Set the arm length ratio - * @param armLengthRatio The arm length ratio - */ - public void setArmLengthRatio(double armLengthRatio) { - this.armLengthRatio = armLengthRatio; - } - - /** - * Get the number of arms - * @return The number of arms - */ - public int getNumberOfArms() { - return numberOfArms; - } - - /** - * Set the number of arms - * @param numberOfArms The number of arms - */ - public void setNumberOfArms(int numberOfArms) { - this.numberOfArms = numberOfArms; - } - } -} diff --git a/src/main/java/org/geometrycommands/SnapCommand.java b/src/main/java/org/geometrycommands/SnapCommand.java deleted file mode 100644 index e54ec5c2..00000000 --- a/src/main/java/org/geometrycommands/SnapCommand.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryCollection; -import com.vividsolutions.jts.operation.overlay.snap.GeometrySnapper; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.SnapCommand.SnapOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command for snapping the input geometry to another geometry. - * @author Jared Erickson - */ -public class SnapCommand extends OtherGeometryCommand { - - /** - * The command's name - * @return The command's name - */ - @Override - public String getName() { - return "snap"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Snap the input geometry to the other geometry."; - } - - /** - * Get the SnapOptions - * @return The SnapOptions - */ - @Override - public SnapOptions getOptions() { - return new SnapOptions(); - } - - /** - * Snap the input geometry to another geometry - * @param geometry The input geometry - * @param other The other geometry - * @param options The SnapOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, SnapOptions options, Reader reader, Writer writer) throws Exception { - Geometry[] geoms = GeometrySnapper.snap(geometry, other, options.getDistance()); - GeometryCollection geometryCollection = geometry.getFactory().createGeometryCollection(geoms); - writer.write(writeGeometry(geometryCollection, options)); - } - - /** - * The SnapOptions - */ - public static class SnapOptions extends OtherGeometryOptions { - - /** - * The distance/tolerance - */ - @Option(name = "-d", aliases = "--distance", usage = "The distance/tolerance", required = true) - private double distance; - - /** - * Get the distance/tolerance - * @return The distance/tolerance - */ - public double getDistance() { - return distance; - } - - /** - * Set the distance/tolerance - * @param distance The distance/tolerance - */ - public void setDistance(double distance) { - this.distance = distance; - } - } -} diff --git a/src/main/java/org/geometrycommands/SquircleCommand.java b/src/main/java/org/geometrycommands/SquircleCommand.java deleted file mode 100644 index ca2dfa2c..00000000 --- a/src/main/java/org/geometrycommands/SquircleCommand.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Point; -import com.vividsolutions.jts.util.GeometricShapeFactory; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to create a squircle - * @author Jared Erickson - */ -public class SquircleCommand extends ShapeFactoryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "squircle"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a squircle."; - } - - /** - * Get the ShapeFactoryOptions - * @return The ShapeFactoryOptions - */ - @Override - public ShapeFactoryOptions getOptions() { - return new ShapeFactoryOptions(); - } - - /** - * Create a squircle Geometry - * @param shapeFactory The preconfigured GeometricShapeFactory - * @param geometry The input Geometry - * @param options The ShapeFactoryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometryWithGeometricShapeFactory(GeometricShapeFactory shapeFactory, Geometry geometry, ShapeFactoryOptions options, Reader reader, Writer writer) throws Exception { - // There is a bug in JTS when creating Squircles with base - if (geometry instanceof Point && !options.isCenter()) { - Point point = (Point) geometry; - Coordinate coord = new Coordinate(point.getX() + options.getWidth() / 2, point.getY() + options.getHeight() / 2); - shapeFactory.setCentre(coord); - } - Geometry outputGeometry = shapeFactory.createSquircle(); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/SubLineCommand.java b/src/main/java/org/geometrycommands/SubLineCommand.java deleted file mode 100644 index 875d58fa..00000000 --- a/src/main/java/org/geometrycommands/SubLineCommand.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Lineal; -import com.vividsolutions.jts.linearref.LengthIndexedLine; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.SubLineCommand.SubLineOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to extract a sub-line from a linear Geometry. - * @author Jared Erickson - */ -public class SubLineCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "subline"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Extract a sub line from a linear geometry."; - } - - /** - * Get a new SubLineOptions - * @return A new SubLineOptions - */ - @Override - public SubLineOptions getOptions() { - return new SubLineOptions(); - } - - /** - * Extract a sub-line from a linear Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, SubLineOptions options, Reader reader, Writer writer) throws Exception { - if (!(geometry instanceof Lineal)) { - throw new IllegalArgumentException("The input geometry a LineString or a MultiLineString!"); - } - if (options.getStartPosition() > options.getEndPosition()) { - throw new IllegalArgumentException("The start position must be less than the end position!"); - } - LengthIndexedLine indexedLine = new LengthIndexedLine(geometry); - double length = geometry.getLength(); - Geometry subLine = indexedLine.extractLine(options.getStartPosition() * length, options.getEndPosition() * length); - writer.write(writeGeometry(subLine, options)); - } - - /** - * The SubLineOptions - */ - public static class SubLineOptions extends GeometryOptions { - - /** - * The start position between 0 and 1 - */ - @Option(name = "-s", aliases = "startPosition", usage = "The start position between 0 and 1", required = true) - private double startPosition; - - /** - * The end position between 0 and 1 - */ - @Option(name = "-e", aliases = "endPosition", usage = "The end position between 0 and 1", required = true) - private double endPosition; - - /** - * Get the start position between 0 and 1 - * @return The start position between 0 and 1 - */ - public double getStartPosition() { - return startPosition; - } - - /** - * Set the start position between 0 and 1 - * @param position The start position between 0 and 1 - */ - public void setStartPosition(double position) { - this.startPosition = position; - } - - /** - * Get the end position between 0 and 1 - * @return The end position between 0 and 1 - */ - public double getEndPosition() { - return endPosition; - } - - /** - * Set the end position between 0 and 1 - * @param position The end position between 0 and 1 - */ - public void setEndPosition(double position) { - this.endPosition = position; - } - } -} diff --git a/src/main/java/org/geometrycommands/SuperCircleCommand.java b/src/main/java/org/geometrycommands/SuperCircleCommand.java deleted file mode 100644 index be884f3c..00000000 --- a/src/main/java/org/geometrycommands/SuperCircleCommand.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Point; -import com.vividsolutions.jts.util.GeometricShapeFactory; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.SuperCircleCommand.SuperCircleOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command to create a squircle - * @author Jared Erickson - */ -public class SuperCircleCommand extends ShapeFactoryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "supercircle"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a super circle."; - } - - /** - * Get the SuperCircleOptions - * @return The SuperCircleOptions - */ - @Override - public SuperCircleOptions getOptions() { - return new SuperCircleOptions(); - } - - /** - * Create a squircle Geometry - * @param shapeFactory The preconfigured GeometricShapeFactory - * @param geometry The input Geometry - * @param options The SuperCircleOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometryWithGeometricShapeFactory(GeometricShapeFactory shapeFactory, Geometry geometry, SuperCircleOptions options, Reader reader, Writer writer) throws Exception { - // There is a bug in JTS when creating Super cirlces with base - if (geometry instanceof Point && !options.isCenter()) { - Point point = (Point) geometry; - Coordinate coord = new Coordinate(point.getX() + options.getWidth() / 2, point.getY() + options.getHeight() / 2); - shapeFactory.setCentre(coord); - } - Geometry outputGeometry = shapeFactory.createSupercircle(options.getPower()); - writer.write(writeGeometry(outputGeometry, options)); - } - - /** - * The SuperCircleOptions - */ - public static class SuperCircleOptions extends ShapeFactoryOptions { - - /** - * The positive power - */ - @Option(name = "-p", aliases = "--power", usage = "The positive power", required = false) - private double power = 4.0; - - /** - * Get the positive power - * @return The positive power - */ - public double getPower() { - return power; - } - - /** - * Set the positive power - * @param power The positive power - */ - public void setPower(double power) { - this.power = power; - } - } -} diff --git a/src/main/java/org/geometrycommands/SymDifferenceCommand.java b/src/main/java/org/geometrycommands/SymDifferenceCommand.java deleted file mode 100644 index ef59c7f3..00000000 --- a/src/main/java/org/geometrycommands/SymDifferenceCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command for calculating the symetric difference between two Geometries - * @author jericks - */ -public class SymDifferenceCommand extends OtherGeometryCommand { - - /** - * Get the name of the Command - * @return The name of the Command - */ - @Override - public String getName() { - return "symdifference"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the symetric difference between two geometries"; - } - - /** - * Get the new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate the symetric difference between two Geometries - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry symDifferenceGeometry = geometry.symDifference(other); - writer.write(writeGeometry(symDifferenceGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/TextCommand.java b/src/main/java/org/geometrycommands/TextCommand.java deleted file mode 100644 index 8838ce51..00000000 --- a/src/main/java/org/geometrycommands/TextCommand.java +++ /dev/null @@ -1,129 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.awt.FontGlyphReader; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryFactory; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.TextCommand.TextOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command for creating a Polygon Geometry from a String and Font. - * @author Jared Erickson - */ -public class TextCommand implements Command { - - /** - * Get the command name - * @return The command name - */ - @Override - public String getName() { - return "text"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a geometry from a string."; - } - - /** - * Get a new TextOptions - * @return The new TextOptions - */ - @Override - public TextOptions getOptions() { - return new TextOptions(); - } - - /** - * Create a Polygon Geometry from the text and Font. - * @param options The TextOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - public void execute(TextOptions options, Reader reader, Writer writer) throws Exception { - GeometryFactory factory = new GeometryFactory(); - Geometry geometry = FontGlyphReader.read(options.getText(), options.getFontName(), options.getPointSize(), factory); - writer.write(geometry.toText()); - } - - /** - * The TextOptions - */ - public static class TextOptions extends Options { - - /** - * The text - */ - @Option(name = "-t", aliases = "--text", usage = "The text", required = true) - private String text; - - /** - * The font name - */ - @Option(name = "-f", aliases = "--fontName", usage = "The font name", required = false) - private String fontName = FontGlyphReader.FONT_SANSERIF; - - /** - * The font size - */ - @Option(name = "-s", aliases = "--pointSize", usage = "The font size", required = false) - private int pointSize = 24; - - /** - * Get the font name - * @return The font name - */ - public String getFontName() { - return fontName; - } - - /** - * Set the font name - * @param fontName The font name - */ - public void setFontName(String fontName) { - this.fontName = fontName; - } - - /** - * Get the font size - * @return The font size - */ - public int getPointSize() { - return pointSize; - } - - /** - * Set the font size - * @param pointSize The font size - */ - public void setPointSize(int pointSize) { - this.pointSize = pointSize; - } - - /** - * Get the text - * @return The text - */ - public String getText() { - return text; - } - - /** - * Set the text - * @param text The text - */ - public void setText(String text) { - this.text = text; - } - } -} diff --git a/src/main/java/org/geometrycommands/TouchesCommand.java b/src/main/java/org/geometrycommands/TouchesCommand.java deleted file mode 100644 index 6cd8b502..00000000 --- a/src/main/java/org/geometrycommands/TouchesCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to determine if the input Geometry touches the other Geometry. - * @author Jared Erickson - */ -public class TouchesCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "touches"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input geometry touches another geometry."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * determine if the input Geometry touches the other Geometry. - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean touches = geometry.touches(other); - writer.write(String.valueOf(touches)); - } -} diff --git a/src/main/java/org/geometrycommands/TranslateCommand.java b/src/main/java/org/geometrycommands/TranslateCommand.java deleted file mode 100644 index 3c96384a..00000000 --- a/src/main/java/org/geometrycommands/TranslateCommand.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.util.AffineTransformation; -import java.io.Reader; -import java.io.Writer; -import org.geometrycommands.TranslateCommand.TranslateOptions; -import org.kohsuke.args4j.Option; - -/** - * A Command that performs the translate affine transformation on the input Geometry. - * @author Jared Erickson - */ -public class TranslateCommand extends GeometryCommand { - - /** - * Get the command's name - * @return The command's name - */ - @Override - public String getName() { - return "translate"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Create a new geometry by applying the translate affine transformation on the input geometry."; - } - - /** - * Get a new TranslateOptions - * @return The new TranslateOptions - */ - @Override - public TranslateOptions getOptions() { - return new TranslateOptions(); - } - - /** - * Perform the translate affine transformation on the input Geometry. - * @param geometry The input Geometry - * @param options The TranslateOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, TranslateOptions options, Reader reader, Writer writer) throws Exception { - Geometry translatedGeometry = AffineTransformation.translationInstance(options.getX(), options.getY()).transform(geometry); - writer.write(writeGeometry(translatedGeometry, options)); - } - - /** - * The TranslateOptions - */ - public static class TranslateOptions extends GeometryOptions { - - /** - * The value to translate by in the x direction - */ - @Option(name = "-x", aliases = "--xDistance", usage = "The value to translate by in the x direction", required = true) - private double x; - - /** - * The value to translate by in the y direction - */ - @Option(name = "-y", aliases = "--yDistance", usage = "The value to translate by in the y direction", required = true) - private double y; - - /** - * Get the value to translate by in the x direction - * @return The value to translate by in the x direction - */ - public double getX() { - return x; - } - - /** - * Set the value to translate by in the x direction - * @param x The value to translate by in the x direction - */ - public void setX(double x) { - this.x = x; - } - - /** - * Get the value to translate by in the y direction - * @return The value to translate by in the y direction - */ - public double getY() { - return y; - } - - /** - * Set the value to translate by in the y direction - * @param y The value to translate by in the y direction - */ - public void setY(double y) { - this.y = y; - } - } -} diff --git a/src/main/java/org/geometrycommands/UnionCommand.java b/src/main/java/org/geometrycommands/UnionCommand.java deleted file mode 100644 index 84a86304..00000000 --- a/src/main/java/org/geometrycommands/UnionCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to calculate the union of the input Geometry and the other Geometry. - * @author Jared Erickson - */ -public class UnionCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "union"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Calculate the union between two geometries."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * Calculate the union of the input Geometry and the other Geometry. - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - Geometry unionedGeometry = geometry.union(other); - writer.write(writeGeometry(unionedGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/VoronoiDiagramCommand.java b/src/main/java/org/geometrycommands/VoronoiDiagramCommand.java deleted file mode 100644 index caabc4a7..00000000 --- a/src/main/java/org/geometrycommands/VoronoiDiagramCommand.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.triangulate.VoronoiDiagramBuilder; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command that generates a Voronoi Diagram for the input Geometry. - * @author Jared Erickson - */ -public class VoronoiDiagramCommand extends GeometryCommand { - - /** - * Get the Command's name - * @return The Command's name - */ - @Override - public String getName() { - return "voronoi"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Generate a voronoi diagram."; - } - - /** - * Get a new GeometryOptions - * @return A new GeometryOptions - */ - @Override - public GeometryOptions getOptions() { - return new GeometryOptions(); - } - - /** - * Generate a Voronoi Diagram for the input Geometry. - * @param geometry The input Geometry - * @param options The GeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometry(Geometry geometry, GeometryOptions options, Reader reader, Writer writer) throws Exception { - VoronoiDiagramBuilder builder = new VoronoiDiagramBuilder(); - builder.setSites(geometry); - Geometry outputGeometry = builder.getDiagram(geometry.getFactory()); - writer.write(writeGeometry(outputGeometry, options)); - } -} diff --git a/src/main/java/org/geometrycommands/WithinCommand.java b/src/main/java/org/geometrycommands/WithinCommand.java deleted file mode 100644 index 29595af7..00000000 --- a/src/main/java/org/geometrycommands/WithinCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import java.io.Reader; -import java.io.Writer; - -/** - * A Command to determine if the input Geometry is within the other Geometry. - * @author Jared Erickson - */ -public class WithinCommand extends OtherGeometryCommand { - - /** - * Get the name of the command - * @return The name of the command - */ - @Override - public String getName() { - return "within"; - } - - /** - * Get the description of what the Command does - * @return The description of what the Command does - */ - @Override - public String getDescription() { - return "Determine if the input geometry is within the other geometry."; - } - - /** - * Get a new OtherGeometryOptions - * @return A new OtherGeometryOptions - */ - @Override - public OtherGeometryOptions getOptions() { - return new OtherGeometryOptions(); - } - - /** - * determine if the input Geometry is within the other Geometry. - * @param geometry The input Geometry - * @param other The other Geometry - * @param options The OtherGeometryOptions - * @param reader The java.io.Reader - * @param writer The java.io.Writer - * @throws Exception if an error occurs - */ - @Override - protected void processGeometries(Geometry geometry, Geometry other, OtherGeometryOptions options, Reader reader, Writer writer) throws Exception { - boolean within = geometry.within(other); - writer.write(String.valueOf(within)); - } -} diff --git a/src/main/resources/META-INF/services/org.geometrycommands.Command b/src/main/resources/META-INF/services/org.geometrycommands.Command deleted file mode 100644 index 7f7de3c7..00000000 --- a/src/main/resources/META-INF/services/org.geometrycommands.Command +++ /dev/null @@ -1,84 +0,0 @@ -org.geometrycommands.ListCommand -org.geometrycommands.ArcCommand -org.geometrycommands.ArcPolygonCommand -org.geometrycommands.AreaCommand -org.geometrycommands.BoundaryCommand -org.geometrycommands.BufferCommand -org.geometrycommands.CentroidCommand -org.geometrycommands.CombineCommand -org.geometrycommands.ContainsCommand -org.geometrycommands.ConvexHullCommand -org.geometrycommands.CoordinatesCommand -org.geometrycommands.CountGeometriesCommand -org.geometrycommands.CountPointsCommand -org.geometrycommands.CoveredByCommand -org.geometrycommands.CoversCommand -org.geometrycommands.CrossesCommand -org.geometrycommands.DelaunayTriangulationCommand -org.geometrycommands.DensifyCommand -org.geometrycommands.DrawCommand -org.geometrycommands.DumpCommand -org.geometrycommands.EllipseCommand -org.geometrycommands.DifferenceCommand -org.geometrycommands.DiscreteHausdorffDistanceCommand -org.geometrycommands.DisjointCommand -org.geometrycommands.DistanceCommand -org.geometrycommands.DistanceLineStringCommand -org.geometrycommands.EnvelopeCommand -org.geometrycommands.EqualsCommand -org.geometrycommands.InteriorPointCommand -org.geometrycommands.InterpolatePointCommand -org.geometrycommands.IntersectionCommand -org.geometrycommands.IntersectsCommand -org.geometrycommands.IsClosedCommand -org.geometrycommands.IsEmptyCommand -org.geometrycommands.IsRectangleCommand -org.geometrycommands.IsRingCommand -org.geometrycommands.IsSimpleCommand -org.geometrycommands.IsValidCommand -org.geometrycommands.IsWithinDistanceCommand -org.geometrycommands.KochSnowflakeCommand -org.geometrycommands.LineMergeCommand -org.geometrycommands.LocatePointCommand -org.geometrycommands.GeometryTypeCommand -org.geometrycommands.GridCommand -org.geometrycommands.GetEndPointCommand -org.geometrycommands.GetGeometryCommand -org.geometrycommands.GetStartPointCommand -org.geometrycommands.MinimumBoundingCircleCommand -org.geometrycommands.MinimumClearanceCommand -org.geometrycommands.MinimumDiameterCommand -org.geometrycommands.MinimumRectangleCommand -org.geometrycommands.NodeCommand -org.geometrycommands.NormalizeCommand -org.geometrycommands.OctagonalEnvelopeCommand -org.geometrycommands.OverlapsCommand -org.geometrycommands.PlacePointCommand -org.geometrycommands.PointAtAngleCommand -org.geometrycommands.PolygonizeCommand -org.geometrycommands.PrecisionReducerCommand -org.geometrycommands.ProjectCommand -org.geometrycommands.RandomCommand -org.geometrycommands.RandomWalkCommand -org.geometrycommands.RectangleCommand -org.geometrycommands.ReflectCommand -org.geometrycommands.RelateCommand -org.geometrycommands.ReverseCommand -org.geometrycommands.RotateCommand -org.geometrycommands.ScaleCommand -org.geometrycommands.ShearCommand -org.geometrycommands.SierpinskiCarpetCommand -org.geometrycommands.SimilarityCommand -org.geometrycommands.SimplifyCommand -org.geometrycommands.SineStarCommand -org.geometrycommands.SnapCommand -org.geometrycommands.SquircleCommand -org.geometrycommands.SubLineCommand -org.geometrycommands.SuperCircleCommand -org.geometrycommands.SymDifferenceCommand -org.geometrycommands.TextCommand -org.geometrycommands.TouchesCommand -org.geometrycommands.TranslateCommand -org.geometrycommands.UnionCommand -org.geometrycommands.VoronoiDiagramCommand -org.geometrycommands.WithinCommand \ No newline at end of file diff --git a/src/test/java/org/geometrycommands/AppTest.java b/src/test/java/org/geometrycommands/AppTest.java deleted file mode 100644 index d2810d8c..00000000 --- a/src/test/java/org/geometrycommands/AppTest.java +++ /dev/null @@ -1,131 +0,0 @@ -package org.geometrycommands; - -import org.junit.After; -import org.junit.Before; -import java.security.Permission; -import java.util.Map; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * The App UnitTest - * @author Jared Erickson - */ -public class AppTest { - - private static final String NEW_LINE = System.getProperty("line.separator"); - - @Before - public void before() throws Exception { - System.setSecurityManager(new OverrideExitSecurityManager()); - } - - @After - public void after() throws Exception { - System.setSecurityManager(null); - } - - @Test - public void testNoCommandName() { - CaptureOutput capture = CaptureOutput.createAndStart(); - try { - App.main(new String[]{}); - } catch (OverrideExitException ex) { - } - Map values = capture.stop(); - assertEquals("Please enter a geometry command!" + NEW_LINE + "Usage: geom ", values.get("err")); - } - - @Test - public void testUnknownCommandName() { - CaptureOutput capture = CaptureOutput.createAndStart(); - try { - App.main(new String[]{"ZZZ"}); - } catch (OverrideExitException ex) { - } - Map values = capture.stop(); - assertEquals("Unknown geometry command: 'ZZZ'!" + NEW_LINE + "Usage: geom ", values.get("err")); - } - - @Test - public void testHelp() { - CaptureOutput capture = CaptureOutput.createAndStart(); - try { - App.main(new String[]{ - "centroid", "--help" - }); - } catch (OverrideExitException ex) { - } - Map values = capture.stop(); - assertEquals("geom centroid: Calculate the centroid of a Geometry." + NEW_LINE + " --help : Print help message" + NEW_LINE + " -g (--geometry) VAL : The input geometry", values.get("out")); - } - - @Test - public void testArgumentError() { - CaptureOutput capture = CaptureOutput.createAndStart(); - try { - App.main(new String[]{ - "centroid", "--asdf" - }); - } catch (OverrideExitException ex) { - } - Map values = capture.stop(); - assertEquals("\"--asdf\" is not a valid option" + NEW_LINE - + "Usage: geom " + NEW_LINE - + " --help : Print help message" + NEW_LINE - + " -g (--geometry) VAL : The input geometry", values.get("err")); - } - - @Test - public void testCentroid() { - CaptureOutput capture = CaptureOutput.createAndStart(); - try { - App.main(new String[]{ - "centroid", "--geometry", "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))" - }); - } catch (OverrideExitException ex) { - } - Map values = capture.stop(); - assertEquals("POINT (5 5)", values.get("out")); - } - - @Test - public void testEnvelopeWithExpandBy() { - CaptureOutput capture = CaptureOutput.createAndStart(); - try { - App.main(new String[]{ - "envelope", "-g", "POINT (5 5)", "-e", "5" - }); - } catch (OverrideExitException ex) { - } - Map values = capture.stop(); - assertEquals("POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))", values.get("out")); - } - - protected static class OverrideExitException extends SecurityException { - - public final int status; - - public OverrideExitException(int status) { - super("Override exit"); - this.status = status; - } - } - - private static class OverrideExitSecurityManager extends SecurityManager { - - @Override - public void checkPermission(Permission perm) { - } - - @Override - public void checkPermission(Permission perm, Object context) { - } - - @Override - public void checkExit(int status) { - super.checkExit(status); - throw new OverrideExitException(status); - } - } -} diff --git a/src/test/java/org/geometrycommands/ArcCommandTest.java b/src/test/java/org/geometrycommands/ArcCommandTest.java deleted file mode 100644 index 5f2e4285..00000000 --- a/src/test/java/org/geometrycommands/ArcCommandTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.ArcCommand.ArcOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The ArcCommand UnitTest - * @author Jared Erickson - */ -public class ArcCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (100 100)"; - ArcOptions options = new ArcOptions(); - options.setGeometry(inputGeometry); - options.setStartAngle(45); - options.setAngleExtent(90); - options.setWidth(50); - options.setHeight(50); - options.setNumberOfPoints(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - ArcCommand command = new ArcCommand(); - command.execute(options, reader, writer); - assertEquals("LINESTRING (138.13304972044324 146.27258811335295, " - + "121.38674369432238 149.73750955269105, " - + "106.33112045049884 141.62747534553029, " - + "100.01087342937183 125.73726063039155, " - + "105.3833164538481 109.50207347255339, " - + "119.93462372472202 100.51853837717505, " - + "136.85607685018496 102.99015125625557, " - + "148.2299398518295 115.76041697475566, " - + "148.7342558247792 132.8539862772947, " - + "138.13304972044324 146.27258811335295)", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/ArcPolygonCommandTest.java b/src/test/java/org/geometrycommands/ArcPolygonCommandTest.java deleted file mode 100644 index 2f62705d..00000000 --- a/src/test/java/org/geometrycommands/ArcPolygonCommandTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.ArcPolygonCommand.ArcPolygonOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The ArcPolygonCommand UnitTest - * @author Jared Erickson - */ -public class ArcPolygonCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (100 100)"; - ArcPolygonOptions options = new ArcPolygonOptions(); - options.setGeometry(inputGeometry); - options.setStartAngle(45); - options.setAngleExtent(90); - options.setWidth(50); - options.setHeight(50); - options.setNumberOfPoints(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - ArcPolygonCommand command = new ArcPolygonCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((125 125, 138.13304972044324 146.27258811335295, " - + "121.38674369432238 149.73750955269105, " - + "106.33112045049884 141.62747534553029, " - + "100.01087342937183 125.73726063039155, " - + "105.3833164538481 109.50207347255339, " - + "119.93462372472202 100.51853837717505, " - + "136.85607685018496 102.99015125625557, " - + "148.2299398518295 115.76041697475566, " - + "148.7342558247792 132.8539862772947, " - + "138.13304972044324 146.27258811335295, " - + "125 125))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/AreaCommandTest.java b/src/test/java/org/geometrycommands/AreaCommandTest.java deleted file mode 100644 index 6dbd53d0..00000000 --- a/src/test/java/org/geometrycommands/AreaCommandTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * The AreaCommand UnitTest - * @author Jared Erickson - */ -public class AreaCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - AreaCommand command = new AreaCommand(); - command.execute(options, reader, writer); - assertEquals("100.0", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/BoundaryCommandTest.java b/src/test/java/org/geometrycommands/BoundaryCommandTest.java deleted file mode 100644 index dab6e23e..00000000 --- a/src/test/java/org/geometrycommands/BoundaryCommandTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The BoundaryCommand UnitTest - * @author Jared Erickson - */ -public class BoundaryCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - BoundaryCommand command = new BoundaryCommand(); - command.execute(options, reader, writer); - assertEquals("LINEARRING (0 0, 0 10, 10 10, 10 0, 0 0)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/BufferCommandTest.java b/src/test/java/org/geometrycommands/BufferCommandTest.java deleted file mode 100644 index 46522547..00000000 --- a/src/test/java/org/geometrycommands/BufferCommandTest.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.BufferCommand.BufferOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The BufferCommand UnitTest - * @author Jared Erickson - */ -public class BufferCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (100 100)"; - BufferOptions options = new BufferOptions(); - options.setGeometry(inputGeometry); - options.setDistance(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - BufferCommand command = new BufferCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((110 100, 109.80785280403231 98.04909677983872, " - + "109.23879532511287 96.1731656763491, 108.31469612302546 " - + "94.44429766980397, 107.07106781186548 92.92893218813452, " - + "105.55570233019603 91.68530387697454, 103.8268343236509 " - + "90.76120467488713, 101.95090322016128 90.19214719596769, " - + "100 90, 98.04909677983872 90.19214719596769, " - + "96.1731656763491 90.76120467488713, 94.44429766980397 " - + "91.68530387697454, 92.92893218813452 92.92893218813452, " - + "91.68530387697454 94.44429766980397, 90.76120467488713 " - + "96.1731656763491, 90.19214719596769 98.04909677983872, " - + "90 100.00000000000001, 90.19214719596769 101.9509032201613, " - + "90.76120467488714 103.82683432365091, 91.68530387697456 " - + "105.55570233019603, 92.92893218813454 107.07106781186549, " - + "94.44429766980399 108.31469612302547, 96.17316567634911 " - + "109.23879532511287, 98.04909677983873 109.80785280403231, " - + "100.00000000000003 110, 101.95090322016131 109.8078528040323, " - + "103.82683432365093 109.23879532511286, 105.55570233019606 " - + "108.31469612302544, 107.0710678118655 107.07106781186545, " - + "108.31469612302547 105.555702330196, 109.23879532511287 " - + "103.82683432365086, 109.80785280403231 101.95090322016124, " - + "110 100))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/CaptureOutput.java b/src/test/java/org/geometrycommands/CaptureOutput.java deleted file mode 100644 index db435cfd..00000000 --- a/src/test/java/org/geometrycommands/CaptureOutput.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.geometrycommands; - -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; -import java.io.PrintStream; -import java.util.HashMap; -import java.util.Map; - -/** - * A Utility class that captures standard output as a string. - * @author Jared Erickson - */ -public class CaptureOutput { - - /** - * The original standard output stream - */ - private PrintStream originalOutputStream; - - /** - * The OutputStream used to capture standard output stream - */ - private OutputStream out; - - /** - * The original standard error stream - */ - private PrintStream originalErrorOutputStream; - - /** - * The OutputStream used to capture standard error stream - */ - private OutputStream err; - - /** - * Start capturing standard output - */ - public void start() { - originalOutputStream = System.out; - out = new ByteArrayOutputStream(); - System.setOut(new PrintStream(out)); - - originalErrorOutputStream = System.err; - err = new ByteArrayOutputStream(); - System.setErr(new PrintStream(err)); - } - - /** - * Create a new CaptureOutput and start capturing - * @return The new CaptureOutput - */ - public static CaptureOutput createAndStart() { - CaptureOutput capture = new CaptureOutput(); - capture.start(); - return capture; - } - - /** - * Stop capturing standard output. - * @return A Map of Strings with the standard output value under the out key - * and the standard error value under the err key - */ - public Map stop() { - String str = out.toString().trim(); - System.setOut(originalOutputStream); - - String errStr = err.toString().trim(); - System.setErr(originalErrorOutputStream); - - Map map = new HashMap(); - map.put("out", str); - map.put("err", errStr); - - return map; - } -} diff --git a/src/test/java/org/geometrycommands/CentroidCommandTest.java b/src/test/java/org/geometrycommands/CentroidCommandTest.java deleted file mode 100644 index a3dab72d..00000000 --- a/src/test/java/org/geometrycommands/CentroidCommandTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The CentroidCommand UnitTest - * @author Jared Erickson - */ -public class CentroidCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - CentroidCommand command = new CentroidCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (5 5)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/CombineCommandTest.java b/src/test/java/org/geometrycommands/CombineCommandTest.java deleted file mode 100644 index 51117ff5..00000000 --- a/src/test/java/org/geometrycommands/CombineCommandTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The CombineCommand UnitTest - * @author Jared Erickson - */ -public class CombineCommandTest { - - private final static String NEW_LINE = System.getProperty("line.separator"); - - @Test - public void execute() throws Exception { - - Options options = new Options(); - CombineCommand command = new CombineCommand(); - - // Two Points - String text = "POINT (1 1)" + NEW_LINE + "POINT (2 2)" + NEW_LINE; - Reader reader = new StringReader(text); - StringWriter writer = new StringWriter(); - command.execute(options, reader, writer); - assertEquals("MULTIPOINT ((1 1), (2 2))", writer.getBuffer().toString()); - - // Three Points - text = "POINT (5 5)" + NEW_LINE + "POINT (1 1)" + NEW_LINE + "POINT (2 2)" + NEW_LINE; - reader = new StringReader(text); - writer = new StringWriter(); - command.execute(options, reader, writer); - assertEquals("MULTIPOINT ((5 5), (1 1), (2 2))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/ContainsCommandTest.java b/src/test/java/org/geometrycommands/ContainsCommandTest.java deleted file mode 100644 index 38c10f0d..00000000 --- a/src/test/java/org/geometrycommands/ContainsCommandTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The ContainsCommand UnitTest - * @author Jared Erickson - */ -public class ContainsCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POINT (5 5)"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - ContainsCommand command = new ContainsCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POINT (15 15)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new ContainsCommand(); - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/ConvexHullCommandTest.java b/src/test/java/org/geometrycommands/ConvexHullCommandTest.java deleted file mode 100644 index 82bc0969..00000000 --- a/src/test/java/org/geometrycommands/ConvexHullCommandTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The ConvexHullCommand UnitTest - * @author Jared Erickson - */ -public class ConvexHullCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTIPOINT ((12.27256417862947 12.73833434783841), " - + "(13.737894633461437 7.658802439672621), " - + "(6.857126638942733 8.821305316892328), " - + "(9.260874914207697 13.087320259444919), " - + "(8.017822881853032 7.492806794533148))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - ConvexHullCommand command = new ConvexHullCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((8.017822881853032 7.492806794533148, " - + "6.857126638942733 8.821305316892328, 9.260874914207697 " - + "13.087320259444919, 12.27256417862947 12.73833434783841, " - + "13.737894633461437 7.658802439672621, 8.017822881853032 " - + "7.492806794533148))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/CoordinatesCommandTest.java b/src/test/java/org/geometrycommands/CoordinatesCommandTest.java deleted file mode 100644 index f0df56e6..00000000 --- a/src/test/java/org/geometrycommands/CoordinatesCommandTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The CoordinatesCommand UnitTest - * @author Jared Erickson - */ -public class CoordinatesCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - CoordinatesCommand command = new CoordinatesCommand(); - command.execute(options, reader, writer); - assertEquals("MULTIPOINT ((0 0), (0 10), (10 10), (10 0), (0 0))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/CountGeometriesCommandTest.java b/src/test/java/org/geometrycommands/CountGeometriesCommandTest.java deleted file mode 100644 index 2b624f69..00000000 --- a/src/test/java/org/geometrycommands/CountGeometriesCommandTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The CountGeometriesCommand UnitTest - * @author Jared Erickson - */ -public class CountGeometriesCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTIPOINT ((0 0), (0 10), (10 10), (10 0), (0 0))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - CountGeometriesCommand command = new CountGeometriesCommand(); - command.execute(options, reader, writer); - assertEquals("5", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/CountPointsCommandTest.java b/src/test/java/org/geometrycommands/CountPointsCommandTest.java deleted file mode 100644 index a79c6ed7..00000000 --- a/src/test/java/org/geometrycommands/CountPointsCommandTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The CountPointsCommand UnitTest - * @author Jared Erickson - */ -public class CountPointsCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTIPOINT ((0 0), (0 10), (10 10), (10 0), (0 0))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - CountPointsCommand command = new CountPointsCommand(); - command.execute(options, reader, writer); - assertEquals("5", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/CoveredByCommandTest.java b/src/test/java/org/geometrycommands/CoveredByCommandTest.java deleted file mode 100644 index e1ba53c1..00000000 --- a/src/test/java/org/geometrycommands/CoveredByCommandTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The CoveredByCommand UnitTest - * @author Jared Erickson - */ -public class CoveredByCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POINT (5 5)"; - String otherGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - CoveredByCommand command = new CoveredByCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POINT (15 15)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new CoveredByCommand(); - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/CoversCommandTest.java b/src/test/java/org/geometrycommands/CoversCommandTest.java deleted file mode 100644 index 5857cc10..00000000 --- a/src/test/java/org/geometrycommands/CoversCommandTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The CoversCommand UnitTest - * @author Jared Erickson - */ -public class CoversCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POINT (5 5)"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - CoversCommand command = new CoversCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POINT (15 15)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new CoversCommand(); - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/CrossesCommandTest.java b/src/test/java/org/geometrycommands/CrossesCommandTest.java deleted file mode 100644 index f25a282a..00000000 --- a/src/test/java/org/geometrycommands/CrossesCommandTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The CrossesCommand UnitTest - * @author Jared Erickson - */ -public class CrossesCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "LINESTRING (5 5, 5 15)"; - String otherGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - CrossesCommand command = new CrossesCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "LINESTRING (15 15, 20 20)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new CrossesCommand(); - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/DelaunayTriangulationCommandTest.java b/src/test/java/org/geometrycommands/DelaunayTriangulationCommandTest.java deleted file mode 100644 index cd5b2807..00000000 --- a/src/test/java/org/geometrycommands/DelaunayTriangulationCommandTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.DelaunayTriangulationCommand.DelaunayTriangulationOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The DelaunayTriangulationCommand UnitTest - * @author Jared Erickson - */ -public class DelaunayTriangulationCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTIPOINT ((12.27256417862947 12.73833434783841), " - + "(13.737894633461437 7.658802439672621), " - + "(6.857126638942733 8.821305316892328), " - + "(9.260874914207697 13.087320259444919), " - + "(8.017822881853032 7.492806794533148))"; - DelaunayTriangulationOptions options = new DelaunayTriangulationOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - DelaunayTriangulationCommand command = new DelaunayTriangulationCommand(); - command.execute(options, reader, writer); - assertEquals("GEOMETRYCOLLECTION (POLYGON ((6.857126638942733 8.821305316892328, " - + "8.017822881853032 7.492806794533148, 9.260874914207697 13.087320259444919, " - + "6.857126638942733 8.821305316892328)), POLYGON ((9.260874914207697 " - + "13.087320259444919, 8.017822881853032 7.492806794533148, 12.27256417862947 " - + "12.73833434783841, 9.260874914207697 13.087320259444919)), POLYGON ((12.27256417862947 " - + "12.73833434783841, 8.017822881853032 7.492806794533148, 13.737894633461437 " - + "7.658802439672621, 12.27256417862947 12.73833434783841)))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/DensifyCommandTest.java b/src/test/java/org/geometrycommands/DensifyCommandTest.java deleted file mode 100644 index 3196119d..00000000 --- a/src/test/java/org/geometrycommands/DensifyCommandTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.DensifyCommand.DensifyOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The DensifyCommand UnitTest - * @author Jared Erickson - */ -public class DensifyCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "LINESTRING (1 1, 5 5, 12 12)"; - DensifyOptions options = new DensifyOptions(); - options.setGeometry(inputGeometry); - options.setDistanceTolerance(2); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - DensifyCommand command = new DensifyCommand(); - command.execute(options, reader, writer); - assertEquals("LINESTRING (1 1, 2.3333333333333335 2.3333333333333335, " - + "3.666666666666667 3.666666666666667, 5 5, 6.4 6.4, " - + "7.800000000000001 7.800000000000001, 9.200000000000001 " - + "9.200000000000001, 10.600000000000001 10.600000000000001, " - + "12 12)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/DifferenceCommandTest.java b/src/test/java/org/geometrycommands/DifferenceCommandTest.java deleted file mode 100644 index 38c3954a..00000000 --- a/src/test/java/org/geometrycommands/DifferenceCommandTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The DifferenceCommand UnitTest - * @author Jared Erickson - */ -public class DifferenceCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POLYGON ((5 5, 5 20, 20 20, 20 5, 5 5))"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - DifferenceCommand command = new DifferenceCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((0 0, 0 10, 5 10, 5 5, 10 5, 10 0, 0 0))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/DiscreteHausdorffDistanceCommandTest.java b/src/test/java/org/geometrycommands/DiscreteHausdorffDistanceCommandTest.java deleted file mode 100644 index b81acbdb..00000000 --- a/src/test/java/org/geometrycommands/DiscreteHausdorffDistanceCommandTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The DiscreteHausdorffDistanceCommand UnitTest - * @author Jared Erickson - */ -public class DiscreteHausdorffDistanceCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (1 1)"; - String otherGeometry = "POINT (20 23)"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - DiscreteHausdorffDistanceCommand command = new DiscreteHausdorffDistanceCommand(); - command.execute(options, reader, writer); - assertEquals("29.068883707497267", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/DisjointCommandTest.java b/src/test/java/org/geometrycommands/DisjointCommandTest.java deleted file mode 100644 index 9a0b6f76..00000000 --- a/src/test/java/org/geometrycommands/DisjointCommandTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The DisjointCommand UnitTest - * @author Jared Erickson - */ -public class DisjointCommandTest { - - @Test - public void execute() throws Exception { - - // false - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "LINESTRING (5 5, 5 15)"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - DisjointCommand command = new DisjointCommand(); - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - - // true - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "LINESTRING (15 15, 20 20)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new DisjointCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/DistanceCommandTest.java b/src/test/java/org/geometrycommands/DistanceCommandTest.java deleted file mode 100644 index a380c324..00000000 --- a/src/test/java/org/geometrycommands/DistanceCommandTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The DistanceCommand UnitTest - * @author Jared Erickson - */ -public class DistanceCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (1 1)"; - String otherGeometry = "POINT (20 23)"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - DistanceCommand command = new DistanceCommand(); - command.execute(options, reader, writer); - assertEquals("29.068883707497267", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/DistanceLineStringCommandTest.java b/src/test/java/org/geometrycommands/DistanceLineStringCommandTest.java deleted file mode 100644 index 5acd6594..00000000 --- a/src/test/java/org/geometrycommands/DistanceLineStringCommandTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The DistanceLineStringCommand UnitTest - * @author Jared Erickson - */ -public class DistanceLineStringCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (1 1)"; - String otherGeometry = "POINT (20 23)"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - DistanceLineStringCommand command = new DistanceLineStringCommand(); - command.execute(options, reader, writer); - assertEquals("LINESTRING (1 1, 20 23)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/DrawCommandTest.java b/src/test/java/org/geometrycommands/DrawCommandTest.java deleted file mode 100644 index 4d74a948..00000000 --- a/src/test/java/org/geometrycommands/DrawCommandTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.geometrycommands; - -import java.io.File; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.geometrycommands.DrawCommand.DrawOptions; -import org.junit.Test; -import static org.junit.Assert.assertTrue; - -/** - * The DrawCommand UnitTest - * @author Jared Erickson - */ -public class DrawCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - File file = File.createTempFile("image", ".png"); - System.out.println(file); - DrawOptions options = new DrawOptions(); - options.setGeometry(inputGeometry); - options.setFile(file); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - DrawCommand command = new DrawCommand(); - command.execute(options, reader, writer); - assertTrue(file.exists()); - } -} diff --git a/src/test/java/org/geometrycommands/DumpCommandTest.java b/src/test/java/org/geometrycommands/DumpCommandTest.java deleted file mode 100644 index c273b831..00000000 --- a/src/test/java/org/geometrycommands/DumpCommandTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The DumpCommand UnitTest - * @author Jared Erickson - */ -public class DumpCommandTest { - - private final static String NEW_LINE = System.getProperty("line.separator"); - - @Test - public void execute() throws Exception { - - // Single MultiPoint - String inputGeometry = "MULTIPOINT ((1 1), (2 2))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - DumpCommand command = new DumpCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (1 1)" + NEW_LINE + "POINT (2 2)" + NEW_LINE, writer.getBuffer().toString()); - - // GeometryCollection with nested MultPoint - inputGeometry = "GEOMETRYCOLLECTION (POINT (5 5), MULTIPOINT ((1 1), (2 2)))"; - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("POINT (5 5)" + NEW_LINE + "POINT (1 1)" + NEW_LINE + "POINT (2 2)" + NEW_LINE, writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/EllipseCommandTest.java b/src/test/java/org/geometrycommands/EllipseCommandTest.java deleted file mode 100644 index fdc8c0d2..00000000 --- a/src/test/java/org/geometrycommands/EllipseCommandTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The EllipseCommand UnitTest - * @author Jared Erickson - */ -public class EllipseCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (100 100)"; - ShapeFactoryOptions options = new ShapeFactoryOptions(); - options.setGeometry(inputGeometry); - options.setWidth(50); - options.setHeight(40); - options.setNumberOfPoints(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - EllipseCommand command = new EllipseCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((150 120, 145.22542485937367 131.75570504584945, " - + "132.72542485937367 139.02113032590307, " - + "117.27457514062631 139.02113032590307, " - + "104.77457514062633 131.75570504584945, " - + "100 120, 104.77457514062631 108.24429495415055, " - + "117.27457514062631 100.97886967409693, " - + "132.72542485937367 100.97886967409693, " - + "145.22542485937367 108.24429495415053, 150 120))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/EnvelopeCommandTest.java b/src/test/java/org/geometrycommands/EnvelopeCommandTest.java deleted file mode 100644 index f7bd3c0c..00000000 --- a/src/test/java/org/geometrycommands/EnvelopeCommandTest.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.EnvelopeCommand.EnvelopeOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The EnvelopeCommand UnitTest - * @author Jared Erickson - */ -public class EnvelopeCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - EnvelopeOptions options = new EnvelopeOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - EnvelopeCommand command = new EnvelopeCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))", writer.getBuffer().toString()); - } - - @Test - public void executeWithExpandBy() throws Exception { - - String inputGeometry = "POINT (5 5)"; - EnvelopeOptions options = new EnvelopeOptions(); - options.setGeometry(inputGeometry); - options.setExpandBy(5); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - EnvelopeCommand command = new EnvelopeCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))", writer.getBuffer().toString()); - } - -} diff --git a/src/test/java/org/geometrycommands/EqualsCommandTest.java b/src/test/java/org/geometrycommands/EqualsCommandTest.java deleted file mode 100644 index e76d258f..00000000 --- a/src/test/java/org/geometrycommands/EqualsCommandTest.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.EqualsCommand.EqualsOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The EqualsCommand UnitTest - * @author Jared Erickson - */ -public class EqualsCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - EqualsOptions options = new EqualsOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - EqualsCommand command = new EqualsCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POLYGON ((1 1, 1 10, 10 10, 10 1, 1 1))"; - options = new EqualsOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new EqualsCommand(); - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/GeometryTypeCommandTest.java b/src/test/java/org/geometrycommands/GeometryTypeCommandTest.java deleted file mode 100644 index 56e0457c..00000000 --- a/src/test/java/org/geometrycommands/GeometryTypeCommandTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The GeometryTypeCommand UnitTest - * @author Jared Erickson - */ -public class GeometryTypeCommandTest { - - @Test - public void execute() throws Exception { - - // Polygon - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - GeometryTypeCommand command = new GeometryTypeCommand(); - command.execute(options, reader, writer); - assertEquals("Polygon", writer.getBuffer().toString()); - - // Point - inputGeometry = "POINT (5 5)"; - options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new GeometryTypeCommand(); - command.execute(options, reader, writer); - assertEquals("Point", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/GetEndPointCommandTest.java b/src/test/java/org/geometrycommands/GetEndPointCommandTest.java deleted file mode 100644 index 544c25f8..00000000 --- a/src/test/java/org/geometrycommands/GetEndPointCommandTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The GetEndPointCommand UnitTest - * @author Jared Erickson - */ -public class GetEndPointCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "LINESTRING (1 1, 5 5, 10 10)"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - GetEndPointCommand command = new GetEndPointCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (10 10)", writer.getBuffer().toString()); - - inputGeometry = "MULTILINESTRING ((1 1, 5 5, 10 10), (20 20, 30 30, 40 40))"; - options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("POINT (40 40)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/GetGeometryCommandTest.java b/src/test/java/org/geometrycommands/GetGeometryCommandTest.java deleted file mode 100644 index 04ef41ca..00000000 --- a/src/test/java/org/geometrycommands/GetGeometryCommandTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.GetGeometryCommand.GetGeometryOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The GetGeometryCommand UnitTest - * @author Jared Erickson - */ -public class GetGeometryCommandTest { - - @Test - public void execute() throws Exception { - - // 0 - String inputGeometry = "MULTIPOINT ((0 0), (0 10), (10 10), (10 0))"; - GetGeometryOptions options = new GetGeometryOptions(); - options.setGeometry(inputGeometry); - options.setIndex(0); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - GetGeometryCommand command = new GetGeometryCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (0 0)", writer.getBuffer().toString()); - - // 2 - options = new GetGeometryOptions(); - options.setGeometry(inputGeometry); - options.setIndex(2); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("POINT (10 10)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/GetStartPointCommandTest.java b/src/test/java/org/geometrycommands/GetStartPointCommandTest.java deleted file mode 100644 index 33171dc7..00000000 --- a/src/test/java/org/geometrycommands/GetStartPointCommandTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The GetStartPointCommand UnitTest - * @author Jared Erickson - */ -public class GetStartPointCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "LINESTRING (1 1, 5 5, 10 10)"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - GetStartPointCommand command = new GetStartPointCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (1 1)", writer.getBuffer().toString()); - - inputGeometry = "MULTILINESTRING ((1 1, 5 5, 10 10), (20 20, 30 30, 40 40))"; - options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("POINT (1 1)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/GridCommandTest.java b/src/test/java/org/geometrycommands/GridCommandTest.java deleted file mode 100644 index 668cd44b..00000000 --- a/src/test/java/org/geometrycommands/GridCommandTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.GridCommand.GridOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The GridCommand UnitTest - * @author Jared Erickson - */ -public class GridCommandTest { - - @Test - public void execute() throws Exception { - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - GridOptions options = new GridOptions(); - options.setGeometry(inputGeometry); - options.setNumberOfColumns(2); - options.setNumberOfRows(2); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - GridCommand command = new GridCommand(); - command.execute(options, reader, writer); - assertEquals("GEOMETRYCOLLECTION (" - + "POLYGON ((0 0, 0 5, 5 5, 5 0, 0 0)), " - + "POLYGON ((5 0, 5 5, 10 5, 10 0, 5 0)), " - + "POLYGON ((0 5, 0 10, 5 10, 5 5, 0 5)), " - + "POLYGON ((5 5, 5 10, 10 10, 10 5, 5 5)))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/InteriorPointCommandTest.java b/src/test/java/org/geometrycommands/InteriorPointCommandTest.java deleted file mode 100644 index afe89451..00000000 --- a/src/test/java/org/geometrycommands/InteriorPointCommandTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The InteriorPointCommand UnitTest - * @author Jared Erickson - */ -public class InteriorPointCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((9.89990234375 52.7880859375, " - + "9.89990234375 49.931640625, 15.39306640625 49.580078125, " - + "15.48095703125 43.251953125, 8.97705078125 43.251953125, " - + "9.24072265625 40.615234375, 19.61181640625 40.5712890625, " - + "18.38134765625 52.4365234375, 9.89990234375 52.7880859375))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - InteriorPointCommand command = new InteriorPointCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (17.205851236979164 46.6796875)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/InterpolatePointCommandTest.java b/src/test/java/org/geometrycommands/InterpolatePointCommandTest.java deleted file mode 100644 index 75de0f56..00000000 --- a/src/test/java/org/geometrycommands/InterpolatePointCommandTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.InterpolatePointCommand.InterpolatePointOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The InterpolatePointCommand UnitTest - * @author Jared Erickson - */ -public class InterpolatePointCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "LINESTRING (0 0, 5 5, 10 10)"; - InterpolatePointOptions options = new InterpolatePointOptions(); - options.setGeometry(inputGeometry); - options.setPosition(0.25); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - InterpolatePointCommand command = new InterpolatePointCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (2.5 2.5)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/IntersectionCommandTest.java b/src/test/java/org/geometrycommands/IntersectionCommandTest.java deleted file mode 100644 index e571946c..00000000 --- a/src/test/java/org/geometrycommands/IntersectionCommandTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The IntersectionCommand UnitTest - * @author Jared Erickson - */ -public class IntersectionCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POLYGON ((5 5, 5 20, 20 20, 20 5, 5 5))"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - IntersectionCommand command = new IntersectionCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((5 10, 10 10, 10 5, 5 5, 5 10))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/IntersectsCommandTest.java b/src/test/java/org/geometrycommands/IntersectsCommandTest.java deleted file mode 100644 index 17d95880..00000000 --- a/src/test/java/org/geometrycommands/IntersectsCommandTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The IntersectsCommand UnitTest - * @author Jared Erickson - */ -public class IntersectsCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POINT (5 5)"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - IntersectsCommand command = new IntersectsCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POINT (15 15)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new IntersectsCommand(); - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/IsClosedCommandTest.java b/src/test/java/org/geometrycommands/IsClosedCommandTest.java deleted file mode 100644 index 8572195a..00000000 --- a/src/test/java/org/geometrycommands/IsClosedCommandTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The IsClosedCommand UnitTest - * @author Jared Erickson - */ -public class IsClosedCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "LINESTRING (1 1, 1 5, 5 5, 5 1, 1 1)"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - IsClosedCommand command = new IsClosedCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "LINESTRING (1 1, 5 5, 10 10)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/IsEmptyCommandTest.java b/src/test/java/org/geometrycommands/IsEmptyCommandTest.java deleted file mode 100644 index 4a737352..00000000 --- a/src/test/java/org/geometrycommands/IsEmptyCommandTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The IsEmptyCommand UnitTest - * @author Jared Erickson - */ -public class IsEmptyCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POINT EMPTY"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - IsEmptyCommand command = new IsEmptyCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POINT (15 15)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new IsEmptyCommand(); - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/IsRectangleCommandTest.java b/src/test/java/org/geometrycommands/IsRectangleCommandTest.java deleted file mode 100644 index 1e0d01f7..00000000 --- a/src/test/java/org/geometrycommands/IsRectangleCommandTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The IsRectangleCommand UnitTest - * @author Jared Erickson - */ -public class IsRectangleCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - IsRectangleCommand command = new IsRectangleCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 0, 0 0))"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/IsRingCommandTest.java b/src/test/java/org/geometrycommands/IsRingCommandTest.java deleted file mode 100644 index 2ab84d5d..00000000 --- a/src/test/java/org/geometrycommands/IsRingCommandTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The IsRingCommand UnitTest - * @author Jared Erickson - */ -public class IsRingCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "LINESTRING (1 1, 1 5, 5 5, 5 1, 1 1)"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - IsRingCommand command = new IsRingCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "LINESTRING (1 1, 5 5, 10 10)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/IsSimpleCommandTest.java b/src/test/java/org/geometrycommands/IsSimpleCommandTest.java deleted file mode 100644 index 88db8e28..00000000 --- a/src/test/java/org/geometrycommands/IsSimpleCommandTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The IsSimpleCommand UnitTest - * @author Jared Erickson - */ -public class IsSimpleCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - IsSimpleCommand command = new IsSimpleCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "LINESTRING (8.14208984375 48.0419921875, " - + "10.60302734375 51.6015625, 11.56982421875 47.91015625, " - + "8.36181640625 50.72265625)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/IsValidCommandTest.java b/src/test/java/org/geometrycommands/IsValidCommandTest.java deleted file mode 100644 index bfd02547..00000000 --- a/src/test/java/org/geometrycommands/IsValidCommandTest.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.IsValidCommand.IsValidOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The IsValidCommand UnitTest - * @author Jared Erickson - */ -public class IsValidCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - IsValidOptions options = new IsValidOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - IsValidCommand command = new IsValidCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((17.06298828125 49.7998046875, " - + "14.25048828125 44.04296875, 18.24951171875 44.04296875, " - + "13.45947265625 48.1298828125, 17.06298828125 " - + "49.7998046875))"; - options = new IsValidOptions(); - options.setGeometry(inputGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - - // message - options.setGeometry(inputGeometry); - options.setType("msg"); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("Self-intersection", writer.getBuffer().toString()); - - // location - options.setGeometry(inputGeometry); - options.setType("loc"); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("POINT (15.42700884375309 46.45115927637351)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/IsWithinDistanceCommandTest.java b/src/test/java/org/geometrycommands/IsWithinDistanceCommandTest.java deleted file mode 100644 index a2cb855b..00000000 --- a/src/test/java/org/geometrycommands/IsWithinDistanceCommandTest.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.IsWithinDistanceCommand.IsWithinDistanceOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The IsWithinDistanceCommand UnitTest - * @author Jared Erickson - */ -public class IsWithinDistanceCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POINT (1 1)"; - String otherGeometry = "POINT (20 23)"; - IsWithinDistanceOptions options = new IsWithinDistanceOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - options.setDistance(30); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - IsWithinDistanceCommand command = new IsWithinDistanceCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - options.setDistance(10); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command = new IsWithinDistanceCommand(); - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/KochSnowflakeCommandTest.java b/src/test/java/org/geometrycommands/KochSnowflakeCommandTest.java deleted file mode 100644 index fbb216c6..00000000 --- a/src/test/java/org/geometrycommands/KochSnowflakeCommandTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.KochSnowflakeCommand.KochSnowflakeOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The KochSnowflakeCommand UnitTest - * @author Jared Erickson - */ -public class KochSnowflakeCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - KochSnowflakeOptions options = new KochSnowflakeOptions(); - options.setGeometry(inputGeometry); - options.setNumberOfPoints(30); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - KochSnowflakeCommand command = new KochSnowflakeCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((1.6666666666666665 5.773502691896256, " - + "0.0000000000000004 8.660254037844386, 3.333333333333333 " - + "8.660254037844386, 5 11.547005383792515, 6.666666666666666 " - + "8.660254037844386, 10 8.660254037844386, 8.333333333333332 " - + "5.773502691896258, 10 2.8867513459481287, 6.666666666666667 " - + "2.8867513459481287, 5 0, 3.333333333333334 2.8867513459481287, " - + "0 2.8867513459481287, 1.6666666666666665 5.773502691896256))" - , writer.getBuffer().toString()); - - } -} diff --git a/src/test/java/org/geometrycommands/LineMergeCommandTest.java b/src/test/java/org/geometrycommands/LineMergeCommandTest.java deleted file mode 100644 index 54625148..00000000 --- a/src/test/java/org/geometrycommands/LineMergeCommandTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The LineMergeCommand UnitTest - * @author Jared Erickson - */ -public class LineMergeCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - LineMergeCommand command = new LineMergeCommand(); - command.execute(options, reader, writer); - assertEquals("MULTILINESTRING ((-29 -27, -30 -29.7, -36 -31, -45 -33, -46 -32))", - writer.getBuffer().toString()); - } -} \ No newline at end of file diff --git a/src/test/java/org/geometrycommands/ListCommandTest.java b/src/test/java/org/geometrycommands/ListCommandTest.java deleted file mode 100644 index 73c1af70..00000000 --- a/src/test/java/org/geometrycommands/ListCommandTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -/** - * The ListCommand UnitTest - * @author Jared Erickson - */ -public class ListCommandTest { - - @Test - public void execute() throws Exception { - - Reader reader = new StringReader(""); - StringWriter writer = new StringWriter(); - - Options options = new Options(); - - ListCommand command = new ListCommand(); - command.execute(options, reader, writer); - String output = writer.getBuffer().toString(); - assertFalse(output.isEmpty()); - String[] lines = output.split(System.getProperty("line.separator")); - assertTrue(lines.length > 0); - } -} diff --git a/src/test/java/org/geometrycommands/LocatePointCommandTest.java b/src/test/java/org/geometrycommands/LocatePointCommandTest.java deleted file mode 100644 index c66f361e..00000000 --- a/src/test/java/org/geometrycommands/LocatePointCommandTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The LocatePointCommand UnitTest - * @author Jared Erickson - */ -public class LocatePointCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "LINESTRING (0 0, 5 5, 10 10)"; - String otherGeometry = "POINT (2.5 2.5)"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - LocatePointCommand command = new LocatePointCommand(); - command.execute(options, reader, writer); - assertEquals("0.25", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/MinimumBoundingCircleCommandTest.java b/src/test/java/org/geometrycommands/MinimumBoundingCircleCommandTest.java deleted file mode 100644 index 748b6137..00000000 --- a/src/test/java/org/geometrycommands/MinimumBoundingCircleCommandTest.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The MinimumBoundingCircleCommand UnitTest - * @author Jared Erickson - */ -public class MinimumBoundingCircleCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTIPOINT ((12.27256417862947 12.73833434783841), " - + "(13.737894633461437 7.658802439672621), " - + "(6.857126638942733 8.821305316892328), " - + "(9.260874914207697 13.087320259444919), " - + "(8.017822881853032 7.492806794533148))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - MinimumBoundingCircleCommand command = new MinimumBoundingCircleCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((14.261208198913506 9.566699017816614, " - + "14.189353574798158 8.83714677603589, 13.976551035360327 " - + "8.13563081776919, 13.630978462849573 7.489110007878018, " - + "13.165916017428149 6.9224297785134485, 12.599235788063577 " - + "6.457367333092024, 11.952714978172406 6.111794760581269, " - + "11.251199019905705 5.898992221143438, 10.521646778124982 " - + "5.82713759702809, 9.792094536344258 5.898992221143438, " - + "9.090578578077558 6.111794760581269, 8.444057768186386 " - + "6.457367333092024, 7.877377538821817 6.922429778513448, " - + "7.412315093400392 7.489110007878018, 7.066742520889636 " - + "8.13563081776919, 6.853939981451806 8.837146776035892, " - + "6.782085357336458 9.566699017816617, 6.853939981451807 " - + "10.29625125959734, 7.066742520889639 10.997767217864043, " - + "7.4123150934003945 11.644288027755213, 7.87737753882182 " - + "12.210968257119784, 8.444057768186392 12.676030702541208, " - + "9.090578578077565 13.021603275051962, 9.792094536344267 " - + "13.234405814489792, 10.52164677812499 13.306260438605138, " - + "11.251199019905716 13.234405814489788, 11.952714978172416 " - + "13.021603275051955, 12.599235788063588 12.676030702541198, " - + "13.165916017428156 12.21096825711977, 13.63097846284958 " - + "11.644288027755199, 13.976551035360332 10.997767217864025, " - + "14.189353574798162 10.296251259597323, 14.261208198913506 " - + "9.566699017816614))", writer.getBuffer().toString()); - } -} \ No newline at end of file diff --git a/src/test/java/org/geometrycommands/MinimumClearanceCommandTest.java b/src/test/java/org/geometrycommands/MinimumClearanceCommandTest.java deleted file mode 100644 index 4f123ba4..00000000 --- a/src/test/java/org/geometrycommands/MinimumClearanceCommandTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - - -/** - * The MinimumClearanceCommand UnitTest - * @author Jared Erickson - */ -public class MinimumClearanceCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((15.92041015625 51.25, 6.91162109375 " - + "52.5244140625, 12.36083984375 45.9765625, 5.46142578125 " - + "40.7470703125, 11.56982421875 41.1865234375, " - + "15.92041015625 51.25))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - MinimumClearanceCommand command = new MinimumClearanceCommand(); - command.execute(options, reader, writer); - assertEquals("LINESTRING (12.36083984375 45.9765625, " - + "13.439104121814852 45.510413314286374)", writer.getBuffer().toString()); - } -} \ No newline at end of file diff --git a/src/test/java/org/geometrycommands/MinimumDiameterCommandTest.java b/src/test/java/org/geometrycommands/MinimumDiameterCommandTest.java deleted file mode 100644 index 875b0777..00000000 --- a/src/test/java/org/geometrycommands/MinimumDiameterCommandTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The MinimumDiameterCommand UnitTest - * @author Jared Erickson - */ -public class MinimumDiameterCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((15.92041015625 51.25, 6.91162109375 " - + "52.5244140625, 12.36083984375 45.9765625, 5.46142578125 " - + "40.7470703125, 11.56982421875 41.1865234375, " - + "15.92041015625 51.25))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - MinimumDiameterCommand command = new MinimumDiameterCommand(); - command.execute(options, reader, writer); - assertEquals("LINESTRING (14.966024044129165 49.042379599235645, " - + "6.91162109375 52.5244140625)", writer.getBuffer().toString()); - } -} \ No newline at end of file diff --git a/src/test/java/org/geometrycommands/MinimumRectangleCommandTest.java b/src/test/java/org/geometrycommands/MinimumRectangleCommandTest.java deleted file mode 100644 index 613bc806..00000000 --- a/src/test/java/org/geometrycommands/MinimumRectangleCommandTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The MinimumRectangleCommand UnitTest - * @author Jared Erickson - */ -public class MinimumRectangleCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTIPOINT ((12.27256417862947 12.73833434783841), " - + "(13.737894633461437 7.658802439672621), " - + "(6.857126638942733 8.821305316892328), " - + "(9.260874914207697 13.087320259444919), " - + "(8.017822881853032 7.492806794533148))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - MinimumRectangleCommand command = new MinimumRectangleCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((13.737894633461437 7.658802439672627, " - + "13.576725239178604 13.212565604281293, 6.7354542973976805 " - + "13.014032922722615, 6.896623691680514 7.460269758113947, " - + "13.737894633461437 7.658802439672627))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/NodeCommandTest.java b/src/test/java/org/geometrycommands/NodeCommandTest.java deleted file mode 100644 index a48524af..00000000 --- a/src/test/java/org/geometrycommands/NodeCommandTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.NodeCommand.NodeOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The NodeCommand UnitTest - * @author Jared Erickson - */ -public class NodeCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "LINESTRING (5.19775390625 51.07421875, 7.52685546875 53.7548828125, 11.65771484375 49.931640625, " - + "7.52685546875 47.20703125, 9.50439453125 54.501953125, 7.35107421875 52.4365234375, 4.53857421875 " - + "52.65625, 6.38427734375 50.634765625)"; - NodeOptions options = new NodeOptions(); - options.setGeometry(inputGeometry); - options.setNumberOfDecimalPlaces(5); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - NodeCommand command = new NodeCommand(); - command.execute(options, reader, writer); - assertEquals("MULTILINESTRING ((5.19775390625 51.07421875, 5.6 51.6), (5.6 51.6, 6.4 52.6), " + - "(6.4 52.6, 7.52685546875 53.7548828125), (7.52685546875 53.7548828125, 8.2 53.2), " + - "(8.2 53.2, 9 52.4), (9 52.4, 11.65771484375 49.931640625), (11.65771484375 49.931640625, " + - "7.52685546875 47.20703125), (7.52685546875 47.20703125, 9 52.4), (9 52.4, 9.50439453125 " + - "54.501953125), (9.50439453125 54.501953125, 8.2 53.2), (8.2 53.2, 7.35107421875 52.4365234375), " + - "(7.35107421875 52.4365234375, 6.4 52.6), (6.4 52.6, 4.53857421875 52.65625), (4.53857421875 " + - "52.65625, 5.6 51.6), (5.6 51.6, 6.38427734375 50.634765625))", writer.getBuffer().toString()); - } -} \ No newline at end of file diff --git a/src/test/java/org/geometrycommands/NormalizeCommandTest.java b/src/test/java/org/geometrycommands/NormalizeCommandTest.java deleted file mode 100644 index d7e78efb..00000000 --- a/src/test/java/org/geometrycommands/NormalizeCommandTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The NormalizeCommand UnitTest - * @author Jared Erickson - */ -public class NormalizeCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTIPOINT ((12.27256417862947 12.73833434783841), " - + "(13.737894633461437 7.658802439672621), " - + "(6.857126638942733 8.821305316892328), " - + "(9.260874914207697 13.087320259444919), " - + "(8.017822881853032 7.492806794533148))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - NormalizeCommand command = new NormalizeCommand(); - command.execute(options, reader, writer); - assertEquals("MULTIPOINT ((6.857126638942733 8.821305316892328), " - + "(8.017822881853032 7.492806794533148), (9.260874914207697 " - + "13.087320259444919), (12.27256417862947 12.73833434783841), " - + "(13.737894633461437 7.658802439672621))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/OctagonalEnvelopeCommandTest.java b/src/test/java/org/geometrycommands/OctagonalEnvelopeCommandTest.java deleted file mode 100644 index 2bffb249..00000000 --- a/src/test/java/org/geometrycommands/OctagonalEnvelopeCommandTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The OctagonalEnvelopeCommand UnitTest - * @author Jared Erickson - */ -public class OctagonalEnvelopeCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTIPOINT ((12.27256417862947 12.73833434783841), " - + "(13.737894633461437 7.658802439672621), " - + "(6.857126638942733 8.821305316892328), " - + "(9.260874914207697 13.087320259444919), " - + "(8.017822881853032 7.492806794533148))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - OctagonalEnvelopeCommand command = new OctagonalEnvelopeCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((6.857126638942733 8.653503037443446, " - + "6.857126638942733 10.683571984179956, 9.260874914207697 " - + "13.087320259444919, 11.923578267022961 13.087320259444919, " - + "13.737894633461437 11.273003893006443, 13.737894633461437 " - + "7.658802439672621, 13.571898988321964 7.492806794533148, " - + "8.017822881853032 7.492806794533148, 6.857126638942733 " - + "8.653503037443446))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/OverlapsCommandTest.java b/src/test/java/org/geometrycommands/OverlapsCommandTest.java deleted file mode 100644 index 4ee55433..00000000 --- a/src/test/java/org/geometrycommands/OverlapsCommandTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The OverlapsCommand UnitTest - * @author Jared Erickson - */ -public class OverlapsCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POLYGON ((2 2, 2 14, 14 14, 14 2, 2 2))"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - OverlapsCommand command = new OverlapsCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POINT (15 15)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/PlacePointCommandTest.java b/src/test/java/org/geometrycommands/PlacePointCommandTest.java deleted file mode 100644 index b11f70e1..00000000 --- a/src/test/java/org/geometrycommands/PlacePointCommandTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The PlacePointCommand UnitTest - * @author Jared Erickson - */ -public class PlacePointCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "LINESTRING (0 0, 5 5, 10 10)"; - String otherGeometry = "POINT (3 4.5)"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - PlacePointCommand command = new PlacePointCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (3.75 3.75)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/PointAtAngleCommandTest.java b/src/test/java/org/geometrycommands/PointAtAngleCommandTest.java deleted file mode 100644 index 06879fce..00000000 --- a/src/test/java/org/geometrycommands/PointAtAngleCommandTest.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.PointAtAngleCommand.PointAtAngleOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The PointAtAngleCommand UnitTest - * @author Jared Erickson - */ -public class PointAtAngleCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (10 10)"; - PointAtAngleOptions options = new PointAtAngleOptions(); - options.setGeometry(inputGeometry); - options.setAngle(90); - options.setDistance(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - PointAtAngleCommand command = new PointAtAngleCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (10 20)", writer.getBuffer().toString()); - - inputGeometry = "POINT (10 10)"; - options = new PointAtAngleOptions(); - options.setGeometry(inputGeometry); - options.setAngle(45); - options.setDistance(5); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("POINT (13.535533905932738 13.535533905932738)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/PolygonizeCommandTest.java b/src/test/java/org/geometrycommands/PolygonizeCommandTest.java deleted file mode 100644 index a9394e0f..00000000 --- a/src/test/java/org/geometrycommands/PolygonizeCommandTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.MultiPolygon; -import com.vividsolutions.jts.io.WKTReader; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * The PolygonizeCommand UnitTest - * @author Jared Erickson - */ -public class PolygonizeCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTILINESTRING ((-5.70068359375 45.1416015625, " - + "-4.6 46.4), (-4.6 46.4, 1 52.2), (1 52.2, 2.47314453125 " - + "53.9306640625), (-1.21826171875 53.9306640625, 1 52.2), " - + "(1 52.2, 5.6 48.6), (5.6 48.6, 8.88916015625 46.1962890625), " - + "(0.71533203125 42.63671875, 1.8 44), (1.8 44, 5.6 48.6), " - + "(5.6 48.6, 7.13134765625 50.37109375), (-5.83251953125 " - + "46.943359375, -4.6 46.4), (-4.6 46.4, 1.8 44), (1.8 44, " - + "4.45068359375 42.98828125))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - PolygonizeCommand command = new PolygonizeCommand(); - command.execute(options, reader, writer); - Geometry outputGeometry = new WKTReader().read(writer.getBuffer().toString()); - assertTrue(outputGeometry instanceof MultiPolygon); - assertEquals(1, outputGeometry.getNumGeometries()); - } -} \ No newline at end of file diff --git a/src/test/java/org/geometrycommands/PrecisionReducerCommandTest.java b/src/test/java/org/geometrycommands/PrecisionReducerCommandTest.java deleted file mode 100644 index 233828ba..00000000 --- a/src/test/java/org/geometrycommands/PrecisionReducerCommandTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.PrecisionReducerCommand.PrecisionReducerOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The PrecisionReducerCommand UnitTest - * @author Jared Erickson - */ -public class PrecisionReducerCommandTest { - - @Test - public void execute() throws Exception { - - PrecisionReducerCommand command = new PrecisionReducerCommand(); - - // Floating - String inputGeometry = "POINT (5.19775390625 51.07421875)"; - PrecisionReducerOptions options = new PrecisionReducerOptions(); - options.setGeometry(inputGeometry); - options.setPrecisionModelType("floating"); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("POINT (5.19775390625 51.07421875)", writer.getBuffer().toString()); - - // Fixed - inputGeometry = "POINT (5.19775390625 51.07421875)"; - options = new PrecisionReducerOptions(); - options.setGeometry(inputGeometry); - options.setPrecisionModelType("fixed"); - options.setPrecisionModelScale(10); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("POINT (5.2 51.1)", writer.getBuffer().toString()); - - // Floating Single - inputGeometry = "POINT (5.19775390625 51.07421875)"; - options = new PrecisionReducerOptions(); - options.setGeometry(inputGeometry); - options.setPrecisionModelType("FLOATING_SINGLE"); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("POINT (5.19775390625 51.07421875)", writer.getBuffer().toString()); - } -} \ No newline at end of file diff --git a/src/test/java/org/geometrycommands/ProjectCommandTest.java b/src/test/java/org/geometrycommands/ProjectCommandTest.java deleted file mode 100644 index b09f5bcf..00000000 --- a/src/test/java/org/geometrycommands/ProjectCommandTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.ProjectCommand.ProjectOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The ProjectCommand UnitTest - * @author Jared Erickson - */ -public class ProjectCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (1186683.01 641934.58)"; - ProjectOptions options = new ProjectOptions(); - options.setGeometry(inputGeometry); - options.setSource("EPSG:2927"); - options.setTarget("EPSG:4326"); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - ProjectCommand command = new ProjectCommand(); - command.execute(options, reader, writer); - assertEquals("POINT (-122.32131937934592 47.07927009358412)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/RandomCommandTest.java b/src/test/java/org/geometrycommands/RandomCommandTest.java deleted file mode 100644 index f322c74c..00000000 --- a/src/test/java/org/geometrycommands/RandomCommandTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.io.WKTReader; -import org.geometrycommands.RandomCommand.RandomOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The RandomCommand UnitTest - * @author Jared Erickson - */ -public class RandomCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - RandomOptions options = new RandomOptions(); - options.setGeometry(inputGeometry); - options.setNumber(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - RandomCommand command = new RandomCommand(); - command.execute(options, reader, writer); - String output = writer.getBuffer().toString(); - Geometry geometry = new WKTReader().read(output); - assertEquals("MultiPoint", geometry.getGeometryType()); - assertEquals(10, geometry.getNumGeometries()); - } -} diff --git a/src/test/java/org/geometrycommands/RandomWalkCommandTest.java b/src/test/java/org/geometrycommands/RandomWalkCommandTest.java deleted file mode 100644 index 62964ea0..00000000 --- a/src/test/java/org/geometrycommands/RandomWalkCommandTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.io.WKTReader; -import org.geometrycommands.RandomWalkCommand.RandomWalkOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * The RandomWalkCommand UnitTest - * @author Jared Erickson - */ -public class RandomWalkCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (100 100)"; - RandomWalkOptions options = new RandomWalkOptions(); - options.setGeometry(inputGeometry); - options.setNumberOfWalks(10); - options.setAngleIncrement(45); - options.setDistance(10); - options.setProbability(0.80); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - RandomWalkCommand command = new RandomWalkCommand(); - command.execute(options, reader, writer); - Geometry g = new WKTReader().read(writer.getBuffer().toString()); - assertTrue(g instanceof LineString); - assertEquals(11, g.getNumPoints()); - } -} \ No newline at end of file diff --git a/src/test/java/org/geometrycommands/RectangleCommandTest.java b/src/test/java/org/geometrycommands/RectangleCommandTest.java deleted file mode 100644 index ee46e0cc..00000000 --- a/src/test/java/org/geometrycommands/RectangleCommandTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The RectangleCommand UnitTest - * @author Jared Erickson - */ -public class RectangleCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (100 100)"; - ShapeFactoryOptions options = new ShapeFactoryOptions(); - options.setGeometry(inputGeometry); - options.setWidth(50); - options.setHeight(40); - options.setNumberOfPoints(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - RectangleCommand command = new RectangleCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((100 100, 125 100, 150 100, 150 120, 150 140, " - + "125 140, 100 140, 100 120, 100 100))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/ReflectCommandTest.java b/src/test/java/org/geometrycommands/ReflectCommandTest.java deleted file mode 100644 index 065ba40c..00000000 --- a/src/test/java/org/geometrycommands/ReflectCommandTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.ReflectCommand.ReflectOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The ReflectCommand UnitTest - * @author Jared Erickson - */ -public class ReflectCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - ReflectOptions options = new ReflectOptions(); - options.setGeometry(inputGeometry); - options.setX0(5); - options.setY0(2); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - ReflectCommand command = new ReflectCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((0 0, 6.8965517241379315 -7.241379310344829, " - + "14.137931034482762 -0.3448275862068977, " - + "7.241379310344829 6.8965517241379315, 0 0))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/RelateCommandTest.java b/src/test/java/org/geometrycommands/RelateCommandTest.java deleted file mode 100644 index 7688fd30..00000000 --- a/src/test/java/org/geometrycommands/RelateCommandTest.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.RelateCommand.RelateOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The RelateCommand UnitTest - * @author Jared Erickson - */ -public class RelateCommandTest { - - @Test - public void execute() throws Exception { - - // Get Matrix - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POINT (5 5)"; - RelateOptions options = new RelateOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - RelateCommand command = new RelateCommand(); - command.execute(options, reader, writer); - assertEquals("0F2FF1FF2", writer.getBuffer().toString()); - - // Is Related? - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POINT (5 5)"; - options = new RelateOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - options.setIntersectionMatrix("0F2FF1FF2"); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/ReverseCommandTest.java b/src/test/java/org/geometrycommands/ReverseCommandTest.java deleted file mode 100644 index ca8c5bca..00000000 --- a/src/test/java/org/geometrycommands/ReverseCommandTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The ReverseCommand UnitTest - * @author Jared Erickson - */ -public class ReverseCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "LINESTRING (0 0, 5 5, 10 10)"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - ReverseCommand command = new ReverseCommand(); - command.execute(options, reader, writer); - assertEquals("LINESTRING (10 10, 5 5, 0 0)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/RotateCommandTest.java b/src/test/java/org/geometrycommands/RotateCommandTest.java deleted file mode 100644 index e4c8770f..00000000 --- a/src/test/java/org/geometrycommands/RotateCommandTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.RotateCommand.RotateOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The RotateCommand UnitTest - * @author Jared Erickson - */ -public class RotateCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - RotateOptions options = new RotateOptions(); - options.setGeometry(inputGeometry); - options.setTheta(Math.toRadians(45)); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - RotateCommand command = new RotateCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((0 0, -7.071067811865475 7.0710678118654755, " - + "0.0000000000000009 14.142135623730951, 7.0710678118654755 " - + "7.071067811865475, 0 0))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/ScaleCommandTest.java b/src/test/java/org/geometrycommands/ScaleCommandTest.java deleted file mode 100644 index 45fe9e0b..00000000 --- a/src/test/java/org/geometrycommands/ScaleCommandTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.ScaleCommand.ScaleOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The ScaleCommand UnitTest - * @author Jared Erickson - */ -public class ScaleCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - ScaleOptions options = new ScaleOptions(); - options.setGeometry(inputGeometry); - options.setXScale(2); - options.setYScale(5); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - ScaleCommand command = new ScaleCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((0 0, 0 50, 20 50, " - + "20 0, 0 0))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/ShearCommandTest.java b/src/test/java/org/geometrycommands/ShearCommandTest.java deleted file mode 100644 index b0c1b3ed..00000000 --- a/src/test/java/org/geometrycommands/ShearCommandTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.ShearCommand.ShearOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The ShearCommand UnitTest - * @author Jared Erickson - */ -public class ShearCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - ShearOptions options = new ShearOptions(); - options.setGeometry(inputGeometry); - options.setX(4); - options.setY(2); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - ShearCommand command = new ShearCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((0 0, 40 10, " - + "50 30, 10 20, 0 0))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/SierpinskiCarpetCommandTest.java b/src/test/java/org/geometrycommands/SierpinskiCarpetCommandTest.java deleted file mode 100644 index 31d5d306..00000000 --- a/src/test/java/org/geometrycommands/SierpinskiCarpetCommandTest.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.SierpinskiCarpetCommand.SierpinskiCarpetOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The SierpinskiCarpetCommand UnitTest - * @author Jared Erickson - */ -public class SierpinskiCarpetCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - SierpinskiCarpetOptions options = new SierpinskiCarpetOptions(); - options.setGeometry(inputGeometry); - options.setNumberOfPoints(30); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - SierpinskiCarpetCommand command = new SierpinskiCarpetCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0), (1.1111111111111112 " - + "1.1111111111111112, 2.2222222222222223 1.1111111111111112, " - + "2.2222222222222223 2.2222222222222223, 1.1111111111111112 " - + "2.2222222222222223, 1.1111111111111112 1.1111111111111112), " - + "(4.444444444444445 1.1111111111111112, 5.555555555555555 1.1111111111111112, " - + "5.555555555555555 2.2222222222222223, 4.444444444444445 2.2222222222222223, " - + "4.444444444444445 1.1111111111111112), (7.777777777777779 1.1111111111111112, " - + "8.88888888888889 1.1111111111111112, 8.88888888888889 2.2222222222222223, " - + "7.777777777777779 2.2222222222222223, 7.777777777777779 1.1111111111111112), " - + "(1.1111111111111112 4.444444444444445, 2.2222222222222223 4.444444444444445, " - + "2.2222222222222223 5.555555555555555, 1.1111111111111112 5.555555555555555, " - + "1.1111111111111112 4.444444444444445), (7.777777777777779 4.444444444444445, " - + "8.88888888888889 4.444444444444445, 8.88888888888889 5.555555555555555, " - + "7.777777777777779 5.555555555555555, 7.777777777777779 4.444444444444445), " - + "(1.1111111111111112 7.777777777777779, 2.2222222222222223 7.777777777777779, " - + "2.2222222222222223 8.88888888888889, 1.1111111111111112 8.88888888888889, 1.1111111111111112 " - + "7.777777777777779), (4.444444444444445 7.777777777777779, 5.555555555555555 7.777777777777779, " - + "5.555555555555555 8.88888888888889, 4.444444444444445 8.88888888888889, 4.444444444444445 " - + "7.777777777777779), (7.777777777777779 7.777777777777779, 8.88888888888889 7.777777777777779, " - + "8.88888888888889 8.88888888888889, 7.777777777777779 8.88888888888889, 7.777777777777779 " - + "7.777777777777779), (3.3333333333333335 3.3333333333333335, 6.666666666666667 " - + "3.3333333333333335, 6.666666666666667 6.666666666666667, 3.3333333333333335 " - + "6.666666666666667, 3.3333333333333335 3.3333333333333335))" - , writer.getBuffer().toString()); - - } -} diff --git a/src/test/java/org/geometrycommands/SimilarityCommandTest.java b/src/test/java/org/geometrycommands/SimilarityCommandTest.java deleted file mode 100644 index 94f6de1b..00000000 --- a/src/test/java/org/geometrycommands/SimilarityCommandTest.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.SimilarityCommand.SimilarityOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The SimilarityCommand UnitTest - * @author Jared Erickson - */ -public class SimilarityCommandTest { - - @Test - public void execute() throws Exception { - - // area - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POLYGON ((2 2, 2 14, 14 14, 14 2, 2 2))"; - SimilarityOptions options = new SimilarityOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - options.setAlgorithm("area"); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - SimilarityCommand command = new SimilarityCommand(); - command.execute(options, reader, writer); - assertEquals("0.35555555555555557", writer.getBuffer().toString()); - - // hausdorff - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POLYGON ((2 2, 2 14, 14 14, 14 2, 2 2))"; - options = new SimilarityOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - options.setAlgorithm("hausdorff"); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("0.7142857142857142", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/SimplifyCommandTest.java b/src/test/java/org/geometrycommands/SimplifyCommandTest.java deleted file mode 100644 index 05265a58..00000000 --- a/src/test/java/org/geometrycommands/SimplifyCommandTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.SimplifyCommand.SimplifyOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The SimplifyCommand UnitTest - * @author Jared Erickson - */ -public class SimplifyCommandTest { - - @Test - public void execute() throws Exception { - - // douglaspeucker - String inputGeometry = "LINESTRING (1 1, 2.3333333333333335 2.3333333333333335, " - + "3.666666666666667 3.666666666666667, 5 5, 6.4 6.4, " - + "7.800000000000001 7.800000000000001, 9.200000000000001 " - + "9.200000000000001, 10.600000000000001 10.600000000000001, " - + "12 12)"; - SimplifyOptions options = new SimplifyOptions(); - options.setGeometry(inputGeometry); - options.setDistanceTolerance(2); - options.setAlgorithm("douglaspeucker"); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - SimplifyCommand command = new SimplifyCommand(); - command.execute(options, reader, writer); - assertEquals("LINESTRING (1 1, 12 12)", writer.getBuffer().toString()); - - // topologypreserving - options = new SimplifyOptions(); - options.setGeometry(inputGeometry); - options.setDistanceTolerance(2); - options.setAlgorithm("topologypreserving"); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("LINESTRING (1 1, 12 12)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/SineStarCommandTest.java b/src/test/java/org/geometrycommands/SineStarCommandTest.java deleted file mode 100644 index 868f07bb..00000000 --- a/src/test/java/org/geometrycommands/SineStarCommandTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.SineStarCommand.SineStarOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The SineStarCommand UnitTest - * @author Jared Erickson - */ -public class SineStarCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (100 100)"; - SineStarOptions options = new SineStarOptions(); - options.setGeometry(inputGeometry); - options.setNumberOfArms(5); - options.setArmLengthRatio(5); - options.setWidth(50); - options.setHeight(40); - options.setNumberOfPoints(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - SineStarCommand command = new SineStarCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((150 125, 125 125, 132.72542485937367 148.77641290737884, " - + "125 125, 104.77457514062633 139.69463130731182, 125 125, " - + "104.77457514062631 110.30536869268818, 125 125, " - + "132.72542485937367 101.22358709262116, 125 125, 150 125))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/SnapCommandTest.java b/src/test/java/org/geometrycommands/SnapCommandTest.java deleted file mode 100644 index 6b5461a7..00000000 --- a/src/test/java/org/geometrycommands/SnapCommandTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.SnapCommand.SnapOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The SnapCommand UnitTest - * @author Jared Erickson - */ -public class SnapCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POLYGON ((11 11, 11 20, 20 20, 20 11, 11 11))"; - SnapOptions options = new SnapOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - options.setDistance(1.5); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - SnapCommand command = new SnapCommand(); - command.execute(options, reader, writer); - assertEquals("GEOMETRYCOLLECTION (" - + "POLYGON ((0 0, 0 10, 11 11, 10 0, 0 0)), " - + "POLYGON ((11 11, 11 20, 20 20, 20 11, 11 11)))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/SquircleCommandTest.java b/src/test/java/org/geometrycommands/SquircleCommandTest.java deleted file mode 100644 index 32f340f9..00000000 --- a/src/test/java/org/geometrycommands/SquircleCommandTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The SquircleCommand UnitTest - * @author Jared Erickson - */ -public class SquircleCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (100 100)"; - ShapeFactoryOptions options = new ShapeFactoryOptions(); - options.setGeometry(inputGeometry); - options.setWidth(50); - options.setHeight(40); - options.setNumberOfPoints(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - SquircleCommand command = new SquircleCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((125 140, 141.8179283050743 136.8179283050743, " - + "145 120, 141.8179283050743 103.18207169492571, " - + "125 100, 108.18207169492571 103.18207169492571, 105 120, " - + "108.18207169492571 136.8179283050743, 125 140))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/SubLineCommandTest.java b/src/test/java/org/geometrycommands/SubLineCommandTest.java deleted file mode 100644 index 037460e1..00000000 --- a/src/test/java/org/geometrycommands/SubLineCommandTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import org.geometrycommands.SubLineCommand.SubLineOptions; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The SubLineCommand UnitTest - * @author Jared Erickson - */ -public class SubLineCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "LINESTRING (0 0, 10 10, 20 20)"; - SubLineOptions options = new SubLineOptions(); - options.setGeometry(inputGeometry); - options.setStartPosition(0.25); - options.setEndPosition(0.75); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - SubLineCommand command = new SubLineCommand(); - command.execute(options, reader, writer); - assertEquals("LINESTRING (5 5, 10 10, 15 15)", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/SuperCircleCommandTest.java b/src/test/java/org/geometrycommands/SuperCircleCommandTest.java deleted file mode 100644 index cabd2411..00000000 --- a/src/test/java/org/geometrycommands/SuperCircleCommandTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.SuperCircleCommand.SuperCircleOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The SuperCircleCommand UnitTest - * @author Jared Erickson - */ -public class SuperCircleCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POINT (100 100)"; - SuperCircleOptions options = new SuperCircleOptions(); - options.setGeometry(inputGeometry); - options.setPower(3.2); - options.setWidth(50); - options.setHeight(40); - options.setNumberOfPoints(10); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - SuperCircleCommand command = new SuperCircleCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((125 140, 141.10490331949254 136.10490331949254, " - + "145 120, 141.10490331949254 103.89509668050746, 125 100, " - + "108.89509668050746 103.89509668050745, 105 120, " - + "108.89509668050745 136.10490331949254, 125 140))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/SymDifferenceCommandTest.java b/src/test/java/org/geometrycommands/SymDifferenceCommandTest.java deleted file mode 100644 index 6ca5756a..00000000 --- a/src/test/java/org/geometrycommands/SymDifferenceCommandTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The SymDifferenceCommand UnitTest - * @author Jared Erickson - */ -public class SymDifferenceCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POLYGON ((5 5, 5 20, 20 20, 20 5, 5 5))"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - SymDifferenceCommand command = new SymDifferenceCommand(); - command.execute(options, reader, writer); - assertEquals("MULTIPOLYGON (((0 0, 0 10, 5 10, 5 5, 10 5, 10 0, 0 0)), " - + "((10 5, 10 10, 5 10, 5 20, 20 20, 20 5, 10 5)))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/TextCommandTest.java b/src/test/java/org/geometrycommands/TextCommandTest.java deleted file mode 100644 index f6c5c162..00000000 --- a/src/test/java/org/geometrycommands/TextCommandTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.geometrycommands; - -import com.vividsolutions.jts.io.WKTReader; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Polygon; -import org.geometrycommands.TextCommand.TextOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * The TextCommand UnitTest - * @author Jared Erickson - */ -public class TextCommandTest { - - @Test - public void execute() throws Exception { - - TextOptions options = new TextOptions(); - options.setText("J"); - - Reader reader = new StringReader(""); - StringWriter writer = new StringWriter(); - - TextCommand command = new TextCommand(); - command.execute(options, reader, writer); - Geometry geom = new WKTReader().read(writer.getBuffer().toString()); - assertNotNull(geom); - assertTrue(geom instanceof Polygon); - } -} diff --git a/src/test/java/org/geometrycommands/TouchesCommandTest.java b/src/test/java/org/geometrycommands/TouchesCommandTest.java deleted file mode 100644 index 2a018592..00000000 --- a/src/test/java/org/geometrycommands/TouchesCommandTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The TouchesCommand UnitTest - * @author Jared Erickson - */ -public class TouchesCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POLYGON ((10 10, 10 14, 14 14, 14 10, 10 10))"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - TouchesCommand command = new TouchesCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POINT (15 15)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/TranslateCommandTest.java b/src/test/java/org/geometrycommands/TranslateCommandTest.java deleted file mode 100644 index c7ff3b0b..00000000 --- a/src/test/java/org/geometrycommands/TranslateCommandTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.geometrycommands; - -import org.geometrycommands.TranslateCommand.TranslateOptions; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The TranslateCommand UnitTest - * @author Jared Erickson - */ -public class TranslateCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - TranslateOptions options = new TranslateOptions(); - options.setGeometry(inputGeometry); - options.setX(4); - options.setY(2); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - TranslateCommand command = new TranslateCommand(); - command.execute(options, reader, writer); - assertEquals("POLYGON ((4 2, 4 12, 14 12, 14 2, 4 2))", - writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/UnionCommandTest.java b/src/test/java/org/geometrycommands/UnionCommandTest.java deleted file mode 100644 index 03bcdea6..00000000 --- a/src/test/java/org/geometrycommands/UnionCommandTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The UnionCommand UnitTest - * @author Jared Erickson - */ -public class UnionCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - String otherGeometry = "POLYGON ((10 10, 10 14, 14 14, 14 10, 10 10))"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - UnionCommand command = new UnionCommand(); - command.execute(options, reader, writer); - assertEquals("MULTIPOLYGON (((0 0, 0 10, 10 10, 10 0, 0 0)), " - + "((10 10, 10 14, 14 14, 14 10, 10 10)))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/VoronoiDiagramCommandTest.java b/src/test/java/org/geometrycommands/VoronoiDiagramCommandTest.java deleted file mode 100644 index 9426be3d..00000000 --- a/src/test/java/org/geometrycommands/VoronoiDiagramCommandTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The VoronoiDiagramCommand UnitTest - * @author Jared Erickson - */ -public class VoronoiDiagramCommandTest { - - @Test - public void execute() throws Exception { - - String inputGeometry = "MULTIPOINT ((12.27256417862947 12.73833434783841), " - + "(13.737894633461437 7.658802439672621), " - + "(6.857126638942733 8.821305316892328), " - + "(9.260874914207697 13.087320259444919), " - + "(8.017822881853032 7.492806794533148))"; - GeometryOptions options = new GeometryOptions(); - options.setGeometry(inputGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - VoronoiDiagramCommand command = new VoronoiDiagramCommand(); - command.execute(options, reader, writer); - assertEquals("GEOMETRYCOLLECTION (POLYGON ((-0.02364135557597 " - + "1.6383514444727276, -0.02364135557597 15.508595261712216, " - + "9.627541214926383 10.07049582452856, -0.02364135557597 " - + "1.6383514444727276)), POLYGON ((-0.02364135557597 " - + "15.508595261712216, -0.02364135557597 19.96808825396362, " - + "11.584262944224145 19.96808825396362, 10.41703141452538 " - + "9.895077997171324, 9.627541214926383 10.07049582452856, " - + "-0.02364135557597 15.508595261712216)), " - + "POLYGON ((-0.02364135557597 0.6120388000144441, " - + "-0.02364135557597 1.6383514444727276, 9.627541214926383 " - + "10.07049582452856, 10.41703141452538 9.895077997171324, " - + "10.820040010594106 9.568190510788941, 11.079946222571074 " - + "0.6120388000144441, -0.02364135557597 0.6120388000144441)), " - + "POLYGON ((11.584262944224145 19.96808825396362, 20.61866262798014 " - + "19.96808825396362, 20.61866262798014 12.394872259471132, " - + "10.820040010594106 9.568190510788941, 10.41703141452538 " - + "9.895077997171324, 11.584262944224145 19.96808825396362)), " - + "POLYGON ((20.61866262798014 12.394872259471132, 20.61866262798014 " - + "0.6120388000144441, 11.079946222571074 0.6120388000144441, " - + "10.820040010594106 9.568190510788941, 20.61866262798014 " - + "12.394872259471132)))", writer.getBuffer().toString()); - } -} diff --git a/src/test/java/org/geometrycommands/WithinCommandTest.java b/src/test/java/org/geometrycommands/WithinCommandTest.java deleted file mode 100644 index 56f1a476..00000000 --- a/src/test/java/org/geometrycommands/WithinCommandTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.geometrycommands; - -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * The WithinCommand UnitTest - * @author Jared Erickson - */ -public class WithinCommandTest { - - @Test - public void execute() throws Exception { - - // true - String inputGeometry = "POINT (5 5)"; - String otherGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - OtherGeometryOptions options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - Reader reader = new StringReader(inputGeometry); - StringWriter writer = new StringWriter(); - - WithinCommand command = new WithinCommand(); - command.execute(options, reader, writer); - assertEquals("true", writer.getBuffer().toString()); - - // false - inputGeometry = "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"; - otherGeometry = "POINT (15 15)"; - options = new OtherGeometryOptions(); - options.setGeometry(inputGeometry); - options.setOtherGeometry(otherGeometry); - - reader = new StringReader(inputGeometry); - writer = new StringWriter(); - - command.execute(options, reader, writer); - assertEquals("false", writer.getBuffer().toString()); - } -} diff --git a/usage.html b/usage.html new file mode 100644 index 00000000..1bc826a8 --- /dev/null +++ b/usage.html @@ -0,0 +1,145 @@ + + + + + + + Usage — geom 0.9.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Usage

+

View a list of all geom commands:

+
geom list
+
+
+

Get help for a command:

+
geom buffer --help
+geom buffer: Buffer a geometry by a distance.
+--help                    : Print help message
+-c (--endCapStyle) VAL    : The end cap style (round, flat/butt, square)
+-d (--distance) N         : The buffer distance
+-g (--geometry) VAL       : The input geometry
+-q (--quadrantSegments) N : The number of quadrant segments
+-s (--singleSided)        : The flag for whether the buffer should be single sided
+
+
+

Buffer a geometry:

+
echo "POINT (1 1)" | geom buffer -g "POINT(1 1)" -d 10
+
+
+

Or buffer a geometry by piping in text:

+
echo "POINT (1 1)" | geom buffer -d 10
+
+
+

Reproject a geometry:

+
echo "POINT (1 1)" | geom project -s "EPSG:4326" -t "EPSG:2927"
+
+
+

Generate random points:

+
echo "POINT (1 1)" | geom buffer -d 100 | geom random -n 200
+
+
+

Draw a geometry to an image:

+
echo "POINT (1 1)" | geom buffer -d 100 | geom draw && open image.png
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file