ArcGIS Blog

AI

ArcGIS Pro

Understanding Grid Size for Geospatial Foundation Models for Image Embeddings

By Rohit Singh and Priyanka Tuteja

Introduction

When working with geospatial foundation models to generate image/raster embeddings, most attention is naturally focused on selecting the right model.

Should you use TerraMind for multimodal Earth observation data? DOFA or Clay for multisensor imagery? Prithvi for environmental monitoring? Or DINO for high-resolution RGB imagery?

While model selection is important, it is only part of the equation.

An equally important factor is often overlooked: grid size.

The same foundation model can generate very different embeddings depending on how much geographic area is represented within each embedding cell. A grid size that is too small may capture only fragments of a feature, while a grid size that is too large may dilute important information with excessive background context.

As a result, grid size can have a significant impact on the quality of similarity search results and the types of patterns that embeddings capture.

This blog explores how grid size influences embedding generation, why it matters, and how to choose an appropriate value for different geospatial workflows.

 

What is Grid Size?

When generating embeddings from imagery, ArcGIS divides the imagery into a regular grid. Each grid cell is processed independently and converted into an embedding vector representing the semantic content contained within that geographic area.

You can think of grid size as defining the amount of ground area summarized by a single embedding vector.

A smaller grid size captures a smaller geographic area and typically preserves more localized detail. A larger grid size captures a broader area and incorporates more surrounding context.

The resulting embedding reflects the patterns, structures, textures, and spatial relationships contained within that grid cell.

 

For example, if the objective is to identify all grids containing tree canopy in the image below, a grid size of 2 is recommended. This grid size captures the canopy boundaries effectively while minimizing the inclusion of surrounding background information, which becomes more prominent in larger grids, such as those with a size of 8.

Why Grid Size Matters

The size of the embedding grid influences the type of information captured by the foundation model.

When the grid size is too large relative to the object of interest:

  • Multiple features may be combined into a single embedding.
  • Background information can dominate the representation.
  • Similarity search results may become broader and less precise.

When the grid size is too small:

  • Objects may be fragmented across many embedding cells.
  • Embeddings may emphasize local textures and appearance.
  • Structural characteristics of larger features may become harder to capture.

In practice, effective results are often obtained when the feature of interest occupies a meaningful portion of the embedding grid while still preserving sufficient surrounding context.

For example, consider a parking lot containing vehicles. With a smaller grid size, vehicle structure may be preserved across multiple embedding cells, producing highly localized similarity matches. With a larger grid size, each embedding summarizes a broader area that includes pavement, vegetation, roads, and other nearby features, resulting in more generalized similarity patterns.

Because object size, imagery resolution, and analysis goals vary, there is no single optimal grid size. Testing multiple grid sizes and comparing the resulting similarity patterns is often the best way to determine the most appropriate configuration for a particular workflow.

Fig: The image shows the query features highlighted in blue and the retrieved similar features highlighted in pink. It is evident that very large or very small grid sizes fail to represent the query features of cars accurately, leading to poorer similarity search results. In contrast, a grid size of 1.3 m captures the car features more effectively, resulting in the best similarity search performance.

Object Size Matters

There is no universally optimal grid size.

The ideal value depends on the scale of the geographic feature being analyzed.

Object Type Typical Grid Size Trend
Vehicles Small
Swimming pools Small
Individual buildings Small–Medium
Solar farms Medium
Airports Large
Forest stands Large
Burn scars Very Large
Agricultural regions Very Large

As a general rule, larger geographic phenomena require larger grid sizes, while smaller objects typically benefit from smaller grid sizes.

Imagery Resolution Matters Too

Grid size and imagery resolution must be considered together. The image is resampled before embedding generation to a cell size calculated using the formula (cell size = provided grid size/model patch size). If the resampling forces excessive up sampling during processing. It may do the following:

  • Alter pixel values
  • Introduce artifacts
  • Reduce embedding quality

Let us consider generating embeddings using DINOv2 model. It has a patch size of 14. If we generate embeddings on images with native resolutions of 10 cm and 1 m, we will observe the results as illustrated in following image.

Fig: With 10 cm resolution imagery, the resampled cell size calculated using the formula discussed above is also 10 cm, which leads to strong similarity search performance. However, imagery with a native resolution of 1 m must be resampled to 10 cm, introducing significant interpolation resulting in poorer similarity search performance, as illustrated in the figure.

For single-resolution raster datasets, it is generally recommended to leave the Grid Size parameter empty.

ArcGIS automatically computes an appropriate value using the native image resolution, helping preserve original pixel values and avoid unnecessary resampling.

 

Special Considerations for Mosaic Datasets

Mosaic datasets and image services often contain imagery at multiple resolutions.

In these workflows, grid size influences not only the generated embeddings but also the imagery selected for processing.

ArcGIS chooses imagery whose resolution best matches the target cell size derived from the specified grid size.

As a result, selecting an appropriate grid size becomes even more important because it affects both:

  • The spatial context represented by the embeddings
  • The imagery resolution used to generate the embeddings

A well-chosen grid size helps ensure that embeddings are generated from imagery that appropriately represents the intended geographic feature.

 

Summary

Grid size is more than a processing parameter.

It determines the spatial context that a foundation model sees when generating embeddings and directly influences the quality of the resulting representations.

The most effective grid sizes typically balance:

  • Object detail
  • Surrounding context
  • Imagery resolution

When selected appropriately, grid size can significantly improve similarity search results and help foundation models generate more meaningful geospatial representations.

 

Share this article

Leave a Reply