Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Geographic Features | Introduction to BigQuery-Specific Features
Practice
Projects
Quizzes & Challenges
Quiz
Challenges
/
BigQuery Fundamentals

bookGeographic Features

Glissez pour afficher le menu

Discover geography data types and functions in BigQuery, with a focus on working with geographic points created from latitude and longitude values. While these features are more specialized, they are extremely useful for location-based analysis such as mapping, transportation, and delivery data.

Geography Points

BigQuery uses the GEOGRAPHY data type to represent locations on the Earth's surface. When a dataset includes latitude and longitude values, they can be combined into a single geographic point that BigQuery can interpret spatially.

Geography points are commonly used in scenarios involving:

  • Mapping and visualization;
  • Transportation and routing data;
  • Delivery zones and service areas;
  • Any analysis that depends on physical location.

Creating Geographic Points

Geographic points are created using the ST_GEOGPOINT(longitude, latitude) function. This converts raw coordinate values into a spatial object that can be used in distance calculations and spatial queries.

For example, a city's latitude and longitude columns can be combined to generate a point representing its exact location.

Calculating Distance

The ST_DISTANCE(pointA, pointB) function calculates the distance between two geographic points, typically returning the result in meters.

Common use cases include:

  • Measuring the distance between two cities;
  • Calculating delivery route lengths;
  • Determining service radius around a location.

Filtering and Comparison

Geographic calculations can be combined with standard filters, such as limiting results to specific cities. This makes it possible to compare distances dynamically across selected locations within a dataset.

Although geography functions are not used in every project, they unlock powerful spatial analysis capabilities in BigQuery. When working with location-based data, these tools enable accurate distance calculations and meaningful geographic insights.

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 7

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Section 3. Chapitre 7
some-alt