How ISO 19139 harvesting into CKAN works and when to use it
If your team runs or plans a CKAN catalog and must bring in records from geoportals or metadata catalogs that publish ISO 19139 XML, the supported route is the ckanext-spatial harvesters, scheduled through ckanext-harvest. Each external source becomes a harvest source, and each scheduled run turns the records it retrieves into CKAN datasets. This route fits when a source exposes its metadata at a stable endpoint, changes over time, and should appear in your portal without anyone re-keying records. Before you commit, list each source, its endpoint, how often it changes and who owns the records on the source side, because those answers decide how many harvest sources you run and how often each one runs.
The harvest reads each ISO 19139 record, maps fields such as the title, contacts, keywords and geographic extent onto CKAN dataset fields, and creates or updates the matching dataset on each run. It is a copy and mapping job, and it does not make the source records authoritative or correct their quality. A wrong title, a missing license or a coarse extent in the source reaches your portal unchanged, and it stays wrong until the source is fixed and harvested again or someone overrides the field locally. Assign an owner for that check, and confirm with a test harvest how your harvester treats local edits on the next run before your users depend on them.
The spatial extents carried in the records are what let harvested datasets appear in place-based searches. Once indexed, each dataset's extent takes part in CKAN's spatial search, so users can filter results by an area on the map. The query side is covered in the spatial search section, so focus here on the data you bring in. Because compatibility is set per extension, confirm the ckanext-spatial and ckanext-harvest versions against your CKAN release before the first harvest. CKAN 2.12.0 was released on August 26, 2026, so a team on an earlier release should check each extension's supported versions for that line and plan any upgrade before adding sources.
What a CKAN ISO 19139 harvest needs before configuration
Six prerequisites decide whether the first harvest produces a usable catalog. Platform versions, the CKAN line, the extensions, network reach, geoportal access and a source inventory depend on each other. A version mismatch or blocked endpoint can look like an empty source, so confirm each item with the extension documentation and the source owner before you write any harvest source configuration.
Platform versions and services
The install from source documentation sets the floor: Python 3.10 or newer, PostgreSQL 12 or newer, Solr 9 (recommended) or Solr 8, and Redis. Harvest jobs run as background workers, so the worker hosts need these versions as much as the web tier does. Check that each component sits within the range your CKAN line accepts, and record the exact Solr and Redis builds you plan to run, because index problems can appear only after a harvest has written records.
Install from source docsCKAN line and patch level
The current release is 2.12.0, published August 26, 2026, alongside maintenance releases 2.11.6 and 2.10.11. The tech team supports the latest patch of the current minor version and the previous minor version, and older patches lose support once a newer patch ships. Patch releases exclude schema changes and new features, but minor releases may include backwards-incompatible changes. Choose the line your extensions support, pin a patch level, and plan each new patch as a routine update.
Release policySpatial and harvest extensions
The ISO 19139 harvester comes from ckanext-spatial, and the job queue that runs harvests comes from ckanext-harvest. Each extension has its own version line, and both must be compatible with your CKAN line before installation. Confirm the supported pairings in each extension's documentation and release notes, then pin the exact versions in your deployment so an unplanned upgrade cannot change harvest behavior.
Outbound network and certificates
Harvest gathering runs from the CKAN worker hosts, so those hosts need outbound HTTPS access to every geoportal endpoint, including any CSW or record service the source publishes. Firewalls, egress proxies and TLS inspection can break a harvest in ways that look like an empty catalog. Test each endpoint from a worker host using the same proxy settings and CA bundle the harvest process uses, and ask each source owner which certificate chain they serve and when it renews.
Geoportal authentication requirements
Some geoportals restrict record access by account, token or source IP address. Confirm authentication with the source owner before scheduling the first run: ask whether the endpoint needs credentials, which account type applies, whether access is limited to specific addresses, and how long credentials stay valid. Store any secrets under your own secret management controls, not in harvest source descriptions that users can view, and confirm the method against the extension documentation.
Source inventory for each catalog
Write one inventory row per catalog before configuration: its base URL, the record count the source reports, and the ISO 19139 profile variant its records follow. The record count gives you an expected total to compare against each run, so a sudden drop signals a gathering fault or a source change worth investigating. The profile variant decides which field mapping you test first, so ask each owner which profile and version they publish, and sample records from every catalog.
Choosing which geoportal sources to harvest and how to scope them
Settle the source list before you touch any harvester configuration. Each geoportal is a separate upstream owner with its own publishing habits, so the number of sources should match what your team can monitor and answer for. Start with the catalogs your users actually search, and record for each one the owner, the license and access terms that govern reuse of its metadata, and whether the endpoint requires credentials. Share one harvest source only when several catalogs have the same owner, terms and scope rules. Otherwise, give each catalog its own harvest source, so that a failed run, a license change or a removed endpoint affects one line of your register instead of a mixed batch. Confirm in the installed ckanext-spatial and ckanext-harvest documentation whether a single harvest source can hold several endpoints and how each one is tracked.
Duplicate records are the most common source of confusion when several catalogs describe the same dataset. Two geoportals may hold the same ISO 19139 record under different file identifiers, or a national catalog may republish a regional record with a new identifier. Decide in advance which catalog is authoritative for each theme or area, and filter the others out at harvest time so that duplicates never reach CKAN. Scope can be set by organization, theme keyword, bounding area or record type, for example by harvesting only dataset records and leaving out service records (an illustrative choice). Bounding area filters depend on the extent elements in each record, so test them with a sample that includes records with missing or malformed extents before you rely on them.
When a source owner changes a record's identifier, the harvester may treat the new record as a new dataset and leave the old one orphaned in CKAN. Agree on a rule before go-live: who approves identifier changes, whether the old dataset is kept as withdrawn, and how orphans are found after each run. Then confirm in the installed ckanext-spatial documentation how harvested records are matched to existing datasets on update, including which identifier is used, whether records removed upstream are deleted or flagged in CKAN, and how a run behaves when the endpoint returns an error. Test each answer on a copy of one catalog, with a deliberately changed identifier and a removed record, before you enable the schedule.
Configuring a harvest source and scheduling it in ckanext-harvest
This sequence takes an ISO 19139 source from a configured harvest source to a scheduled, monitored job in your CKAN portal. Each step ends with a check you can run, so a problem surfaces at the smallest possible scale before the full catalog is imported. Exact configuration keys and commands are in the ckanext-spatial and ckanext-harvest documentation for your versions.
Enable the spatial and harvest plugins
Install ckanext-spatial and ckanext-harvest into the same Python environment as CKAN, add both extensions to the plugins setting in the CKAN configuration file, and complete the database setup steps in the harvest extension documentation. Restart the web application and the background worker processes so both extensions load. Done means CKAN starts without plugin errors in its log and a sysadmin account can open the harvest source screens.
Create the harvest source record
As a sysadmin, create a harvest source with the URL the publisher gives you, choose the source type for ISO 19139 records provided by ckanext-spatial, and set the owning organization that will hold the harvested datasets. Confirm with the publisher whether the URL is a CSW service or a set of ISO documents, because that changes the source type and what the first run fetches. Done means the source page shows the correct URL, type and organization, with no jobs recorded yet.
Run a manual harvest on a small subset
Before the full catalog runs, start a manual harvest against a small subset, such as a test endpoint or a folder holding a handful of records that you have copied from the publisher. Check the extension documentation for how to limit a run, and confirm that method works in your version before you rely on it. Watch the job appear in the source's job list and wait for it to finish. Done means the job reports a finished status and the number of created datasets matches the records in your subset.
Review job results and sample datasets
Open the job report and read the per-record messages, paying attention to parse errors, skipped records and missing required fields. Then open several created datasets and compare each one with its source XML: title, identifier, responsible party, keywords, dates, and the spatial extent. Confirm each dataset sits in the owning organization and the right license is set. Done means the job log shows no parse errors for the subset and every sampled dataset matches its source record field by field.
Confirm spatial extents are indexed in Solr
Search the portal with a bounding box drawn around one harvested record, then repeat the search with a box well away from it. The first search should return the dataset and the second should not. If the dataset is missing from the first search, confirm its extent is stored on the dataset and that the Solr index was updated, then follow the index maintenance guidance in the spatial extension documentation before harvesting the full catalog. Done means the dataset appears for its own extent, stays out of the distant search, and its stored bounding box matches the source record.
Set the harvest frequency on the source
Edit the harvest source and choose a frequency that matches how often the publisher changes its records, using the schedule options described in the harvest extension documentation. Ask the publisher how often records are edited or removed, since a schedule that runs more often than the catalog changes only adds load. Save the source and leave the first scheduled run to the workers. Done means the saved source carries the frequency you chose, which you confirm by reopening it.
Keep background job processes running
Run the background job worker under a process supervisor, so it comes back after a restart and picks up scheduled harvests without anyone starting them by hand. Follow the worker command and log location in the CKAN and harvest documentation for your version. Done means a worker process stays running after a host restart, and the first scheduled run appears in the job list and finishes with no parse or connection errors in the log.
How ISO 19139 fields map to CKAN datasets
This table compares the main ISO 19139 elements in a geospatial record with the CKAN dataset or resource field that receives them. The third column shows whether the installed harvester is expected to map the element, or whether a custom mapping or schema extension is needed. Run each row against a sample of your own records, because profiles differ in contact roles, license statements and date types.
| ISO 19139 element | CKAN field | Default or extra work | Check before go-live |
|---|---|---|---|
| Title | Dataset title | Usually default; confirm in your installed version | Compare the dataset title with the source record title on a sample |
| Abstract | Dataset notes (description) | Usually default; confirm in your installed version | Check that the full abstract appears without truncation |
| Keywords | Tags, or groups for thesaurus keywords | Tags are typically default; thesaurus names often need custom mapping | Confirm keywords appear as tags and are searchable |
| Responsible party and contact roles | Maintainer, author and contact extras | Custom mapping; role codes vary by profile | Check each contact role lands in the field you intended |
| Temporal extent | Temporal start and end extra fields | Custom mapping or schema extension | Check start and end dates survive the import intact |
| Date types (creation, publication, revision) | metadata_created, metadata_modified or date extras | Custom mapping; you choose which date type fills each field | Confirm each date type maps to the field your policy specifies |
| Geographic bounding box | Spatial extent used by ckanext-spatial search | Expected by default; confirm the extent is indexed | Run a test spatial search over a known area and confirm a hit |
| Reference system | Extra field for the CRS or EPSG code | Schema extension; no standard dataset field assumed | Confirm the reference system code is stored and matches the source |
| Constraints and license statements | license_id, plus an extra for statement text | Custom mapping; statement wording often does not match CKAN license IDs | Check the license identifier and statement text in both places |
| Online resource links | Resources with URL, format and protocol | Resource creation expected by default; confirm protocol and format handling | Open each link and confirm protocol and format on the resource |
Securing harvest sources, credentials and imported records
Harvesting pulls content from servers and records you do not control, so each step from the source definition to the published dataset needs a control. The six cards cover credentials, source changes, untrusted content, network reach, visibility and patching. Every control depends on your deployment, so confirm each one in your own environment and security review before go-live.
Keep geoportal credentials out of config
Protected geoportals often need a username, password or token before they return ISO 19139 records. Keep these values out of ckan.ini and out of the source URL, and supply them to the workers at run time from environment variables or your secrets manager. Confirm where your ckanext-spatial version stores harvest source settings, because anyone who can read a source may be able to read what it holds, and confirm that job logs never echo a credential.
Restrict and log source changes
A harvest source decides which server the worker contacts and what it imports, so editing one changes your trust boundary. Limit create and edit rights on harvest sources to a small named group, and record the reason for each source next to its configuration. Review the job log for every run, and confirm that your CKAN version records who changed a source in the activity stream.
Treat imported records as untrusted text
Titles, abstracts, keywords and contact fields in an ISO 19139 record come from a third party, so they must be stored and displayed as plain text, never executable content. Check that templates escape these values, that no record content renders as HTML or runs as script, and that the XML parser does not resolve external entities. Test the parser with a crafted record from a sandbox source before you trust it with production feeds.
Limit outbound calls to approved hosts
Harvest workers fetch metadata over the network, so a mistyped source URL or an unexpected redirect can reach internal systems. Allow outbound connections from the workers only to the approved source hosts, and check that the rule also covers redirects and any proxy the workers use. Enforce this at the firewall or egress proxy in your environment, and do not assume CKAN enforces it for you.
Set visibility when datasets are created
Decide before the first run whether imported datasets appear publicly or stay private until reviewed. A harvested record that is wrong or sensitive becomes visible to everyone at creation if the default is public. Confirm which default your ckanext-spatial and ckanext-harvest versions apply, whether it can be set per source, and how a curator moves a record to public, then test one run in a staging portal.
Keep harvest workers on supported patches
CKAN supports the latest patch of its current minor version and the previous minor version, and an older patch loses support once a newer one is out. CKAN 2.12.0 and the maintenance releases 2.11.6 and 2.10.11 came out on the same day, so check which line your portal is on before you schedule a change. Patch the harvest workers together with the web application so both run the supported patch line and the same code.
CKAN release policyHow to verify a harvest before it goes live
Treat a harvest as ready only when a fixed test sequence shows that it creates the right datasets, updates them without duplicates, handles removed records as your team decided, and makes the results findable through spatial search. Start with a sample harvest against a known set of source records whose titles and extents you wrote down before the run. Draw those records from every source profile variant you plan to harvest, including records that use different ISO 19139 structures for the bounding box and the title. For each record, check that the CKAN dataset has the expected title and that its spatial extent matches the source. Mismatches here usually point to mapping rules in the harvester configuration, so fix them before going further.
Next, rerun the same harvest without changing the source and compare dataset counts before and after. An unchanged source should update existing datasets and create none, so any increase means identifiers are not matching and records are being duplicated. Then change or withdraw a small set of source records and confirm that updates arrive and that removals or withdrawals behave the way your team agreed, whether that means deletion, a private flag or an inactive state. Run one spatial search with a bounding box that should return a specific known dataset, and confirm that dataset appears. Finally, review the job log for errors, and confirm that every error belongs to a record you expected to fail.
Keep the test records, expected values, counts, search results and log extracts together as a dated package. This package is the acceptance evidence for the scope agreed in writing, so define the pass criteria before the first run rather than after you see the output. Agree with your team who signs off the results and what happens when a check fails, such as whether a failed record blocks go-live or is documented as a known exception. Repeat the full sequence after any change to the harvester configuration, the source profile or the CKAN version, because a change that looks minor can alter identifiers or extents. Confirm the exact steps and log locations with your own environment and your DeployOpen engagement lead.
Common harvest failures, causes and fixes
This table lists the failures teams commonly meet when harvesting ISO 19139 records into CKAN, with the likely cause and fix for each. Read each row from left to right, then run the named check before changing the harvest source or the CKAN configuration. Exact log messages vary by extension version, so confirm them against the ckanext-spatial and ckanext-harvest documentation for your release.
| Symptom | Likely cause | Fix and confirming check |
|---|---|---|
| Some records fail to parse during a harvest run | Source uses a different ISO 19139 profile or namespace than the harvester expects | Compare a failing record's namespaces with the harvester's mapping. Confirm the profile in the ckanext-spatial docs. |
| Duplicate datasets appear after a rerun | Source changed file identifiers, so the harvester no longer matches existing records | Ask the source owner to keep identifiers stable. Compare GUIDs in the harvest object list before deleting duplicates. |
| Datasets have missing or wrong spatial extents | Coordinates are swapped (latitude and longitude order) or the record lacks a reference system | Check the bounding box values against the map, and the CRS element in the record. Correct the source, then reharvest. |
| Harvest jobs stay queued and never finish | Background worker or scheduler is not running, so jobs are never picked up | Confirm the CKAN worker process is running and the harvest gather and fetch consumers are active, as named in the ckanext-harvest docs. |
| Fetches time out or fail with certificate errors | Source is slow, rate-limits requests, or uses a certificate the CKAN host does not trust | Test the source URL from the CKAN host with curl. Add the internal CA to the host trust store if needed. |
| Harvested datasets are public when they should be private | Source configuration or default settings set visibility to public | Check whether the source configuration sets a visibility or private option. Confirm it on a sample dataset after a test run. |
| Harvester errors or missing fields after a CKAN upgrade | Installed extension version does not match the new CKAN minor release, which can include incompatible changes | Check the extension's compatibility notes for your CKAN version before upgrading. Run the harvest on a staging copy first. |
Questions buyers ask before harvesting ISO 19139 into CKAN
What drives the cost of an ISO 19139 harvest project into CKAN?
The main drivers are the number of sources, how much each source's records vary from the standard profile, and how much custom mapping your CKAN schema needs. Each geoportal brings its own endpoint, authentication, paging behavior and quirks, so cost grows with the number of sources. Profile variation matters because one agency may use optional elements, multilingual fields or keyword thesauri differently from another. Custom mappings cover extra fields your schema requires, and each one needs a decision and a test. Testing and scope complete the picture: sample records from every source, a review of harvested results, and a clear boundary on what is out of scope. Most of the cost is people's time, including analyst, developer and reviewer hours. Ask for a quote that breaks the effort down by source.
How long does a geospatial metadata harvest project usually take?
Duration depends on the same drivers as cost: the number of sources, how far each source's records drift from the expected profile, how many custom mappings are needed, and how much testing and review the scope includes. A single well-documented source with a standard profile moves through setup and testing faster than several sources with inconsistent records and open mapping questions. Review time is often underestimated, because mapping decisions need an owner and geoportal owners need time to confirm which records are authoritative. Scheduling through ckanext-harvest is a separate step that follows once the sources are proven. Timing also depends on access: test records, credentials and a named reviewer must be available before work starts. We do not give a duration here because it depends on the written scope. Ask for milestones per source and a list of steps that wait on client decisions.
Can our internal team harvest ISO 19139 records into CKAN on its own?
Yes, if your team has CKAN operations experience and Python skills, an internal team can run the harvest work alone. Check that the extension documentation for your versions covers the harvester setup and the mapping options you need. The work still needs people who understand three things: the CKAN database and Solr index, how ISO 19139 records are structured, and what your organization treats as authoritative metadata. Skills gaps usually show up in mapping decisions, where a wrong choice can quietly publish incorrect extents or keywords. Internal teams often underestimate testing across several geoportals and the ongoing upkeep of schedules. A partner can take on the build while your team learns the setup, or can review your mappings. Decide which tasks your team owns before the project starts, and write that split into the scope.
What does our organization need to provide for a harvest project?
You will need to provide four things before work starts:
- A source inventory listing each geoportal or metadata catalog, its endpoint, its owner and the record types it publishes.
- Access to test records, including sample records from each source and any credentials the harvest needs.
- A named owner for each geoportal who can confirm what the records mean and tell us when a source changes.
- A named reviewer who makes mapping decisions, such as which ISO 19139 element feeds which CKAN field, and who signs off on results.
Without a reviewer, mapping questions stall. Missing geoportal owners slow testing, because nobody can confirm whether an unusual record is an error or intended. Ask the implementation partner to confirm in writing which of these items it expects from your side.
Which harvest costs are one-time and which recur after go-live?
Setup, mapping and testing are one-time costs. They cover configuring the harvest sources, building the mapping from ISO 19139 fields to CKAN datasets, writing and running test cases, and documenting the result. Recurring work begins after go-live:
- Schedule upkeep, including checking harvest jobs, reviewing errors and adjusting intervals.
- Extension upgrades, because ckanext-spatial and ckanext-harvest must match your CKAN version, and CKAN publishes about two minor releases a year according to its release policy.
- Source changes, such as a geoportal changing its endpoint, profile or keyword scheme, which requires mapping updates and retests.
Recurring work is the part teams most often forget to budget. Ask for these items to be priced separately from the build so you can see what they cost over time.
What should a written quote for a CKAN harvest include?
A written quote should follow a written scope, and that scope should be broken down by source so you can see the effort for each geoportal and decide which to start with. DeployOpen agrees scope, deliverables and timelines in writing before work starts, and quotes follow from that scope. Ask for:
- A source list with the profile variation expected for each source.
- Mapping deliverables: the ISO 19139 to CKAN field map, custom mapping specifications and the configuration for each harvester.
- Test evidence: the test cases, the sample records used and a summary of results per source.
- A retest after fixes, with a clear definition of what counts as a passed retest.
- Upkeep terms: which recurring items are included, and whether upgrades and source changes fall under a retainer.
How DeployOpen scopes and delivers a CKAN harvest integration
DeployOpen plans, implements, customizes, integrates, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own infrastructure. For harvesting ISO 19139 geospatial metadata into CKAN, that means the harvest sources, field mapping and schedule are agreed in writing before the build, then run in your cloud accounts, data centers or air-gapped networks.
How we scope
- The written scope lists each ISO 19139 metadata source, its endpoint and the access each one needs.
- Field mapping from ISO 19139 elements to CKAN dataset fields is agreed and documented before the build starts.
- Engagements are fixed-scope, so deliverables, timelines and acceptance tests are agreed in writing first.
How we build
- We install the ckanext-spatial harvesters and ckanext-harvest in your CKAN environment, using your change process.
- Harvest sources, mapping rules and schedules are configured, then tested against sample records from each source.
- Testing confirms harvested datasets show correct spatial extents, licenses and owning organizations in search.
How we hand over
- A written runbook covers each harvest source, its field mapping, schedule and known failure modes.
- Configuration is documented so your engineers can review, reproduce and change harvest settings later.
- Handover walks your platform and security teams through access, logs and how to rerun a failed harvest.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after go-live.
- Retainers can cover CKAN upgrades and checks that harvest mappings still work after extension changes.
- Before go-live, confirm who receives harvest failure alerts and who owns source changes after handover.

