Import boundaries with land assets

Created on 16 October 2023, about 1 year ago

Problem/Motivation

Currently we can import JD Fields -> land assets, but it does not include the boundary. We need to import the boundaries as well.

JD allows fields to have 0 -> many boundaries associated with them. If there are multiple boundaries, usually only one is marked as "active". To start lets only sync active boundaries in with the land asset.

Steps to reproduce

N/A

Proposed resolution

Import active boundaries with fields/land assets.

Remaining tasks

Implement

User interface changes

None

API changes

None

Data model changes

None

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States paul121 Spokane, WA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @paul121
  • πŸ‡ΊπŸ‡ΈUnited States paul121 Spokane, WA

    Specific note on boundaries: https://developer.deere.com/dev-docs/boundaries

    It will contain one or more exterior rings, and it may contain interior rings. If there are interiors, they represent parts of the field that should not be worked - waterways, ditches, or other obstacles.

    I'm trying my best to import these accurately. In GeoJSON a Polygon can be an array of coordinate arrays where the first item represents the exterior ring, and all others being interior. I think this works similarly in WKT but am not sure. The JD format is neither GeoJSON or WKT so it needs to be mapped.

    I've done some testing, drawing complex fields in JD and the resulting data comes back with both the interior/exterior rings. The only issue I'm having is if there are multiple exterior rings, there is no easy way to say which one the interior ring is apart of. I'll leave a note of this in the code but think it is OK for now. We don't use the concept of geometry "holes" in farmOS anyways (I don't think the map lets you draw these), but I do see it being important that this fidelity not be lost when import/exporting geometries in farmOS.

  • πŸ‡ΊπŸ‡ΈUnited States paul121 Spokane, WA

    Example of this working:

  • πŸ‡ΊπŸ‡ΈUnited States paul121 Spokane, WA

    The solution for this requires making another request(s) for each field that we are importing. Having the import process happen via Events & batch operations makes this complexity a lot more resilient. Just implemented via πŸ“Œ Use event subscribers for importing/updating JD data Fixed

  • @paul121 opened merge request.
  • Status changed to Fixed about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States paul121 Spokane, WA
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024