Skip to content

Commit

Permalink
Pumped the version to 0.2.1
Browse files Browse the repository at this point in the history
Updated the README file with the latest set of functions
  • Loading branch information
Ahmed Eldawy committed Jun 30, 2015
1 parent c9ace6e commit fefa972
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 11 deletions.
25 changes: 20 additions & 5 deletions README.markdown
Expand Up @@ -73,36 +73,51 @@ Basic Spatial Functions

+ *ST_AsHex* Converts a shape to its Well-Known Binary (WKB) format encoded as Hex string
+ *ST_AsText* Converts a shape to its Well-Known Text (WKT) format
+ *ST_GeomFromText* Parses a WKT representation into an object
+ *ST_GeomFromWKT* Parses an object from a hex-encoded WKB representation
+ *ST_MakePoint* Creates a geometry point given two numeric coordinates
+ *ST_MakeBox* Creates a rectangle from its four coordinates (x1, y1, x2, y2)
+ *ST_Area* Calculates the area of a surface shape (e.g., Polygon)
+ *ST_Envelope* Calculates the envelope (MBR) of a shape
+ *ST_Buffer* Computes a buffer with the specified distance around a geometry.
+ *ST_Size* Returns number of points in a linestring
+ *ST_NumPoints* Returns number of points in a linestring
+ *ST_XMin* Returns the minimum x-coordinate of an object
+ *ST_YMin* Returns the minimum y-coordinate of an object
+ *ST_XMax* Returns the maximum x-coordinate of an object
+ *ST_YMax* Returns the maximum y-coordinate of an object


Spatial Predicates
------------------

+ *ST_Crosses* Checks if one polygon crosses another polygon
+ *ST_IsEmpty* Tests whether a shape is empty or not.

+ *ST_Contains* Tests for containment between two geometries
+ *ST_Intersects* Tests if two objects intersect
+ *ST_Overlaps* Tests if two objects overlap
+ *ST_Touches* Tests if two objects touch
+ *ST_Within* Tests if one geometry is withing another geometry

Spatial Analysis
----------------

+ *ST_Buffer* Computes a buffer with the specified distance around a geometry.
+ *ST_ConvexHull* Computes the minimal convex polygon of a shape.


+ *ST_Break* Breaks a geometry into straight line segments
+ *ST_Difference* Calculates the difference between two polygons.
+ *ST_Intersection* Computes the intersection betwen two polygons.
+ *ST_MakeSegments* Creates a set of line segments given a set of points by connecting each two consecutive points

Aggregate functions
-------------------

+ *ST_MakeLine* Creates a line string given a bag of points
+ *ST_MakePolygon* Creates a polygon given a circular list of points
+ *ST_MakeLinePolygon* Creates a line or polygons from a list of points depending on whether the last point is the same as the first point or not
+ *ST_ConvexHull* Computes the convex hull from a bag of shapes
+ *ST_Union* Computes the spatial union of a set of surfaces (e.g., Polygons)
+ *ST_Extent* Computes the minimal bounding rectangle (MBR) of a set of shapes

+ *ST_Connect* Connects a set of linestrings together to form longer linestring or polygons

Contribution
============
Expand Down
9 changes: 5 additions & 4 deletions examples/pigeon_import.pig
Expand Up @@ -7,25 +7,26 @@ DEFINE ST_Connect edu.umn.cs.pigeon.Connect;
DEFINE ST_Contains edu.umn.cs.pigeon.Contains;
DEFINE ST_ConvexHull edu.umn.cs.pigeon.ConvexHull;
DEFINE ST_Crosses edu.umn.cs.pigeon.Crosses;
DEFINE ST_Difference edu.umn.cs.pigeon.Difference;
DEFINE ST_Envelope edu.umn.cs.pigeon.Envelope;
DEFINE ST_Extent edu.umn.cs.pigeon.Extent;
DEFINE ST_GeomFromWKB edu.umn.cs.pigeon.GeometryFromWKB;
DEFINE ST_GeomFromText edu.umn.cs.pigeon.GeometryFromText;
DEFINE ST_Intersection edu.umn.cs.pigeon.Intersection;
DEFINE ST_Intersects edu.umn.cs.pigeon.Intersects;
DEFINE ST_IsEmpty edu.umn.cs.pigeon.IsEmpty;
DEFINE ST_MakeBox edu.umn.cs.pigeon.MakeBox;
DEFINE ST_MakeLine edu.umn.cs.pigeon.MakeLine;
DEFINE ST_MakeLinePolygon edu.umn.cs.pigeon.MakeLinePolygon;
DEFINE ST_MakePoint edu.umn.cs.pigeon.MakePoint;
DEFINE ST_MakePolygon edu.umn.cs.pigeon.MakePolygon;
DEFINE ST_MakeLinePolygon edu.umn.cs.pigeon.MakeLinePolygon;
DEFINE ST_MakeSegments edu.umn.cs.pigeon.MakeSegments;
DEFINE ST_MakeBox edu.umn.cs.pigeon.MakeBox;
DEFINE ST_Overlaps edu.umn.cs.pigeon.Overlaps;
DEFINE ST_NumPoints edu.umn.cs.pigeon.NumPoints;
DEFINE ST_Overlaps edu.umn.cs.pigeon.Overlaps;
DEFINE ST_Touches edu.umn.cs.pigeon.Touches;
DEFINE ST_Union edu.umn.cs.pigeon.Union;
DEFINE ST_Within edu.umn.cs.pigeon.Within;
DEFINE ST_XMin edu.umn.cs.pigeon.XMin;
DEFINE ST_XMax edu.umn.cs.pigeon.XMax;
DEFINE ST_YMin edu.umn.cs.pigeon.YMin;
DEFINE ST_YMax edu.umn.cs.pigeon.YMax;
DEFINE ST_Touches edu.umn.cs.pigeon.Touches;
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -4,7 +4,7 @@
<groupId>edu.umn.cs.spatialHadoop</groupId>
<artifactId>pigeon</artifactId>
<packaging>jar</packaging>
<version>0.2.0</version>
<version>0.2.1</version>
<name>pigeon</name>
<url>http://maven.apache.org</url>

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/edu/umn/cs/pigeon/Break.java
Expand Up @@ -26,7 +26,10 @@
import com.vividsolutions.jts.geom.Polygon;

/**
* Generates a geometry of type LineString out of a bag of points.
* Breaks down a linestring or a polygon into straight line segments.
* The generated segments are returned as a bag of tuples with the common
* schema (Segment_ID, x1, y1, x2, y2)
*
* @author Ahmed Eldawy
*/
public class Break extends EvalFunc<DataBag>{
Expand Down

0 comments on commit fefa972

Please sign in to comment.