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
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workkloads.

Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Spark Job Optimization
  • All You Need to Know About Apache Spark
  • Iceberg Catalogs: A Guide for Data Engineers
  • Data Processing With Python: Choosing Between MPI and Spark

Trending

  • Understanding Java Signals
  • Failure Handling Mechanisms in Microservices and Their Importance
  • How to Configure and Customize the Go SDK for Azure Cosmos DB
  • GDPR Compliance With .NET: Securing Data the Right Way
  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 user avatar
Abdelghani Tassi
·
Jan. 04, 19 · Analysis
Likes (3)
Comment
Save
Tweet
Share
13.7K Views

Join the DZone community and get the full member experience.

Join For Free

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

  • Spark Job Optimization
  • All You Need to Know About Apache Spark
  • Iceberg Catalogs: A Guide for Data Engineers
  • Data Processing With Python: Choosing Between MPI and Spark

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!