Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions farm_field_overlays/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

============================
Farm Field — Public Overlays
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a76ed9cebaf8eebcba13f4a3133301299225ea185f73b4d2e742fba77b8d9594
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-ledoent%2Ffarm--pack-lightgray.png?logo=github
:target: https://github.com/ledoent/farm-pack/tree/19.0/farm_field_overlays
:alt: ledoent/farm-pack

|badge1| |badge2| |badge3|

Adds three public-domain US-government overlay layers to the farm field
map:

- **OpenStreetMap** — basemap; roads, parcels, buildings (default
visible)
- **USDA Cropland (CDL)** — current-year crop-classification raster
covering the lower 48; overlays the historical crop on a farmer's
parcels so you can see what was planted in previous years from
satellite-derived classification (50%-opacity by default)
- **NRCS SSURGO Soil** — soil mapunit polygons; click-through gives soil
type, drainage class, productivity (40%-opacity by default)

All three are read-only: no API keys, no per-request quota, no
proprietary data. Layers are stored as ``geoengine.raster.layer``
records bound to the field map view, so an admin can disable, reorder,
or edit the WMS endpoints via Settings → Technical → Geoengine → Raster
Layers without touching code.

**Scope.** Read-only display only. Click-to-query (e.g. "what soil type
is under this point?") needs a ``farm_field_query`` follow-up module
that wires up GetFeatureInfo round-trips. USGS NHD (hydrography) and
Topo are deferred to a follow-up to keep this PR tight.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

Usage
=====

1. Open Farm → Fields → Fields and switch to the **Map** view.
2. The layer toggle (top-right of the map) lists OpenStreetMap, USDA
Cropland, and NRCS Soil. Toggle each on/off independently.
3. To customize a layer (URL, opacity, ordering): Settings → Technical →
Geoengine → Raster Layers — pick the layer, edit, save.

**Annual update — USDA CDL.** The Cropland Data Layer is published per
crop year and the WMS layer name carries the year (e.g. ``cdl_2024``).
USDA typically publishes the new year's raster in Feb/Mar of the
following calendar year. Each January or February, update the LAYERS
param on the "USDA Cropland" raster layer record:

1. Settings → Technical → Geoengine → Raster Layers → "USDA Cropland
(CDL …)"
2. Edit Params WMS, change ``cdl_YYYY`` to the new year
3. Update the layer's display name to match
4. Save and reload the map view

To add another WMS overlay (e.g. USGS NHD hydrography for streams +
ponds):

1. Settings → Technical → Geoengine → Raster Layers → New
2. Raster layer type: **Distant WMS**
3. URL: the WMS endpoint
4. Params WMS:
``{"LAYERS": "<layer-name>", "FORMAT": "image/png", "TRANSPARENT": "TRUE"}``
5. Bind to view: **farm.field.geoengine**
6. Save; reload the map view.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/ledoent/farm-pack/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/ledoent/farm-pack/issues/new?body=module:%20farm_field_overlays%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Ledo Enterprises

Contributors
------------

- Daniel Kendall <dkendall@ledoweb.com>

Maintainers
-----------

.. |maintainer-dnplkndll| image:: https://github.com/dnplkndll.png?size=40px
:target: https://github.com/dnplkndll
:alt: dnplkndll

Current maintainer:

|maintainer-dnplkndll|

This module is part of the `ledoent/farm-pack <https://github.com/ledoent/farm-pack/tree/19.0/farm_field_overlays>`_ project on GitHub.

You are welcome to contribute.
Empty file added farm_field_overlays/__init__.py
Empty file.
21 changes: 21 additions & 0 deletions farm_field_overlays/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Farm Field — Public Overlays",
"version": "19.0.1.0.0",
"summary": "USDA Cropland + NRCS Soil overlays on the field map",
"author": "Ledo Enterprises, Odoo Community Association (OCA)",
"maintainers": ["dnplkndll"],
"website": "https://github.com/ledoent/farm-pack",
"license": "AGPL-3",
"category": "Vertical/Agriculture",
# Alpha matches farm_field_geo (and transitively farm_field); OCA's
# check-dev-status gate rejects higher → lower dev-status deps.
"development_status": "Alpha",
"depends": [
"farm_field_geo",
],
"data": [
"data/geoengine_raster_layers.xml",
],
"installable": True,
"application": False,
}
58 changes: 58 additions & 0 deletions farm_field_overlays/data/geoengine_raster_layers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Public-domain WMS overlays for the farm.field map view. All sources are
US government services (USDA, NRCS) and require no API key. URLs are
stored as plain field data so an admin can edit them via Settings →
Technical → Geoengine → Raster Layers without touching code.

`noupdate="1"`: module upgrades won't overwrite admin tweaks (URL changes,
opacity, sequence).

