Skip to content

Pdok 18835/vervanging trex v2 points and lines - #47

Open
DvBree wants to merge 24 commits into
PDOK-18835/vervanging-trex-v2-vertegelingfrom
PDOK-18835/vervanging-trex-v2-points-and-lines
Open

Pdok 18835/vervanging trex v2 points and lines#47
DvBree wants to merge 24 commits into
PDOK-18835/vervanging-trex-v2-vertegelingfrom
PDOK-18835/vervanging-trex-v2-points-and-lines

Conversation

@DvBree

@DvBree DvBree commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Description

texel now takes points and lines into account for encoding. This means that texel snap now actually populates the _encoded tables for point, multipoint, linestring, and multilinestring geometries.

This change contains some refactoring.

  • The processing.go file has been heavily refactored. The new setup allows for general geometries, and the decoupling from geometric logic allows for better unit testing. The functionality should otherwise be unchanged.
  • The detect.go file has been reorganised. On the one hand, again, this was necessary to allow general geometries. On the other hand, by reordering the functions and adding comments, the presentation has been improved.
  • The new functionality broke the main test in snap_test.go, which was incompatible with the new setup. This 800-line (!) test was fixed with some text replacements and new plumbing.

Aside from unit tests, the code has been shown to provide visually satsifactory results when applied to a small portion of the BRT-A.

Type of change

  • New feature
  • Improvement of existing feature
  • Refactoring

Checklist:

  • I've double-checked the code in this PR myself
  • I've left the code better than before (boy scout rule)
  • The code is readable, comments are added that explain hard or non-obvious parts.
  • I've expanded/improved the (unit) tests, when applicable
  • I've run (unit) tests that prove my solution works
  • There's no sensitive information like credentials in my PR

Comment thread pointindex/detect.go
case geom.LineString:
return ix.lineTraceLine(g, tmsID, buffer)
case geom.Point:
return ix.lineTracePoint(g, tmsID, buffer)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Als lineTracePoint alleen een wrapper is om GetQBBoxWithBuffer - waarom dan niet die hele functie weglaten en direct GetQBBoxWithBuffer aanroepen?

Comment thread snap/snap.go
level := uint(tmID) + levelDiff
tmIDsByLevels[level] = tmID
return result
default:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hier wordt nu alleen addPointsAndSnap gedaan voor polygons - is dat niet ook relevant voor punten en lijnen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants