OpenUSD tile and asset API#

The optional cugeo_proj_usd adapter exports georeferenced geometry to OpenUSD. It is a separate CMake 3.24 or later build with pinned USD Exchange and OpenUSD dependencies. CUGEO_PROJ_USD_ENABLE_CUDA controls its CUDA export path and defaults to ON. See the adapter build definition and dependency lock. The CUDA source manifest records the intended source inventory and dependency versions. It does not establish device availability or qualification.

The installed public headers are authoritative for declarations, input lengths, options, defaults, results and cleanup. The links below point to the checked revision of those headers.

Choose a shape and placement#

Shape and placement

Input and options

Result and related calls

Points, linear or geocentric

DevicePointTile, PointTileOptions, HeightPolicy, InvalidRowPolicy, OriginPolicy and PointTileExporter. Coordinates are device buffers. Validity, height and IDs are optional inputs. Select height, invalid-row, origin and publication policies for the tile.

PointTileResult reports source, authored, failed and dropped counts, placement, bounds, quantization errors, reuse, durability and optional timings. cleanupPointTileTemporary cleans interrupted temporary output.

Curves, linear or geocentric

DeviceCurveTile, HostCurveTopology, CurveWidths, CurveRibbonNormals, CurveTileOptions and CurveTileExporter. Topology is on the host. Control points are on the device and require IDs. Choose type, basis, wrap and interpolation. Widths and target-USD ribbon normals are optional. Linear curves require basis none. Cubic curves require another basis.

CurveTileResult includes the control-point result and curve and metadata counts. Export rejects failed control points rather than repairing topology. cleanupCurveTileTemporary cleans interrupted temporary output.

Meshes, linear or geocentric

DeviceMeshTile, HostMeshTopology, MeshFaceSubset, MeshTileOptions and MeshTileExporter. Vertices are device input and require stable IDs. Topology and companion arrays are on the host. Set winding, normal and UV interpolation, and optional material subsets. Supplied subsets must partition all faces completely and without overlap.

MeshTileResult includes the vertex result, face and subset counts and winding and interpolation details. validateMeshTileSeams reopens adjacent tiles to check their shared group, origin and stable vertex positions. cleanupMeshTileTemporary cleans interrupted temporary output.

Point instances, linear or geocentric

DevicePointInstancerTile, HostPointInstancerData, PointInstancerPrototype, PointInstancerTileOptions and PointInstancerTileExporter. Device positions require IDs. Host prototype indices contain one zero-based index per position. Optional orientations and scales are per instance and expressed in target USD axes.

PointInstancerTileResult includes the position result, prototype count, authored-array flags and prototype-aware bounds. Failed positions reject the tile. cleanupPointInstancerTileTemporary cleans interrupted temporary output.

WGS 84 ellipsoid patch, geocentric

EllipsoidPatchRegion, EllipsoidPatchOptions and EllipsoidPatchExporter. The region is a longitude/latitude rectangle in degrees. Antimeridian crossing is explicit. Options specify chord and quantization tolerances, origin and seam identity.

EllipsoidPatchResult contains the mesh result, segment counts and error bounds. cleanupEllipsoidPatchTemporary cleans interrupted temporary output.

The geocentric point path uses a registered WGS 84 surface profile to produce EPSG:4978 positions. Its height policy must supply ellipsoidal heights where required or explicitly select the registered forward-only zero-height promotion. GeocentricLocalFramePolicy, Wgs84EnuAnchor, Wgs84EnuFrame and makeWgs84EnuFrame describe ECEF-axis or east-north-up local representation of those positions. The local frame does not select another CRS.

For mesh faces and curves, HostFeatureMetadata and SourceFeature associate logical elements with producer IDs and a catalog. Supply one element ID per face or curve. Catalog IDs must be strictly ordered and exactly cover the IDs used. Empty vectors disable the metadata together. Tags are preserved as strings. OverlayPresentation and OverlayPresentationPolicy provide a consumer-owned presentation hint for mesh and curve assets. They do not change coordinates or CRS semantics.

Export capacity and cleanup#

Each exporter is capacity bounded. Curve, mesh and instancer exports are synchronous through save and reopen. Their failed geometry rows reject the tile. For an interrupted export, the application calls the matching cleanup function under application-level exclusion. The cleanup functions target temporary output. Published assets remain untouched. Consult the linked headers for each family’s complete array and option contract.

Which call produces the asset?#

Call

Output and lifetime

PointTileExporter::exportTile or exportGeocentricTile

Returns a PointTileResult for one published tile. The exporter is bound to a CUDA context, which must remain alive until the exporter is destroyed.

PointTilePipeline::submitTile or submitGeocentricTile

Returns a shareable PointTileExportTicket. waitForDeviceCopy() marks when GPU work no longer uses the caller’s input buffers, stream, prepared transform and workspace. wait() returns the final PointTileResult or propagates failure. The mandatory lifetimeOwner must retain all borrowed resources reachable through the submission and is retained until persistence completes or fails. The pipeline has bounded slots, blocks submission when full and serializes USD authoring and persistence. flush() drains accepted work and reports failure. See pipeline and ticket declarations.

assemblePointTiles

Takes paths to compatible existing point tiles and returns a PointAssetResult for a root asset with relative payload arcs. The tiles remain independently loadable. The installed-consumer test assembles two tiles and reopens the result with the expected points from both. See the checked consumer.

publishPointTilePackage

Copies validated tiles to deterministic package-relative names, authors and reopens the composition, and publishes the directory. It returns a PointPackageResult containing the root path and assembly result. After interruption, the application can call cleanupPointTilePackageTemporary under exclusion. It removes only the owned temporary directory, never the published package.

The assembly and package options, result fields and cleanup declaration are in point_asset_assembler.h. Results are returned to the caller by value. The published files remain filesystem assets.

What happens at an existing path?#

All exporter and assembly option structures default existingAssetPolicy to fail. The shared ExistingAssetPolicy values are listed below.

Value

Behavior

fail

Refuse an existing target.

verifyAndReuse

Verify the existing asset against the requested publication and reuse it without clobbering it. The publication implementation checks byte identity before reuse.

replace

Request replacement where the producer supports an atomic replacement. A nonempty package directory is rejected because replacing it is not one atomic filesystem operation.

The assembly tests check reuse of the same two-tile root and rejection when the requested source label changes. They also check reuse of the complete package and rejection of non-atomic replacement of a nonempty package. See AuthoringPublication.cpp for the byte-identity check.

PublicationDurability is a separate choice.

Value

Behavior

none

Do not request the data-and-directory flush sequence.

dataAndDirectory

Flush completed data before publication and the containing directory after the final name and cleanup state are installed. Unsupported platforms fail rather than silently weakening the request.

Result durability flags report whether the requested sequence completed. For package-specific coverage and individual defaults, use the linked option and result declarations.