Giter Club home page Giter Club logo

geospark's Introduction

GeoSpark Logo

Build Status Maven Central Join the chat at https://gitter.im/geospark-datasys/Lobby

GeoSpark is listed as Infrastructure Project on Apache Spark Official Third Party Project Page (http://spark.apache.org/third-party-projects.html)

GeoSpark is a cluster computing system for processing large-scale spatial data. GeoSpark extends Apache Spark with a set of out-of-the-box Spatial Resilient Distributed Datasets (SRDDs) that efficiently load, process, and analyze large-scale spatial data across machines. GeoSpark provides APIs for Apache Spark programmer to easily develop their spatial analysis programs with Spatial Resilient Distributed Datasets (SRDDs) which have in house support for geometrical and Spatial Queries (Range, K Nearest Neighbors, Join).

GeoSpark artifacts are hosted in Maven Central. You can add a Maven dependency with the following coordinates:

The following version supports Apache Spark 2.X versions:

groupId: org.datasyslab
artifactId: geospark
version: 0.5.0

The following version supports Apache Spark 1.X versions:

groupId: org.datasyslab
artifactId: geospark
version: 0.5.0-spark-1.x

Version information (Full List)

Version Summary
0.5.0 Major updates: We are pleased to announce the initial version of Babylon a large-scale in-memory geospatial visualization system extending GeoSpark. Babylon and GeoSpark are integrated together. You can just import GeoSpark and enjoy! More details are available here: Babylon GeoSpatial Visualization;
0.4.0 Major updates: (Example) 1. Refactor constrcutor API usage. 2. Simplify Spatial Join Query API. 3. Add native support for LineStringRDD; Functionality enhancement: 1. Release the persist function back to users. 2. Add more exception explanations.

##News

  • GeoSpark Gitter Chat is now online! Chat with our GeoSpark users and ask questions!
  • Babylon Visualization Framework on GeoSpark is now available! Babylon is a large-scale in-memory geospatial visualization system. More details are available here: Babylon GeoSpatial Visualization

How to get started (For GeoSpark Scala and Java developers)

Prerequisites

  1. Apache Spark 2.X releases (Apache Spark 1.X releases support available in GeoSpark for Spark 1.X branch)
  2. JDK 1.7 or later
  3. You might need to modify the dependencies in "POM.xml" and make it consistent with your environment.

Note: GeoSpark Master branch supports Apache Spark 2.X releases and GeoSpark for Spark 1.X branch supports Apache Spark 1.X releases. Please refer to the proper branch you need.

How to use GeoSpark APIs in an interactive Spark shell (Scala)

  1. Have your Spark cluster ready.
  2. Download pre-compiled GeoSpark jar under "Release" tag.
  3. Run Spark shell with GeoSpark as a dependency.

./bin/spark-shell --jars GeoSpark_COMPILED.jar

  1. You can now call GeoSpark APIs directly in your Spark shell!

How to use GeoSpark APIs in a self-contained Spark application (Scala and Java)

  1. Create your own Apache Spark project in Scala or Java
  2. Add GeoSpark Maven coordinates into your project dependencies.
  3. You can now use GeoSpark APIs in your Spark program!
  4. Use spark-submit to submit your compiled self-contained Spark program.

GeoSpark Programming Examples (Scala)

GeoSpark Scala Example for GeoSpark 0.4 or later

GeoSpark Scala Example for GeoSpark 0.3.x

Test Data

GeoSpark Programming Examples (Java)

GeoSpark Java Example

Test Data

Scala and Java API usage

Note: Scala can call Java APIs seamlessly. That means GeoSpark Scala users use the same APIs with GeoSpark Java users.

Please refer to GeoSpark Scala and Java API Usage

Spatial Resilient Distributed Datasets (SRDDs)

GeoSpark extends RDDs to form Spatial RDDs (SRDDs) and efficiently partitions SRDD data elements across machines and introduces novel parallelized spatial (geometric operations that follows the Open Geosptial Consortium (OGC) standard) transformations and actions (for SRDD) that provide a more intuitive interface for users to write spatial data analytics programs. Moreover, GeoSpark extends the SRDD layer to execute spatial queries (e.g., Range query, KNN query, and Join query) on large-scale spatial datasets. After geometrical objects are retrieved in the Spatial RDD layer, users can invoke spatial query processing operations provided in the Spatial Query Processing Layer of GeoSpark which runs over the in-memory cluster, decides how spatial object-relational tuples could be stored, indexed, and accessed using SRDDs, and returns the spatial query results required by user.

Supported Spatial RDDs: PointRDD, RectangleRDD, PolygonRDD, LineStringRDD

Supported data format

Native input format support

Comma-Separated Values (FileDataSplitter.CSV), Tab-separated values (FileDataSplitter.TSV), Well-Known Text (FileDataSplitter.WKT), and GeoJSON (FileDataSplitter.GeoJSON) as the input formats. Users only need to specify input format as Splitter and the start and end offset (if necessary) of spatial fields in one row when call Constructors.

User-supplied input format mapper

Examples: user-supplied input format mapper

You can load your mapper like this:

mySpatialRDD = PointRDD(sparkContext, InputLocation, userSuppliedMapper);
mySpatialRDD = PointRDD(sparkContext, InputLocation, PartitionNum, userSuppliedMapper);

mySpatialRDD = LineStringRDD(sparkContext, InputLocation, userSuppliedMapper);
mySpatialRDD = LineStringRDD(sparkContext, InputLocation, PartitionNum, userSuppliedMapper);
...

Important features

Spatial partitioning

GeoSpark supports R-Tree (GridType.RTREE) and Voronoi diagram (GridType.VORONOI) spatial partitioning methods. Spatial partitioning is to repartition RDD according to objects' spatial locations. Spatial join on spatial paritioned RDD will be very fast.

Spatial Index

GeoSpark supports two Spatial Indexes, Quad-Tree (IndexType.QUADTREE) and R-Tree (IndexType.RTREE). Quad-Tree doesn't support Spatial K Nearest Neighbors query.

Geometrical operation

GeoSpark currently provides native support for Inside, Overlap, DatasetBoundary, Minimum Bounding Rectangle and Polygon Union in SRDDS following Open Geospatial Consortium (OGC) standard.

Spatial Operation

GeoSpark so far provides Spatial Range Query, Spatial Join Query, and Spatial K Nearest Neighbors Query.

#Babylon Visualization Framework on GeoSpark Babylon is a large-scale in-memory geospatial visualization system.

Babylon provides native support for general cartographic design by extending GeoSpark to process large-scale spatial data. It can visulize Spatial RDD and Spatial Queries and render super high resolution image in parallel.

Babylon and GeoSpark are integrated together. You just need to import GeoSpark and enjoy them! More details are available here: Babylon GeoSpatial Visualization

Babylon Gallery

Publication

Jia Yu, Jinxuan Wu, Mohamed Sarwat. "A Demonstration of GeoSpark: A Cluster Computing Framework for Processing Big Spatial Data". (demo paper) In Proceeding of IEEE International Conference on Data Engineering ICDE 2016, Helsinki, FI, May 2016

Jia Yu, Jinxuan Wu, Mohamed Sarwat. "GeoSpark: A Cluster Computing Framework for Processing Large-Scale Spatial Data". (short paper) In Proceeding of the ACM International Conference on Advances in Geographic Information Systems ACM SIGSPATIAL GIS 2015, Seattle, WA, USA November 2015

Acknowledgement

GeoSpark makes use of JTS Plus (An extended JTS Topology Suite Version 1.14) for some geometrical computations.

Please refer to JTS Topology Suite website and JTS Plus for more details.

Contact

Questions

  • Please join Join the chat at https://gitter.im/geospark-datasys/Lobby

  • Email us!

Contributors

Project website

Please visit GeoSpark project wesbite for latest news and releases.

Data Systems Lab

GeoSpark is one of the projects under Data Systems Lab at Arizona State University. The mission of Data Systems Lab is designing and developing experimental data management systems (e.g., database systems).

Thanks for the help from GeoSpark community

We appreciate the help and suggestions from the following GeoSpark users (The list is growing..):

  • @gaufung
  • @lrojas94
  • @mdespriee
  • @sabman
  • @samchorlton
  • @Tsarazin
  • @TBuc
  • ...

geospark's People

Contributors

jiayuasu avatar jinxuan avatar omkarkaptan avatar d0d0 avatar lnagel avatar n0mer avatar gitter-badger avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.