Geohashes and Efficient Geospatial Joins in Snowflake

Geohashes and Efficient Geospatial Joins in Snowflake

Geohashes are an incredibly useful tool when it comes to spatial analysis. They serve as an encoding system that translates geographic coordinates into a short string of letters and digits, which simplifies and optimises geospatial operations.

One area where geohashes shine is in making geospatial joins more efficient. In this blog, we’ll dive into what geohashes are, and how you can leverage Snowflake’s ST_GEOHASH function to improve your geospatial joins in Snowflake.

What is a geohash?

A geohash is a hierarchical spatial data structure that subdivides space into a grid of cells, each cell having a unique string identifier. Geohashes convert a two-dimensional geographic coordinate (latitude and longitude) into this alphanumeric string. The length of the string determines the precision of the geohash; a longer string means a more precise location.

Read our blog on What is a Geohash for a detailed overview.

Geohash

How geohashes make geospatial joins more efficient

Geospatial joins can be computationally expensive because they often require pairing each record in one dataset with every record in another to calculate distances or find overlaps. This can lead to a computational complexity of O(N*M), which is not ideal for large datasets.

Geohashes simplify this problem by converting the geospatial coordinates into strings. When you want to join based on geographic proximity, you can simply perform a string comparison, which is far less computationally expensive than a full spatial join.

Snowflake and ST_GEOHASH

Snowflake offers native support for geospatial functions, including ST_GEOHASH. Below is a simple example of how you can use this function to create a geohash in Snowflake:

-- Create a geohash for a specific latitude and longitude
SELECT ST_GEOHASH(37.7749, -122.4194, 12) AS geohash;
In this example, 37.7749 is the latitude, -122.4194 is the longitude, and 12 is the precision of the geohash.

To perform a geospatial join using geohashes, you can do the following:

-- Create two tables with geospatial data
CREATE TABLE locations1 (id INT, latitude FLOAT, longitude FLOAT);
CREATE TABLE locations2 (id INT, latitude FLOAT, longitude FLOAT);

-- Populate tables (this is just a representation)
-- ...

-- Add a geohash column to both tables
ALTER TABLE locations1 ADD COLUMN geohash STRING;
ALTER TABLE locations2 ADD COLUMN geohash STRING;

-- Update the geohash columns using ST_GEOHASH
UPDATE locations1 SET geohash = ST_GEOHASH(latitude, longitude, 12);
UPDATE locations2 SET geohash = ST_GEOHASH(latitude, longitude, 12);

-- Perform the join using the geohash
SELECT a.*, b.*
FROM locations1 a, locations2 b
WHERE a.geohash = b.geohash;

 

Geohash – Streamlining geospatial joins

Geohashes offer a streamlined way to perform geospatial joins, drastically reducing the computational resources required. With native functions like ST_GEOHASH in Snowflake, it’s easier than ever to incorporate geohashes into your geospatial workflows. By leveraging the power of geohashes, you can perform complex geospatial analyses more efficiently, saving both time and money.

Read more from The Proptech Cloud

Understanding Housing Affordability: Key Metrics and Statistics

Housing affordability is a significant concern in many parts of the world, affecting the quality of life and economic wellbeing of individuals and families.

To understand the dynamics of housing affordability we need to take a detailed look at a range of different metrics and statistics to gain a full picture.

The Three Primary Methods of Real Estate Data Integration

cLearn the three primary methods of real estate data integration—geospatial relationships, title matches, and address matching—to improve accuracy, insights, and decision-making.

What’s the Difference Between GDA94 and GDA2020?

Geodetic datums, or geodetic systems, are often used by proptechs. Here is a rundown of everything you need to know about the different geodetic datums we use and reference in Australia.

Alternative Data: What Is It, Who Uses It And Why It Matters

Discover the powerful intel alternative data can offer. Learn why businesses and investors are turning to non-traditional data sources for deeper insights and smarter decisions.

What Is A Geohash And How Is It Used?

Discover what a geohash is, how it works, and its real-world applications in mapping, logistics and data analysis.

What is H3?

What is H3?

There are a number of geospatial indexing systems which caters to spatial data types, query requirements, and use cases, with the choice often depending largely on the needs of your geospatial application and type of data. H3 is the relatively newer kid on the geospatial block, promising accuracy and scalability. Let’s delve in to understand its defining characteristics, how it works, and its practical applications.

What is H3?

