Repository navigation
feat(forestry-source): MultiPolygon, ring ≥ 4 positions and Point ⇒ Area ≤ 4 ha in v1.1.0 - #344
Closed
stiebitzhofer wants to merge 5 commits into
Closed
stiebitzhofer wants to merge 5 commits into
stiebitzhofer wants to merge 5 commits into
Conversation
…rea ≤ 4 ha in v1.1.0 (#336, #327) Apply the EUDR Information System geometry rules to ForestrySource v1.1.0 in place: add a MultiPolygon definition (feature geometry and GeometryCollection member), require at least 4 positions per linear ring, and require properties.Area between 0.0001 and 4 ha on a Feature whose geometry is a Point. ProducerCountry stays optional for backwards compatibility. Extract the geometry definitions to test/shared/forestry-geometry-block.json and assert the schema matches it, so the EU-minimum families can share the block. Add jest and networknt boundary tests. Adjust five fixtures whose Point features TRACES would reject: small plots get an Area within the limit (DMP_01/09, PDFs regenerated), 29.3 ha Points become closed Polygons (DMP_02/03), the 450 ha Point becomes the MultiPolygon case (DMP_08) and DMP_06 gains a MultiPolygon inside a GeometryCollection; those four render text-identical PDFs, baselines unchanged. Resolves #336. Resolves #327. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
9 tasks done
3 tasks
…ry until 1.2.2 clears the release-age window The weekly Grype DB of 2026-10-06 flags two packages in ui/package-lock.json on every branch, main included: - postcss-selector-parser 6.1.4 (GHSA-rj75-hqrm-r3gf, Medium): quadratic selector parsing. Pinned to 7.1.6 via npm overrides; tailwindcss 3.4.3 and postcss-nested asked for ^6 but build identically against 7.1.6 — the Angular build output is byte-identical before and after. - source-map-js 1.2.1 (GHSA-68fv-2mgg-jv7q, High): event-loop DoS on untrusted source maps. The fix, 1.2.2, was published 2026-09-30 and the repo's .npmrc (min-release-age=7) quarantines it until 2026-10-07. Reached only through postcss/sass inside the Angular CLI build, never deployed; accepted in .grype.yaml until the window clears, bump tracked in #348. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ForestrySource v1.1.0 gets the EUDR Information System geometry rules in place:
MultiPolygonsupport, linear rings of at least 4 positions, and aPointfeature must carryproperties.Areabetween 0.0001 and 4 ha (TRACES accepts a Point only for plots up to 4 ha).ProducerCountrystays optional in v1.1.0 for backwards compatibility; the platform UI enforces it and the EU-minimum families (#335) will require it in the schema.The eight geometry definitions are extracted to
test/shared/forestry-geometry-block.jsonand the spec asserts the schema matches that canonical block, so ForestrySourceEU / ForestryOutputEU can share it byte-for-byte.Related Issues
Type of Change
MultiPolygonArea≤ 4 ha (maintainer decision 2026-09-30 / 2026-10-03, in place)Changes
schemas/ForestrySource/v1.1.0/schema.json: newMultiPolygondefinition (additionalProperties: false), accepted inFeature.geometryandGeometryCollection.geometries;PolygonCoordinatesinner ringminItems3 → 4 with a description stating the closure requirement the schema cannot enforce;Featuregets anif/thenrequiringproperties.Area(0.0001–4) whengeometry.typeisPoint;Areadescription updated.schemas/ForestrySource/v1.1.0/README.md: new "Geometry (harvest units)" section with the normative references and theProducerCountrydecision.test/shared/forestry-geometry-block.json: canonical geometry block;test/forestry-source-v1.1.spec.jsasserts identity and adds the valid/invalid cases (MultiPolygon as feature and as collection member, empty MultiPolygon, 3-position rings, Point with Area 0.0001 / 3.5 / 4, Point without Area, Point with Area 0 / 4.0001 / 29.3, Polygon without Area,ProducerCountryabsent).src/test/java/.../ForestrySourceV110SchemaTest.java: the same boundaries under networknt (draft 2019-09if/then).Area, three with Points of 29.3–450 ha). DMP_01/09 get anAreawithin the limit (their PDFs regenerated: the harvest-units table now shows the area); DMP_02/03's 29.3 ha Points become closed Polygons; DMP_08's 450 ha Point becomes theMultiPolygoncase; DMP_06 gains aMultiPolygonmember inside aGeometryCollection. The latter four render text-identical PDFs, so their baselines are unchanged.Testing
Manual Testing Performed
Testing steps:
npx jest test/forestry-source-v1.1.spec.js test/validate.spec.js— 678 passed.mvn -o test -Dtest=ForestrySourceV110SchemaTest— 7 passed;mvn -o test -Dtest=RenderTest— 149 passed against the baselines.json2pdf.js --include-remote-attachmentsand comparedpdftotextoutput with the committed PDFs: identical. Regenerated DMP_01/09 the same way.Tested environments:
👤 Manual Review Required
Author Self-Review
Coordinatesshape, no new free textProduction Deployment Impact
Breaking Changes
Breaking change details:
Pointfeature lackingproperties.Areaor withArea> 4 ha, or with a linear ring of 3 positions, no longer validates.Area≤ 4 ha; describe larger plots asPolygon/MultiPolygon; close rings with ≥ 4 positions.ProducerCountrydeliberately stays optional.Rollback Plan
Additional Context
Review Focus
if/thenonFeature: AJV strict mode needstype: objectand therequiredmembers declared in the same subschema; both validators agree on the boundary cases in the tests.lib/validatorshould check it (deferred from fep: ForestrySource v1.1.0 — accept MultiPolygon geometry and require ≥ 4 positions per polygon ring #327).🤖 Generated with Claude Code