Skip to content

Pdok 18835/vervanging trex v2 attributes - #43

Open
DvBree wants to merge 25 commits into
PDOK-18835/vervanging-trex-v2-vertegelingfrom
PDOK-18835/vervanging-trex-v2-attributes
Open

Pdok 18835/vervanging trex v2 attributes#43
DvBree wants to merge 25 commits into
PDOK-18835/vervanging-trex-v2-vertegelingfrom
PDOK-18835/vervanging-trex-v2-attributes

Conversation

@DvBree

@DvBree DvBree commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Add command texel mvt that generates tiles from output of texel (now also available as texel snap) with -enc option enabled (said option is available in base branch). New command generates tiles structure in target folder.

List of changes (does not align with commits):
Changes for feature:

  • feat: populate MapBox Vectortile Specs in assemble.go. Improves on tegola / go-spatial
  • feat: load and write tile information from geopackage in gpkgmvt.go
  • feat: interface for mvt flow in interface.go (similar to existing)
  • feat: orchestrating loop in processingmvt.go
  • feat: separate commands in main.go (includes initialization step).

Refactors:

  • ref: extracted shared gpkg functionality to gpkg.go, snap-specific and mvt-specific in gpkgsnap.go and gpkgmvt.go (encoded.go gone).
  • ref: import MapBox specification directly instead of copying code. Cleanup up unused code. Result is go_spatial_encoding.
  • ref: clearer interface between runs with -enc enabled and not.

Tests:

  • test: processGeometry in processing_test.go
  • test: encoding functionality in assemble_test.go

Fixes:

  • fix: missed +1 in PointIndex
  • fix: -encGeometries flag properly used

Type of change

  • New feature

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

@RoelvandenBerg RoelvandenBerg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Er gebeurt een hoop. Waaronder refactoring. Ik denk dat het goed is om in de PR goed uit te leggen waarom je doet wat je doet. Dan is beter te volgen wat er gebeurd. Ik ben gestopt na een comments. Kan ook mondeling.

Comment thread pointindex/pointindex.go
quadrantSlice := make([]Quadrant, (maxY-minY)*(maxX-minX))
for i := range maxX - minX {
for j := range maxY - minY {
quadrantSlice := make([]Quadrant, (maxY-minY+1)*(maxX-minX+1))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

leest als een fix. heeft dit ook effect op andere plekken?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Dit was een bug in een functie die ik zelf heb toegevoegd in de eerste PR. Na de fix realiseerde ik me dat het netter was om dit in de andere branch te doen. (Deze functie is overigens een placeholder en moet nog worden vervangen.)

Comment thread processing/gpkg/gpkg.go
handle *gpkg.Handle
}
// Custom wrapper for gpkg.Handle. To be embedded in other structs
type geopackageHandle struct{ handle *gpkg.Handle }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Waarom hernoem je dit?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Dit is voor code deduplicatie en om de "snap" en "mvt" commando's beter te scheiden qua afhankelijkheden.

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