H3 is a geospatial indexing system developed by Uber Technologies. It’s designed to partition the Earth’s surface into a hierarchical grid of hexagons. Each hexagon is assigned a unique H3 index, and this grid provides a way to represent and analyse geographic data with consistent precision.

In simpler terms, H3 is a way of breaking down the world into pieces, similar to how a jigsaw puzzle has pieces that fit together. These pieces are shaped like hexagons, like the honeycomb in a beehive.

These hexagons come in different sizes, so bigger hexagons can be used to talk about big areas like a country, whereas small hexagons can be used to talk about tiny areas like a neighbourhood.

Each of these hexagons is assigned a special code to help computers and maps understand where a place is on Earth. So instead of saying you’re at a certain latitude or longitude, you can simply give the code and your location can be pinpointed exactly.

Key characteristics of H3

  1. Hierarchical Grid
    This geospatial indexing system uses a hierarchical structure with multiple levels of hexagons. At each level, hexagons are subdivided into smaller hexagons, providing a scalable way to represent locations at different levels of detail.
  2. Uniform Precision
    Uniform precision across the globe means that hexagons at the same level of the hierarchy will represent approximately the same area, and are consistently spaced between hexagons.
  3. Spatial Relationships
    H3 provides better spatial relationships than traditional rectangular grids like latitude and longitude or Geohash. Hexagons have a more natural fit for mapping many real-world features and are less prone to distortions, especially near the poles.
  4. Resolution Levels
    By supporting multiple resolution levels, this system allows users to choose the appropriate level of detail for their application. Higher resolution levels provide more precision but may result in a larger number of hexagons to manage.
  5. Efficient Spatial Queries
    H3 makes it efficient to perform spatial queries, such as point-in-polygon tests, nearest-neighbor searches, and spatial aggregations. This is particularly valuable for applications like ride-sharing, logistics, and urban planning.
  6. Open Source
    H3 is open-source and available to the public, making it accessible for developers and researchers to use and contribute to its development.
  7. Geospatial Libraries
    H3 has been integrated into various geospatial libraries and programming languages, making it easier for developers to work with this geospatial indexing system in their applications.

How does H3 work?

Here’s a technical explanation of how H3 works:

  1. Hexagonal Grid
    H3 starts by subdividing the Earth’s surface into hexagonal grids. These hexagons are the basic building blocks of the system.
  2. Hierarchical Levels
    H3 employs a hierarchical approach with multiple zoom levels. At each zoom level, the hexagons are divided into smaller hexagons. This hierarchy allows for representing locations with varying levels of precision.
  3. Unique Hexagon IDs
    Each hexagon in the grid is assigned a unique identifier called an H3 index. These indices are used to identify specific geographic areas. An H3 index consists of two parts: a base cell and a resolution level. The base cell determines the general area, and the resolution level refines the precision within that area.

What does H3 look like?

This geospatial indexing system partitions the globe into hexagons for accurate analysis, as indicated in this image.

Geohash vs H3 Comparison

Source: Uber

Real estate applications of H3

As you can imagine, a geospatial indexing system developed by ride-share company, Uber would make it indispensable for ride-sharing and navigation, optimising driver and passenger matching, but also in determining best pickup and drop off points, fare calculations and route planning.

Due to its ability to represent geo locations accurately and analyse geographical data efficiently, it has wide appeal and vast uses in real-estate too. In most situations, anytime you might use the more commonly used Geohash, you could potentially use H3.

So, how does H3 compare?

H3 is one of the geospatial indexing systems at your disposal, answering to various spatial data types, query requirements, and use cases. However, the choice between using H3 and other indexing systems depends largely on the needs of your geospatial application and type of data.

Read how H3 and Geohash compare if you’re considering which system to adopt.

Snowflake releases H3 functionality

Snowflake provides SQL functions that enable you to use H3 with GEOGRAPHY objects.
This preview feature is now available to all accounts.

Read more from The Proptech Cloud

Understanding Housing Affordability: Key Metrics and Statistics

Housing affordability is a significant concern in many parts of the world, affecting the quality of life and economic wellbeing of individuals and families. To understand the dynamics of housing affordability we need to take a detailed look at a range of different metrics and statistics to gain a full picture.

The Three Primary Methods of Real Estate Data Integration

cLearn the three primary methods of real estate data integration—geospatial relationships, title matches, and address matching—to improve accuracy, insights, and decision-making.

