bcgov / bcgov/FIT_changedetector

curve support

Open
#89 0 comments 0 reactions 0 assignees View on GitHub
priority-low
Dominant language
Python
Stars
2
Forks
1
Avg merge
7h 9m
Merged PRs (30d)
39

Description

Change detection for curves is not currently supported (shapely does not support curved geometries, gdal converts curved geoms to linear features on read to geopandas so geometry comparison is not likely to be robust). If curves (in file geodatabases) are commonly encountered:

1. add a path to compare() that filters these features and dumps to `UNSUPPORTED` or `CURVES` or some such output, and process the rest of the data in the input. Notify user that not all features were compared.
2. If we want to check that curves are "more or less equal", consider adding an option ` --allow-curves`, configuring `OGR_ARC_STEPSIZE` to something small as per below and encouraging the user to use a coarser tolerance when comparing this data

>GDAL converts curves via an angular step, not a fixed coordinate/distance tolerance

> - Default: 4 degrees max angle step (OGR_G_ApproximateArcAngles/the curve-linearization API's default when no step size is given).
> - Configurable globally via the OGR_ARC_STEPSIZE config option (an environment variable / GDAL config setting)
> - The actual positional error scales with radius, since it's angular: for a step angle θ, the sagitta (max deviation from the true arc) is approximately r × (1 − cos(θ/2)). At the 4° default, that's roughly r × 0.00061 — about 6cm of deviation for a 100m-radius curve, but ~61cm for a 1000m-radius curve. So there's no single "precision" number to quote; a gentle, large-radius curve gets segmented much more coarsely in absolute terms than a tight one, for the same angular step.

>If curve precision ever became a real concern setting OGR_ARC_STEPSIZE to something small before running would tighten the approximation.

Contributor guide

Open the contributing guide

Research direction

Start at the compare() entry point and trace how file-geodatabase features are read and compared. Decide whether unsupported curves should be separated and reported or approximated with an --allow-curves option; done means the chosen behavior is implemented, users are notified when comparisons are incomplete, and the remaining input is still processed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.