Note on stability: USDA and NRCS WMS endpoints occasionally move. CDL
layer names are year-specific (`cdl_YYYY`) — bump the LAYERS param in
the CDL record once a year as USDA publishes the new year's raster
(typically Feb/Mar of the following year).
-->
<odoo noupdate="1">
<record id="farm_field_overlay_cdl" model="geoengine.raster.layer">
<field name="name">USDA Cropland (CDL 2024)</field>
<field name="raster_type">d_wms</field>
<field name="url">https://nassgeodata.gmu.edu/CropScape/wms</field>
<field
name="params_wms"
>{"LAYERS": "cdl_2024", "FORMAT": "image/png", "TRANSPARENT": "TRUE"}</field>
<field name="server_type">mapserver</field>
<field name="overlay" eval="True" />
<field name="opacity">0.5</field>
<field name="sequence">10</field>
<field name="view_id" ref="farm_field_geo.farm_field_view_geoengine" />
</record>

<record id="farm_field_overlay_ssurgo" model="geoengine.raster.layer">
<field name="name">NRCS Soil (SSURGO)</field>
<field name="raster_type">d_wms</field>
<field
name="url"
>https://sdmdataaccess.nrcs.usda.gov/Spatial/SDMWGS84Geographic.wms</field>
<field
name="params_wms"
>{"LAYERS": "MapunitPoly", "FORMAT": "image/png", "TRANSPARENT": "TRUE"}</field>
<field name="server_type">geoserver</field>
<field name="overlay" eval="True" />
<field name="opacity">0.4</field>
<field name="sequence">20</field>
<field name="view_id" ref="farm_field_geo.farm_field_view_geoengine" />
</record>

<!--
OpenStreetMap basemap so users see roads + parcel context behind
their fields. sequence=99 keeps it at the bottom of the stack.
-->
<record id="farm_field_overlay_osm" model="geoengine.raster.layer">
<field name="name">OpenStreetMap</field>
<field name="raster_type">osm</field>
<field name="overlay" eval="False" />
<field name="sequence">99</field>
<field name="view_id" ref="farm_field_geo.farm_field_view_geoengine" />
</record>
</odoo>
3 changes: 3 additions & 0 deletions farm_field_overlays/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions farm_field_overlays/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Daniel Kendall &lt;dkendall@ledoweb.com&gt;
19 changes: 19 additions & 0 deletions farm_field_overlays/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Adds three public-domain US-government overlay layers to the farm field map:

- **OpenStreetMap** — basemap; roads, parcels, buildings (default visible)
- **USDA Cropland (CDL)** — current-year crop-classification raster covering
the lower 48; overlays the historical crop on a farmer's parcels so you can
see what was planted in previous years from satellite-derived
classification (50%-opacity by default)
- **NRCS SSURGO Soil** — soil mapunit polygons; click-through gives soil
type, drainage class, productivity (40%-opacity by default)

All three are read-only: no API keys, no per-request quota, no proprietary
data. Layers are stored as `geoengine.raster.layer` records bound to the
field map view, so an admin can disable, reorder, or edit the WMS endpoints
via Settings → Technical → Geoengine → Raster Layers without touching code.

**Scope.** Read-only display only. Click-to-query (e.g. "what soil type is
under this point?") needs a `farm_field_query` follow-up module that wires
up GetFeatureInfo round-trips. USGS NHD (hydrography) and Topo are deferred
to a follow-up to keep this PR tight.
25 changes: 25 additions & 0 deletions farm_field_overlays/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
1. Open Farm → Fields → Fields and switch to the **Map** view.
2. The layer toggle (top-right of the map) lists OpenStreetMap, USDA Cropland,
and NRCS Soil. Toggle each on/off independently.
3. To customize a layer (URL, opacity, ordering): Settings → Technical →
Geoengine → Raster Layers — pick the layer, edit, save.

**Annual update — USDA CDL.** The Cropland Data Layer is published per
crop year and the WMS layer name carries the year (e.g. `cdl_2024`).
USDA typically publishes the new year's raster in Feb/Mar of the following
calendar year. Each January or February, update the LAYERS param on the
"USDA Cropland" raster layer record:

1. Settings → Technical → Geoengine → Raster Layers → "USDA Cropland (CDL …)"
2. Edit Params WMS, change `cdl_YYYY` to the new year
3. Update the layer's display name to match
4. Save and reload the map view

To add another WMS overlay (e.g. USGS NHD hydrography for streams + ponds):

1. Settings → Technical → Geoengine → Raster Layers → New
2. Raster layer type: **Distant WMS**
3. URL: the WMS endpoint
4. Params WMS: `{"LAYERS": "<layer-name>", "FORMAT": "image/png", "TRANSPARENT": "TRUE"}`
5. Bind to view: **farm.field.geoengine**
6. Save; reload the map view.
Empty file.
Loading
Loading