What’s the Difference Between GDA94 and GDA2020?

Geodetic datums, or geodetic systems, are often used by proptechs. Here is a rundown of everything you need to know about the different geodetic datums we use and reference in Australia.

Alternative Data: What Is It, Who Uses It And Why It Matters

Discover the powerful intel alternative data can offer. Learn why businesses and investors are turning to non-traditional data sources for deeper insights and smarter decisions.

What Is A Geohash And How Is It Used?

Discover what a geohash is, how it works, and its real-world applications in mapping, logistics and data analysis.

The Role of Data in Real Estate Decisions

The Role of Data in Real Estate Decisions

Businesses use a wide range of data to confidently analyse trends, forecast changes, and identify opportunities. In today’s competitive real estate industry, the data behind informed business decisions can be the difference between success and failure.

Why is data-driven decision-making so important in real estate?

With the advent of big data and accessibility of data, companies are now able to make more accurate and strategic decisions by analysing information, key trends and metrics. Data-driven decision-making has become critical in real estate because it allows businesses to identify opportunities, reduce risks and maximise returns on investments.

Using data in real-estate decisions

Some examples may include:

  • Real estate investment decisions

    Real estate and related data as diverse as historical sales data, demographics, market demand, property valuations can be used to identify profitable investment and development opportunities, determine a value of a property and assess potential returns on property investments.

  • Retail analytics

    Property data together with foot traffic data, demographics, sales data, can play a role in location selections and market expansion decisions. It will also influence merchandising decisions such as retail promotions and campaigns, product placement, store layout and inventory management.

  • Real estate sales decisions

    By analysing current and historical market trends, businesses can determine optimal pricing strategies for properties. Similarly demographic data can be used to identify the target audience for a particular property and inform advertising and marketing efforts.

  • Mortgage and financing decisions

    For risk assessments, lenders use property data to evaluate the value and condition of collateral for mortgage loans, determining loan eligibility and interest rates.
    On the flipside, credit scoring models may incorporate property data to evaluate borrower creditworthiness.

  • Government and urban planning

    Urban planners use property data to identify areas in need of infrastructure development, such as roads, schools, and utilities. Governments may use property data to enforce zoning regulations and property tax assessments.

  • Building and construction planning

    Property data aids in estimating construction costs, project timelines, and feasibility studies.

  • Insurance underwriting and claims

    Insurers consider property data when determining premiums and coverage for homeowners and property insurance policies. Property data may play a role in processing claims by verifying property details and assessing damage.

  • Environmental impact assessment

    Property, environmental, regulatory and geospatial data may all factor into decisions made concerning property projects.

Tips for interpreting and analysing property data

While data-driven decision-making is a valuable tool in real estate, it is important to understand how to properly analyse and interpret property data.

Here are some tips to keep in mind:

  • Data Accuracy

    Ensure the data you’re using is accurate and up-to-date. Rely on reputable sources and verify the information where possible.

  • Compare and Contrast

    Don’t make decisions based on a single data point. Compare property data from different sources and periods to identify trends and outliers.

  • Consider Context

    Understand the broader economic and market context in which the data exists. External factors like interest rates, local regulations, and economic conditions can significantly impact real estate data.

  • Data Visualisation

    Utilise data visualisation tools to transform complex data sets into easy-to-understand graphs and charts. Visual representations can highlight patterns and trends.

  • Consult Experts

    When in doubt, seek advice from experienced proptech professionals or data scientists and analysts. They can provide valuable insights and guidance in interpreting property data effectively.

  • Human Judgement

    Don’t ignore intuition and personal experience entirely. Data is important, but it should be used to inform decisions, not replace human judgement.

As we’ve explored, various types of data play a pivotal role in shaping business decisions. In an era of big data and accessible information, real estate professionals have the tools at their disposal to analyse trends, forecast changes, and seize opportunities like never before.

Businesses can navigate the intricate terrain of real estate with greater precision, with data illuminating the path.

Human judgment and expertise are still indispensable. Seek out experts, draw from your intuition, and let data guide your decisions, not dictate them.

    Read more from The Proptech Cloud

    Understanding Housing Affordability: Key Metrics and Statistics

    Housing affordability is a significant concern in many parts of the world, affecting the quality of life and economic wellbeing of individuals and families.

    To understand the dynamics of housing affordability we need to take a detailed look at a range of different metrics and statistics to gain a full picture.

    The Three Primary Methods of Real Estate Data Integration

    cLearn the three primary methods of real estate data integration—geospatial relationships, title matches, and address matching—to improve accuracy, insights, and decision-making.

    What’s the Difference Between GDA94 and GDA2020?

    Geodetic datums, or geodetic systems, are often used by proptechs. Here is a rundown of everything you need to know about the different geodetic datums we use and reference in Australia.

    Alternative Data: What Is It, Who Uses It And Why It Matters

    Discover the powerful intel alternative data can offer. Learn why businesses and investors are turning to non-traditional data sources for deeper insights and smarter decisions.

    What Is A Geohash And How Is It Used?

    Discover what a geohash is, how it works, and its real-world applications in mapping, logistics and data analysis.

    Unlocking Affordable Housing in Australia: The Data Revolution

    Unlocking Affordable Housing in Australia: The Data Revolution

    Australia’s property market has been a subject of discussion for years, fuelled by soaring prices, scarcity, and affordability issues. Enter proptech start-ups, which are leveraging technology to offer innovative solutions to these issues. Central to this wave of innovation is data, and its accessibility is being revolutionised by digital data marketplace platforms.

    The Old Guard: Barriers to Entry

    Historically, one of the largest barriers to entry for proptech start-ups was access to quality data. Whether it’s property values, zoning laws, ownership, or construction costs, such data sets are often fragmented, expensive, or behind bureaucratic walls. The effort and capital required to acquire and harmonise this data kept many potential innovators out of the space.

    Complicating matters further, there is a noticeable lack of skilled data engineers available to streamline the complex process of data collection and integration, making it even more challenging for start-ups to break into the market.

    Digital Data Marketplaces: A Game Changer

    Centralised data repository platforms like the Snowflake Marketplace are breaking down these barriers. By providing a centralised, easily accessible marketplace for data acquisition and use, these platforms are significantly reducing the time and capital required for start-ups to get their operations off the ground. Start-ups no longer need to invest in expensive data scraping techniques or negotiate with multiple data providers; a treasure trove of valuable information is now just a few clicks away.

    Speeding Up Time-to-Market

    With the availability of easy-to-use data, proptech start-ups and established businesses can accelerate their development cycles. Time-to-market is a critical factor for any business, and in a sector as dynamic as real estate, this could not be more crucial. Platforms like Snowflake have enabled proptechs to launch and iterate products faster, making it easier to adapt to market needs, and more readily generate property solutions – including bringing affordable housing to the public.

    Democratising investment opportunities

    Driving Policy with Public-Private Partnerships

    Easier access to data may stimulate public-private partnerships. Governments can leverage the insights generated by proptechs to guide policy decisions, be it in the form of zoning laws, tax incentives, or housing grants. With readily available data, these decisions can be made quicker and with more precision, ultimately benefitting the housing market at large.

    Security and Governance

    While data marketplace platforms make data more accessible, they also prioritise data security and governance. Reputable platforms will feature and document industry-leading controls and protocols to ensure high levels of governance for account holders and users, as well as all the data which is stored and accessed.

    An “Even” Data Playing Field

    When considering any “off-the-shelf” data from centralised data repositories, users benefit from a streamlined data acquisition process. This grants users access to a wealth of re-usable data offered by data providers, contributing to an even playing field as democratised data is universally available.

    For tailored requirements, some data providers on Snowflake Marketplace make certain data products available by request.

    Regardless of how you acquire the data, it is ultimately what you do with it that will derive the most meaning and value.

    Whether it be the basis for automation and AI, personalisation, analysis and insights, the integration of that data forms the foundation for informed business decision making, innovation and progress.

    The Data Revolution

    The democratisation of data through platforms is a necessity for driving innovation in Australia’s housing market. By eliminating barriers to entry, these platforms allow organisations to focus on what they do best. In an industry begging for disruption, this newfound accessibility to data sets the stage for a seismic shift towards a more equitable and affordable housing landscape in Australia. The future looks promising, and much of that promise is driven by data.

     

    Read more from The Proptech Cloud

    Understanding Housing Affordability: Key Metrics and Statistics

    Housing affordability is a significant concern in many parts of the world, affecting the quality of life and economic wellbeing of individuals and families.

    To understand the dynamics of housing affordability we need to take a detailed look at a range of different metrics and statistics to gain a full picture.

    The Three Primary Methods of Real Estate Data Integration

    cLearn the three primary methods of real estate data integration—geospatial relationships, title matches, and address matching—to improve accuracy, insights, and decision-making.

    What’s the Difference Between GDA94 and GDA2020?

    Geodetic datums, or geodetic systems, are often used by proptechs. Here is a rundown of everything you need to know about the different geodetic datums we use and reference in Australia.

    Alternative Data: What Is It, Who Uses It And Why It Matters

    Discover the powerful intel alternative data can offer. Learn why businesses and investors are turning to non-traditional data sources for deeper insights and smarter decisions.

    What Is A Geohash And How Is It Used?

    Discover what a geohash is, how it works, and its real-world applications in mapping, logistics and data analysis.

    Useful Websites for Australian Properties, Parcels and Addresses

    Useful Websites for Australian Properties, Parcels and Addresses

    Researching the existence of a property or verifying data can be challenging, often resulting in conflicting answers. Depending on your definition of a property, it may be necessary to visit various websites to validate property data.

    Here we’ve rounded up the top websites handy for verifying property data in each Australian state.

    Save time by bookmarking this resource and avoid the hassle of constantly searching online.

    Australian Capital Territory (ACT)

    Access Canberra

    Website: https://actlis.act.gov.au/titleSearch

    Available searches: title search, parcel search, address search.

    Available information: parcel, title, address, title status

    New South Wales (NSW)

    NSW LRS Online

    Website: https://online.nswlrs.com.au/wps/portal/six/find-records/

    Available searches: title search, parcel search, address search.

    Available information: parcel, title, address, parcel boundary

    ePlanning Spatial Viewer

    Website: https://www.planningportal.nsw.gov.au/spatialviewer/#/find-a-property/address

    Available searches: parcel search, address search.

    Available information: parcel, address, parcel boundary, planning rules, council/county/jurisdiction

    Northern Territory (NT)

    Northern Territory Title Search

    Website: https://www.ntlis.nt.gov.au/title-search/

    Available searches: title search, parcel search, address search.

    Available information: parcel, title, address, title status

    Queensland (QLD)

    Queensland Globe

    Website: https://qldglobe.information.qld.gov.au/

    Available searches: parcel search, address search, spatial search

    Available information: parcel, parcel boundary, title, address, title status, tenure

    South Australia (SA)

    Sailis Land Services SA
    Property Research Report (Residential)

    Website: https://sailis.lssa.com.au/products/valuationSearch/prr/propertyResearchReportResidential?form

    Available searches: address, title, parcel, valuation

    Available information: parcel, title, address, valuation status

    Tasmania (TAS)

    Land Information System Tasmania

    Website: https://maps.thelist.tas.gov.au/listmap/app/list/map

    Available searches: address, property id, title, volume folio

    Available information: parcel, parcel boundary, parcel identifier, address, property

    Victoria (VIC)

    Landata

    Website:
    https://www.landata.vic.gov.au/

    Available searches: address, property id, standard parcel identifier, volume folio

    Available information: address, property , volume folio, standard parcel identifier

    Western Australia (WA)

    Landgate – Western Australia’s land information authority

    Website: https://www0.landgate.wa.gov.au/

    Available searches: address search, lot plan, volume folio

    Available information: address, volume folio, standard parcel identifier

    Read more from The Proptech Cloud

    Understanding Housing Affordability: Key Metrics and Statistics

    Housing affordability is a significant concern in many parts of the world, affecting the quality of life and economic wellbeing of individuals and families.

    To understand the dynamics of housing affordability we need to take a detailed look at a range of different metrics and statistics to gain a full picture.

    The Three Primary Methods of Real Estate Data Integration

    cLearn the three primary methods of real estate data integration—geospatial relationships, title matches, and address matching—to improve accuracy, insights, and decision-making.

    What’s the Difference Between GDA94 and GDA2020?

    Geodetic datums, or geodetic systems, are often used by proptechs. Here is a rundown of everything you need to know about the different geodetic datums we use and reference in Australia.

    Alternative Data: What Is It, Who Uses It And Why It Matters

    Discover the powerful intel alternative data can offer. Learn why businesses and investors are turning to non-traditional data sources for deeper insights and smarter decisions.

    What Is A Geohash And How Is It Used?

    Discover what a geohash is, how it works, and its real-world applications in mapping, logistics and data analysis.