DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Boost Your Spark Jobs: How Photon Accelerates Apache Spark Performance
  • Apache Spark 3 to Apache Spark 4 Migration: What Breaks, What Improves, What's Mandatory
  • Hadoop on AmpereOne Reference Architecture
  • Model Context Protocol Vs Agent2Agent: Practical Integration with Enterprise Data

Trending

  • ScyllaDB in Enterprise Java: High-Performance NoSQL With Eclipse JNoSQL
  • Replay, Scheduling, and Throttling: Engineering a Self-Service Kafka Streaming Tool at Scale
  • Taming Parameter Sniffing in SQL Server 2022 With PSP Optimization
  • The Window Closes: Why I Switched to Kotlin Before the Codebase Got Too Big

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Data Engineering
  3. Big Data
  4. Geospatial Data: Apache Spark vs. PostGIS

Geospatial Data: Apache Spark vs. PostGIS

We take a look at how the big data tool Apache Spark stacks up against the geospatial tool PostGIS when it comes to handling big data sets.

By 
Abdelghani Tassi
·
Jan. 04, 19 · Analysis
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
14.3K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

In my company, we've had a heated debate about geospatial data processing between old school conservative SQL fans and progressive big data and NoSQL fans.

Data Querying (MongoDB vs. PostGIS)

This section provides an overview of PostGIS and Mongodb, and their geospatial capabilities.


Mongodb Postgis
Spark drivers spark:mongo spark:jdbc
Scalability
  • Incoming data stream can potentially grow without limit.
  • Can scale easily.
  • Difficult to scale.
  • PG10 ?
Response time
  • Slightly faster at returning entire data sets.
  • Integrated caching system.
  • Faster when it comes to geospatial queries (by bounding box for example).
Geospatial index and Geoqueries
  • Bounding box geospatial queries seem to work well but UTM CRS is not supported (should convert data to mercator).
  • Supports only geojson formats.
  • Supported queries ($geoNear, $geoWithin, $geoIntersects).
  • Provides much more sophisticated spatial analytic capabilities.
  • Supports all geometry formats.
  • Supports all CRSs.

Spark vs. PostGIS (Performance)

The purpose of this section is to compare the performance Spark and PostGIS with respect to different data analyses (max, avg, geospatial:within, etc.).

For PostGIS tests, the data is already preprocessed and indexed geospatially, while Spark will use directly raw data (parquet, csv, shape, etc.).

As the data size grows, Spark's response time remains stable while PostGIS's response time grows exponentially.

Max KPI:

Image title

Mean KPI:

Image title

KPIs Within a Bounding Box:

Image title

Big data PostGIS Apache Spark

Opinions expressed by DZone contributors are their own.

Related

  • Boost Your Spark Jobs: How Photon Accelerates Apache Spark Performance
  • Apache Spark 3 to Apache Spark 4 Migration: What Breaks, What Improves, What's Mandatory
  • Hadoop on AmpereOne Reference Architecture
  • Model Context Protocol Vs Agent2Agent: Practical Integration with Enterprise Data

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook