Skip to main content
Ctrl+K
cuGeo - Home cuGeo - Home

cuGeo

cuGeo - Home cuGeo - Home

cuGeo

Table of Contents

  • Geometry guide
    • Tutorials
      • Find the buildings with the most nearby taxi pickups
      • Assign locations to districts with dataframes
      • Count observations by region in one deferred query
      • Match points to regions already on the GPU
    • How-to guides
      • Install Geometry for the interface you use
      • Query your own map layers
      • Run saved spatial SQL from the shell
      • Put two layers in the same coordinate system
      • Find nearest features and handle ties
      • Clip features and dissolve the result by region
      • Reuse a boundary layer across queries
      • Pass query inputs and results between Python libraries
      • Process a result that strains GPU memory
      • Rewrite a Parquet layer as GeoParquet
      • Measure a spatial query on your workload
      • Build and link the Geometry SDK
      • Share device geometry with another CUDA component
      • Integrate Geometry with libcudf columns
      • Embed a spatial join in Velox
      • Add and verify a supported geometry operation
    • Reference
      • File formats, layers and coordinate metadata
      • Spatial SQL and query-shape support
      • Spatial functions and geometry semantics
      • Python objects and dataframe operations
      • Errors, refusals and diagnostic fields
      • Geometry SDK operations and data structures
      • Device buffers, streams and ownership
      • Query engine interfaces and compatibility
    • Explanation
      • Why a spatial join returns these rows
      • How coordinates determine distance and area
      • Why a geometry can have bounds and still fail a predicate
      • When a dataframe or SQL query does its work
      • How Geometry schedules work across a CUDA boundary
  • Agent workflow
  • Writing tests
  • Geometry guide
  • How-to guides
  • Build and link the Geometry SDK

Build and link the Geometry SDK#

Choose the interface your client uses. The installed consumer fixture uses CMake 3.28 and CUDA Toolkit 13.0.

Client interface

Route

C or C++ Geometry SDK

Find cugeo_geometry_cuda and link cugeo::geometry_cuda, as shown below.

CUDA device interop

Enable CUGEO_GEOMETRY_CUDA_TEST_CUDA_INTEROP in the installed consumer fixture and build installed_direct_device.

libcudf columns

Follow Integrate Geometry with libcudf columns for its CMake 4.0, CUDA 13 and cuDF workflow.

Typed host C ABI

Use the Cargo-built cugeo::geometry_execution_c interface.

cugeo::geometry_cudf

Choose descriptor validation or a runtime build as described below.

Install the components the client requests#

Build and install the SDK source with the cugeo-geometry-cuda build and install recipe. Choose an install prefix for the files your client will consume. The installed consumer fixture requests contract_digest, geometry_constructors_device, geometry_gather_wkb_mixed and point_geography_distance from the installed package.

Use the native setup script#

For the broader native setup script route, use Linux x86-64 or aarch64 with glibc 2.38 or later and an NVIDIA driver for CUDA 13. Install micromamba, mamba or conda. Choose --prefix for the installation location, --arch for the target architecture and --jobs for compiler concurrency. Optional Proj builds have additional dependencies.

Choose a cuDF backend build#

For cugeo::geometry_cudf, descriptor validation can build without target execution. A runtime build has additional dependencies and is a separate choice.

Build and run a client against the installed prefix#

The following consumer builds the installed digest-check fixture. Save this as CMakeLists.txt in a separate client directory and copy contract_digest.c into that directory.

cmake_minimum_required(VERSION 3.28)
project(geometry_client LANGUAGES C)

find_package(cugeo_geometry_cuda CONFIG REQUIRED COMPONENTS
  contract_digest
  geometry_constructors_device
  geometry_gather_wkb_mixed
  point_geography_distance)
find_package(CUDAToolkit 13.0 REQUIRED)

add_executable(probe contract_digest.c)
target_compile_features(probe PRIVATE c_std_11)
target_compile_definitions(probe PRIVATE
  "EXPECTED_CONTRACT_DIGEST=\"${cugeo_geometry_cuda_CONTRACT_DIGEST}\"")
target_link_libraries(probe PRIVATE cugeo::geometry_cuda CUDA::cuda_driver)

Build with the locked Linux package#

The following recipe uses the locked Linux x86-64 package build. Set prefix to the prefix used by tools/build_native.sh and consumer to the directory containing the CMakeLists.txt and copied contract_digest.c.

prefix=/path/to/native-prefix
consumer=/path/to/geometry-client
toolchain=$prefix/env

"$toolchain/bin/cmake" -S "$consumer" -B "$consumer/target" \
  -DCMAKE_PREFIX_PATH="$prefix/cugeo-geometry-cuda-sdk" \
  -DCUDAToolkit_ROOT="$toolchain" \
  -DCMAKE_C_COMPILER="$toolchain/bin/x86_64-conda-linux-gnu-gcc" \
  "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath-link,$toolchain/lib"
"$toolchain/bin/cmake" --build "$consumer/target"
env LD_LIBRARY_PATH="$toolchain/lib" "$consumer/target/probe"

The linker option lets GNU ld locate the CUDA toolkit and C++ runtime libraries. LD_LIBRARY_PATH selects those libraries when the probe launches.

Successful configuration resolves the installed target and requested components. The probe exits successfully when the CMake package, header and library contract digests agree. It prints an error and exits nonzero if they differ. Component availability, provider selection and qualification are separate facts. See the SDK API declarations for build identity and capability queries.

Build a CUDA device consumer#

For a CUDA device consumer, configure the checked installed fixture with -DCUGEO_GEOMETRY_CUDA_TEST_CUDA_INTEROP=ON and build installed_direct_device. It uses the installed direct_device.cu example and links CUDA::cudart as well as the SDK and CUDA driver targets. For operation descriptors and their fields, see Geometry SDK operations and data structures.

previous

Measure a spatial query on your workload

next

Share device geometry with another CUDA component

On this page
  • Install the components the client requests
  • Use the native setup script
  • Choose a cuDF backend build
  • Build and run a client against the installed prefix
  • Build with the locked Linux package
  • Build a CUDA device consumer
NVIDIA NVIDIA
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026 NVIDIA Corporation.