Skip to main content

GDAR-SAR -- Synthetic aperture radar geometry and functionality for GDAR

Project description

gdar-sar

Synthetic aperture radar geometry and functionality for the GDAR processing framework. Part of the OpenGDAR family of packages. Requires gdar-base and gdar-orbit.

Type registration

gdar.sar.meta and gdar.sar.refsys define subtypes of gdar.base.Meta and gdar.base.Meta_refsys that must be registered before they can be instantiated. Registration happens automatically when you import gdar.sar, so make sure this import occurs in your Python context before creating any SAR Meta or Meta_refsys objects. When reading files with read_gdr(), the reader handles this for you.

Modules

gdar.sar.meta -- SAR metadata

SAR-specific metadata extending the base Meta class:

  • Meta_sar -- metadata container for SAR rasters (Doppler centroid, pulse repetition frequency, chirp parameters, etc.).
  • create_doppler_grid() -- generate a grid of Doppler centroid values across the raster.

gdar.sar.refsys -- Reference systems

SAR coordinate reference system definitions used by DataRaster geometry methods:

  • Meta_refsys_mssar_zd_sr -- monostatic SAR, zero-Doppler, slant-range reference system.
  • Meta_refsys_mssar_zd_gr -- monostatic SAR, zero-Doppler, ground-range reference system.
  • Meta_refsys_bssar_bmcd_sr -- bistatic SAR, beam-centre Doppler, slant-range reference system.

gdar.sar.bistatic_geometry -- Bistatic SAR geometry

Geometry routines for bistatic (e.g. TanDEM-X) configurations:

  • BistaticGeometry -- class encapsulating transmitter/receiver orbits and the bistatic range equation.
  • bistatic_from_meta() -- construct a BistaticGeometry from raster metadata.
  • bistatic_geod_from_coord() -- convert SAR coordinates to geodetic.
  • bistatic_xyz2sar() -- convert Cartesian XYZ to SAR coordinates.
  • brange_from_azel() -- compute bistatic range from azimuth and elevation.

gdar.sar.rastertools -- Raster processing utilities

Higher-level functions operating on SAR DataRaster objects:

  • back_geocode_dem() / back_geocode_raster() -- back-geocode a DEM or raster using SAR geometry.
  • grd_merger() -- merge multiple GRD products into one raster.
  • band_split_pixels() / band_split_parameters() -- spectral band splitting for split-spectrum InSAR.
  • azimuth_splitter() / range_splitter() -- split an SLC in azimuth or range.
  • slc_processing_meta() -- build metadata for SLC processing steps.
  • update_trajectory() -- replace a raster's trajectory with a precision orbit.
  • is_descending() -- check whether the orbit pass is descending.

gdar.sar.metatools -- Metadata helpers

  • update_bmeta_with_brefsys() -- update bistatic metadata with a beam-centre reference system.

Installation

Install from PyPI:

pip install gdar-sar

or with uv:

uv pip install gdar-sar

Dependencies (including gdar-base and gdar-orbit) are installed automatically.

Optional extras:

  • crs — map projections and geocoding (requires GDAL; see the gdar-base README for GDAL installation instructions)
  • plotting — matplotlib
  • interactive — IPython
pip install "gdar-sar[crs,plotting]"

Testing

pytest tests/

Development

Installing from the NORCE GitLab registry

Internal users and contributors can install pre-release versions from the NORCE GitLab package registry. Authenticate with either a deploy token or a personal access token:

  • Deploy token: From the earth-observation/opengdar group page in GitLab, go to Settings → Repository → Deploy Tokens and create a token with the read_package_registry scope. The username is the auto-assigned name shown when the token is created (e.g. gitlab+deploy-token-42).
  • Personal access token: Create a new access token in GitLab with the read_api scope. The username for personal tokens is __token__.

Set the following environment variables:

# bash / zsh
export UV_INDEX_OPENGDAR_USERNAME=<username>
export UV_INDEX_OPENGDAR_PASSWORD=<token>

Then build the environment:

uv venv --python 3.12
uv sync

If you need GDAL/CRS support, install the GDAL build prerequisites first (see the gdar-base README), then:

uv pip install numpy setuptools
uv pip install --no-build-isolation "gdal==$(gdal-config --version)"
uv sync --extra crs

Internal links

License

This project is licensed under the Apache License, Version 2.0. You may obtain a copy of the license at https://www.apache.org/licenses/LICENSE-2.0 or in the LICENSE file distributed with this source.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdar_sar-1.2.0.post3.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gdar_sar-1.2.0.post3-py3-none-any.whl (3.5 MB view details)

Uploaded Python 3

File details

Details for the file gdar_sar-1.2.0.post3.tar.gz.

File metadata

  • Download URL: gdar_sar-1.2.0.post3.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gdar_sar-1.2.0.post3.tar.gz
Algorithm Hash digest
SHA256 906f0e47468239d9162ca0d208f91e4dfe76e5494f7dda0f619584894a10bf2a
MD5 5305320a447a439ae6807661a37961d9
BLAKE2b-256 b50c51a5755c3bc21e07c508e71571adef96a58d11ab7f63f26bde098a50e5e1

See more details on using hashes here.

File details

Details for the file gdar_sar-1.2.0.post3-py3-none-any.whl.

File metadata

  • Download URL: gdar_sar-1.2.0.post3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gdar_sar-1.2.0.post3-py3-none-any.whl
Algorithm Hash digest
SHA256 26b76d5c2070c53a024c5723a0ff22b9f3b9c267cccf00e814583b3f3f080376
MD5 30210aca385b4e9b352504449c04833a
BLAKE2b-256 7060f741b9719936886adb95f18d25864eededa67bd817d6b3c063087e934355

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page