{"id":25165579,"url":"https://github.com/makepath/rtxpy","last_synced_at":"2026-02-22T08:02:13.429Z","repository":{"id":43400814,"uuid":"407187852","full_name":"makepath/rtxpy","owner":"makepath","description":"Spatial Analysis \u0026 Visualization using Xarray + NVIDIA Optix","archived":false,"fork":false,"pushed_at":"2026-02-19T01:58:44.000Z","size":128160,"stargazers_count":14,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-19T07:18:03.133Z","etag":null,"topics":["cuda","python","xarray","xarray-accessor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/makepath.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-16T14:03:33.000Z","updated_at":"2026-02-19T01:58:48.000Z","dependencies_parsed_at":"2022-08-28T03:13:39.204Z","dependency_job_id":null,"html_url":"https://github.com/makepath/rtxpy","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/makepath/rtxpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makepath%2Frtxpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makepath%2Frtxpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makepath%2Frtxpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makepath%2Frtxpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makepath","download_url":"https://codeload.github.com/makepath/rtxpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makepath%2Frtxpy/sbom","scorecard":{"id":613486,"data":{"date":"2025-08-11","repo":{"name":"github.com/makepath/rtxpy","commit":"67ccfaaad53c20ed8e6c204e0efdf28527c183e3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build_wheels.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/makepath/rtxpy/build_wheels.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/makepath/rtxpy/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/makepath/rtxpy/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/makepath/rtxpy/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/makepath/rtxpy/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/makepath/rtxpy/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/makepath/rtxpy/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/makepath/rtxpy/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/build_wheels.yml:50","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:35","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T03:15:17.264Z","repository_id":43400814,"created_at":"2025-08-21T03:15:17.264Z","updated_at":"2025-08-21T03:15:17.264Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29706572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T05:59:28.568Z","status":"ssl_error","status_checked_at":"2026-02-22T05:58:46.208Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda","python","xarray","xarray-accessor"],"created_at":"2025-02-09T05:26:41.399Z","updated_at":"2026-02-22T08:02:13.424Z","avatar_url":"https://github.com/makepath.png","language":"Python","readme":"# RTXpy\n\nGPU-accelerated terrain analysis for the xarray ecosystem. Compute hillshade, viewshed, slope — get DataArrays back. Build a Dataset, then explore it interactively in 3D. Built-in data fetching (DEM, buildings, roads, water, fire, wind) makes it easy to go from a bounding box to a full scene.\n\n![Crater Lake Viewshed Demo](examples/images/playground_demo.gif)\n\n*Real-time viewshed analysis with GPU-accelerated ray tracing. Green areas are visible from the observer position (blue dot). Run `python examples/playground.py` to try it interactively.*\n\n## Quick Start\n\nFetch terrain, analyze, and explore — all from a bounding box:\n\n```python\nfrom rtxpy import fetch_dem\nimport rtxpy\n\n# Download 30m terrain (cached after first run)\ndem = fetch_dem(\n    bounds=(-122.3, 42.8, -121.9, 43.0),\n    output_path='crater_lake.zarr',\n    source='copernicus',\n)\ndem = dem.rtx.to_cupy()\n\n# Analysis results are standard xarray DataArrays\nhillshade = dem.rtx.hillshade(shadows=True)\nviewshed = dem.rtx.viewshed(x=500, y=300, observer_elev=2)\n\n# Interactive 3D terrain exploration\ndem.rtx.explore()\n```\n\nBuild a Dataset with multiple layers, then explore them together:\n\n```python\nimport xarray as xr\nfrom xrspatial import slope, aspect\nfrom rtxpy import fetch_dem, fetch_buildings, fetch_roads\n\nbounds = (-122.3, 42.8, -121.9, 43.0)\ndem = fetch_dem(bounds, 'terrain.zarr', source='srtm', crs='EPSG:5070')\ndem = dem.rtx.to_cupy()\n\nds = xr.Dataset({\n    'elevation': dem,\n    'slope': slope(dem),\n    'aspect': aspect(dem),\n})\n\n# Fetch and place vector features\nroads = fetch_roads(bounds, crs='EPSG:5070')\nds.rtx.place_roads(roads, z='elevation')\n\nbldgs = fetch_buildings(bounds, source='overture', crs='EPSG:5070')\nds.rtx.place_buildings(bldgs, z='elevation')\n\n# G cycles layers, N toggles geometry, U drapes satellite tiles\nds.rtx.explore(z='elevation', mesh_type='voxel')\n```\n\n## Prerequisites\n\n- **NVIDIA GPU**: Maxwell architecture or newer (GTX 900+ / RTX series)\n- **NVIDIA driver**: 455.28+ (Linux) or 456.71+ (Windows)\n- **CUDA**: 12.x or newer\n\nSee [INSTALL.md](INSTALL.md) for detailed instructions and troubleshooting.\n\n## Installation\n\n### Conda (recommended)\n\n```bash\nconda create -n rtxpy python=3.12 -y\nconda activate rtxpy\nconda install -c makepath -c conda-forge rtxpy\n\n# Additional deps for examples and interactive viewer\nconda install -c conda-forge \\\n    xarray rioxarray xarray-spatial \\\n    pyproj pillow pyglfw moderngl scipy \\\n    \"duckdb\u003c1.4\" requests matplotlib\n```\n\n### Pip + Conda hybrid (from source)\n\n```bash\n# GPU foundation via conda\nconda create -n rtxpy-dev python=3.12 -y\nconda activate rtxpy-dev\nconda install -c conda-forge cupy numba zarr\n\n# OptiX SDK headers (needed for pyoptix-contrib build and PTX compilation)\ngit clone --depth 1 https://github.com/NVIDIA/optix-dev.git /tmp/optix-dev\nCMAKE_PREFIX_PATH=/tmp/optix-dev \\\n    pip install pyoptix-contrib\n\n# Install rtxpy (editable)\npip install -e \".[all]\"\n```\n\n### Development\n\n```bash\n# After completing the pip + conda hybrid setup above:\npip install -e \".[tests]\"\npytest -v rtxpy/tests\n```\n\n## Features\n\n- **Analysis arrays** — `hillshade()`, `slope()`, `aspect()`, `viewshed()` return xarray DataArrays that fit into your existing Dataset\n- **Data fetching** — `fetch_dem()`, `fetch_buildings()`, `fetch_roads()`, `fetch_water()`, `fetch_wind()`, `fetch_firms()` — go from a bounding box to real data with automatic caching\n- **3D feature placement** — extrude buildings, drape roads, scatter custom meshes on terrain\n- **Interactive viewer** — `explore()` renders your Dataset in 3D with keyboard/mouse controls, satellite tiles, wind particles, and real-time viewshed\n- **Rendering** — perspective camera with shadows, fog, AO, depth-of-field, colormaps for static images and GIF animations\n- **Mesh I/O** — load GLB/OBJ/STL, save/load zarr scenes, export STL\n\n## Documentation\n\n- **[Getting Started](docs/getting-started.md)** — installation, prerequisites, first example, how the accessor works\n- **[User Guide](docs/user-guide.md)** — task-oriented workflows for analysis, placement, rendering, and the interactive viewer\n- **[API Reference](docs/api-reference.md)** — complete method signatures, parameters, and return values\n- **[Examples](docs/examples.md)** — annotated walkthrough, quick recipes, and example scripts\n\n## Low-Level API\n\nFor custom ray tracing without the xarray accessor:\n\n```python\nimport numpy as np\nfrom rtxpy import RTX\n\nrtx = RTX()\n\nverts = np.float32([0,0,0, 1,0,0, 0,1,0, 1,1,0])\ntriangles = np.int32([0,1,2, 2,1,3])\nrtx.build(0, verts, triangles)\n\nrays = np.float32([0.33, 0.33, 100, 0, 0, 0, -1, 1000])\nhits = np.float32([0, 0, 0, 0])\nrtx.trace(rays, hits, 1)\n\nprint(hits)  # [100.0, 0.0, 0.0, 1.0]\n```\n\n## Building the PTX Kernel\n\n```bash\nGPU_ARCH=$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader | tr -d '.')\nnvcc -ptx -o rtxpy/kernel.ptx cuda/kernel.cu \\\n    -arch=sm_${GPU_ARCH} \\\n    -I/path/to/OptiX-SDK/include \\\n    -I cuda \\\n    --use_fast_math\n```\n\n## Building with Conda\n\n```bash\nconda install conda-build\nconda build conda-recipe\nconda install --use-local rtxpy\n```\n\nAuto-detects GPU architecture, downloads OptiX headers, compiles PTX, and installs everything. Override with `GPU_ARCH=86` or `OPTIX_VERSION=8.0.0`. See `conda-recipe/README.md` for details.\n\n## WSL2 Support\n\nSee [Getting Started — WSL2 Setup](docs/getting-started.md#wsl2-setup) for instructions on getting OptiX working on WSL2.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakepath%2Frtxpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakepath%2Frtxpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakepath%2Frtxpy/lists"}