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
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

How are you handling the data revolution? We want your take on what's real, what's hype, and what's next in the world of data engineering.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • Apache Spark 4.0: Transforming Big Data Analytics to the Next Level
  • Spark Job Optimization
  • All You Need to Know About Apache Spark
  • Iceberg Catalogs: A Guide for Data Engineers

Trending

  • AI Agent Architectures: Patterns, Applications, and Implementation Guide
  • How to Format Articles for DZone
  • The Missing Layer in AI Pipelines: Why Data Engineers Must Think Like Product Managers
  • gRPC and Its Role in Microservices Communication
  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

  • Apache Spark 4.0: Transforming Big Data Analytics to the Next Level
  • Spark Job Optimization
  • All You Need to Know About Apache Spark
  • Iceberg Catalogs: A Guide for Data Engineers

Partner Resources

×

Comments

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
  • [email protected]

Let's be friends: