XYZ BIMCollective · Portugal Research
PTEN
research · data · 25 October 2026

283 PDMs in force, those of the mainland and 5 in the Azores, in one model that can be read article by article

The regulation of a municipal master plan (PDM, plano diretor municipal) says what may be built in each part of a Portuguese municipality. That text lives in layers: the approved regulation and, on top of it, the notices that keep amending it, published one by one in the Diário da República, the official gazette. The meta-PDM joins the layers, without rewriting any of them, into one record per municipality that can be consulted and cited down to the article and, almost always, down to the point of a paragraph. This article describes how it was built, how it was checked and what still fails. The records are in the meta-PDM explorer. The regulations themselves are in Portuguese.

plans283regulations in force: the 278 on the mainland and 5 of the 19 municipalities of the Azores; Madeira is not included (explorer)
articles28,619each with a stable identifier (explorer)
consolidated796of the 930 articles amended by notice; 134 are not consolidated (explorer)
rules28,882extracted in 90 of the 283 plans, each with the literal quotation of the article (explorer)

in this article · in brief · the problem · other countries · how it is built · what each record holds · how it was checked · comparing rules · what fails · how to cite · how this was done

In brief

Why it is hard to know what a PDM says today

Anyone who wants to know what may be built in an area of scattered building in Oliveira de Frades finds the regulation republished in full in 2022, with the third amendment of the 2015 revision (Aviso n.º 16816/2022). That text is no longer the one in force: in 2024, Aviso n.º 15956/2024/2 amended articles 38 and 39 and, in article 39, transcribed everything with ellipses («[...]») except point g), which became «(Revogada.)», repealed. That was the point that allowed housing only on plots of at least 30,000 m2. The text in force is only obtained by joining the two publications, because neither shows it whole (Oliveira de Frades record).

Multiplied by 283 plans, this is work that every reader repeats on their own. In the meta-PDM records, the base text comes from the Diário da República in 272 plans (in 21 of them, readable only through optical character recognition, with the errors that brings) and from a municipal text in 11 (explorer). On top of that text, in each municipality, sit the later notices.

The meta-PDM is an attempt to do that assembly once, in a verifiable way, for the 283 plans in the record. It is neither a new PDM nor a model PDM: each regulation keeps the structure, numbering and words it has, and the meaning (which plan, which version, which article, which zone, which rule) is annotated on top. It is a digital representation for reference and research, and it does not replace the text published in the Diário da República.

What other countries have done

As we see it, there are two ways of making plans machine-readable. The first is prescriptive: the state fixes a model plan and the municipalities fill it in. In New South Wales, Australia, a 2006 order fixed the form and content of local plans; councils choose from 34 zones and cannot add new zones or create subzones (circular PS 06-008). In New Zealand, the 2019 national planning standards, updated in 2022, set the structure of district plans, a list of 31 zones and the definitions to use (National Planning Standards).

The second is descriptive: the plan stays as it is, and it is annotated. The Akoma Ntoso standard, from OASIS (the vocabulary, a standard of 29 August 2018, and the naming convention, of 21 February 2019), distinguishes the work (the law in the abstract), the expression (each version of the text), the manifestation (each format of the expression, such as PDF or XML) and the item (the actual file) (Akoma Ntoso vocabulary; naming convention). In the Netherlands, the STOP standard and the TPOD profiles set how the text of spatial planning documents is divided and annotated and how text is linked to locations (IPLO). In Germany, XPlanung allows a plan object to be linked to the text sections that govern it (the refTextInhalt relation), and the Bavarian guide recommends doing so; the same guide notes that an authenticated analogue copy of the plan is still mandatory (Bavarian XPlanung guide). In Finland, the Ryhti system will gather planning regulations in a machine-readable format, with municipalities and regional councils starting to provide data gradually, from the end of 2028 at the latest (Ryhti).

In Portugal, the technical standard approved by Aviso n.º 9282/2021, published on 17 May 2021, sets the data model for the information in the land-use plan map (planta de ordenamento) and the constraints map (planta de condicionantes) of the PDM (Diário da República). The notice does not deal with the text of the regulation. The meta-PDM takes the descriptive route and tries to be, on the side of the text, what that model is on the side of the maps: the meta-PDM zones use the designations of the land-use regime map (CRUS) of the Directorate-General for Territory (DGT), the same one that Consulta PDM shows on its map. We think the descriptive route is the only one that serves 283 plans already approved without reopening them; the prescriptive one can come later, as a proposal built on top of it.

How it is built

Each record comes out of a chain of seven steps, the same ones Consulta PDM uses to read each regulation; in the 193 plans still without rules, the rules step (the 5th) is still to be done. The steps that use language models are followed by a check done by a program that uses none.

  1. The chain of acts: every revision, amendment, correction, suspension or preventive measure published, with its date and a link to the Diário da República or to SNIT, the DGT's national territorial information system (chains of the PDMs).
  2. The text: the base document, stored with its fingerprint (sha256), and the text of each later notice.
  3. The articles: the text cut into titles, chapters, articles, paragraphs and points by a deterministic reader, repaired by hand or by a model only where it fails.
  4. The mapping: for each CRUS designation, the articles that set its regime and the general articles that also apply to it.
  5. The rules: two independent extractions, compared by a program; disagreements are decided in a third reading, which cannot introduce a value absent from the quotations, and every number in the regime articles must be tied to a rule or carry a written reason for being left out.
  6. The concepts: each municipal term linked to the definition in Decreto Regulamentar n.º 5/2019, where one exists, marked as equal or different.
  7. The projection: what the calculator shows, compared with the previous version before it is published.

Identity: work, expression and manifestation

Each plan receives identifiers in the Akoma Ntoso form. The work is the regulation approved by a revision or by the original publication; amendments create new expressions of the same work; the manifestation is the format of the text used, and the actual file, the item, is identified by its sha256. In Lousã, the work is /akn/pt/act/pdm/dico-0607/2013-07-09/aviso-8729-2013 and the text in force on 27 August 2026 is the expression .../por@2026-08-27 (Lousã record). Inside the text, an article 39 is art_39, its paragraph 2 is art_39__para_2 and point b) of that paragraph is art_39__para_2__point_b. The identifiers belong to XYZ BIM, are not official, and have this form so that they can be matched to an official identifier.

Consolidation

An amended article has two wordings, that of the base text and that of the notice, and consolidating means joining them into the text in force. There are four ways, in order of preference: through the notice's ellipses, where each «[...]» receives the matching part of the previous wording (473 articles); through the full wording the notice publishes (186); through a partial wording, where the parts not transcribed are kept (14); and, when no rule settles it, through a proposal made by a language model (123) (explorer).

Consolidations made by rule go, at every generation of the records, through a checker that only accepts them when every word comes from one of the two wordings, each in its order, all the new text of the notice is there, no ellipses are left and no part appears twice. The 123 proposed by a model went through the same checker when they were accepted; at each generation, only the fact that the two source wordings have not changed is confirmed, and they were read by sample. That is, the checker proves that nothing was invented and that nothing from the notice was forgotten. It does not prove that the part kept from the previous wording is the right one: that remains the judgement of whoever proposes it. Articles that fail are left not consolidated, and the explorer shows them with the previous wording, the notice as published and the reason.

Places

Each article also receives a place in the model: the part of the PDM it belongs to (general provisions, rural land, implementation of the plan), the type of article (identification, building regime) and the land category. The place comes, in order of confidence, from a human decision where there is one, from the zone mapping, from a reading of the content by a language model (only for articles with no place or a suspicious one), from the article's heading and from the chapter it sits in. It is an annotation, not a rewrite: it serves to set side by side the articles that do the same thing in different plans.

What each record holds

There is one file per municipality, generated with no manual step from the stages above, and one page per municipality in the explorer, with the same information and an anchor on every article and, in all but 622 articles whose structure the program cannot read, on every paragraph and point. The table summarises the fields.

fieldwhat it says
work, expression, manifestationwhich plan, which version of the text and which file (sha256 and origin: Diário da República, OCR copy or municipal text)
life cycleeach act of the plan, with type, date and effect on the text: approves the plan, amends the text, already in the base text, amends maps only, suspends, not yet incorporated or effect to be confirmed
unitsarticles and annexes, with identifier, number, heading, pages, text in force, previous wording, notice as published, consolidation status and place in the model
rulesparameter, operator, value, unit, scope (uses and operations), zone, the text unit cited and the literal quotation
zonesCRUS designation, class and category, hectares, DGT model code, regime articles and general articles
verificationthe result of checks GM1 to GM8, described below

An example: article 39 of Oliveira de Frades

In the Oliveira de Frades record, the base text is the 2022 republication, read from the Diário da República. Article 39, «Regime de edificabilidade», appears as amended by Aviso n.º 15956/2024/2, of 31 July 2024, and consolidated from the notice's ellipses: the parts marked «[...]» receive the 2022 wording and point g) becomes «(Revogada.)» (article 39 in the explorer). The article is one of the 3 that govern the CRUS zone of class «Solo Rústico» and category «Área de Edificação Dispersa» (rural land, area of scattered building), with 49.53 hectares and code 14 of the DGT model; 15 general articles also apply to the zone. The article yields 7 rules, none from the repealed point. One is the maximum building height, which point b) of paragraph 2 sets as the height prevailing locally, up to 2 storeys and 7.5 metres:

parameter: building height (sheet I-5 of Decreto Regulamentar n.º 5/2019) · operator: maximum · value: 7.5 · unit: metres · quoted from: paragraph 2, point b)

The rule cites point b) of paragraph 2, but the link stays at the article. That is what happens to the 7 rules of this article and to 28,463 of the 28,882 rules in the record (explorer), and it is one of the limits described below.

How it was checked

Each record carries eight checks, computed by the same program that generates it. Four fail a plan when they fail; the other four measure and do not fail. The results below are those of the records of 25 October 2026 (explorer).

checkwhat it testsresult
GM1 identityeach plan has a work and a dated expression, and each act has an effect277 of 283 plans; in the 6 that fail, the chain starts with an amendment or, in Moita, with a declaration of rectification, and the act that approved the plan is missing
GM2 identifiersunique identifiers and every article with an identifier283 of 283
GM3 segmentation (measure)articles whose paragraphs and points are stored as units of their own in the record418 of 28,619 articles
GM4 resolution (measure)how deep the rule finds the unit it citesarticle 28,463, paragraph 268, point 86, annex 65
GM5 places (measure)articles with a place in the model (coverage, not accuracy)28,524 of 28,619 (99.7%)
GM6 coherence (measure)the article's category is that of the zone the mapping links it to6,100 of 6,390 (95.5%)
GM7 parametersevery parameter used in the rules has a match in the concept table283 of 283; in the 193 plans without rules it passes with nothing to check
GM8 zonesevery CRUS designation has a DGT code or a declared status283 of 283

Accuracy of the places

Coverage says how many articles have a place, not how many have the right one. For that, a sample of 100 articles was drawn, stratified by the origin of the place (seed 20261018), and each was reviewed with the assigned place in view. 95 were right, 4 wrong and 1 was left in doubt. Without weighting the strata, that is 96.0% of the 99 decided (95% confidence interval from 90.1% to 98.4%, Wilson interval). But the sample has fixed quotas per stratum, and the strata do not weigh the same in the records: weighted by the size of each stratum, the estimated accuracy is 94.8% (records).

These figures come with three caveats. The review was done by a language model, the same one that classified part of the articles by content and helped tune the classification rules; there was no independent human review. The rules were corrected by looking at the errors of earlier samples and at the doubts of this one: the taxonomy decisions of 18 October 2026 came from those doubts, and after them the same sample was measured again, going from 92 right, 4 wrong and 4 in doubt to 95, 4 and 1. It is therefore not an independent measurement. And it was made before the latest regeneration of the records, on 25 October 2026 (records).

Checking the consolidation

The consolidation checker runs at every generation over the consolidations made by rule: one that fails is left not consolidated, with the reason. The 123 proposed by a model were checked when they were accepted, and at each generation only the fact that the source wordings have not changed is confirmed. In the records of 25 October 2026, 134 of 930 amended articles are left not consolidated (explorer). The part kept from the previous wording, as said above, is not checked by a program.

Comparing rules with evidence: a first step

Having the rules of 90 plans in one format is not enough to compare them. An index of 0.4 over the plot area and an index of 0.4 over the area of a category inside the plot are not the same number, and two «maximum heights» may measure different things. To compare, the meaning has to be modelled: what the rule regulates, where and when it applies, with what exceptions, and which passage of the regulation supports it.

The comparison pilot is a first step in that direction, small on purpose: 30 rules from Alcanena, Lousã and Penafiel, chosen because their meanings differ and not as a sample, in a model with eight entity types (plan, expression, unit, rule, concept, scope, evidence and act), with 131 entities and 170 relations. Ten questions, with the expected answers recorded before the program that answers was written, test whether the model tells apart what it should: whether the two articles 65-A of Penafiel are the same unit (they are not), whether Alcanena's maximum height and Lousã's façade height measure the same thing (this cannot be determined from the existing text), or what a parking requirement was on a past date (it refuses, because that version of the text is not modelled). Each answer is determined, conditional or not determinable, and none grants a right to build.

The 10 answers came out as expected: 6 development questions and 4 held-out ones, the latter run only after the program had been recorded (pilot). But the evaluation was done by a language model, the same one that prepared the references and checked the sources; the held-out set was not blind, and 4 cases had to be corrected during the check. The pilot does not measure the quality of the 283 plans. It shows that the comparison can be made with evidence, on a small case, and where it has to refuse.

This is the direction in which the meta-PDM should grow: from a common format towards a vocabulary of meanings (concepts, scopes, conditions, exceptions, validity in time), extended only when a concrete question asks for it and a new sample, reviewed by someone who did not write the rules, measures it.

What still fails

  1. Of the 930 articles amended by notice, 134 are not consolidated; the reasons recorded include tables with ellipses, transcriptions with page remnants and repeated parts (explorer).
  2. Six plans fail the identity check because their chain starts with an act later than the approval, an amendment or, in Moita, a declaration of rectification: Alcoutim, Fronteira, Moita, Odemira, Vagos and Vila Real de Santo António (chains).
  3. Only 90 of the 283 plans have extracted rules; in the other 193, extraction was still to be done as of 25 October 2026, and the parameter check (GM7) passes in them with nothing to check (explorer).
  4. As of 25 October 2026, in the chains of the 283 plans, 137 acts have an effect still to be confirmed and 217 are not yet incorporated (they touch articles whose new wording is not in the record); in those plans, the date of the text in force does not move past them (chains).
  5. Of the 28,882 rules, 28,463 point only to the article; only 418 articles have their paragraphs and points stored as units of their own in the record, and in 622 the explorer shows the text as paragraphs, without anchors for paragraphs and points (explorer).
  6. In 21 plans, the base text exists only through optical character recognition; in all of them, tables are the most fragile part of the reading (explorer).
  7. Of the 6,118 zones, 5,143 have a category and a DGT code; the others are marked as transitional (474), not assigned (203), without category (166), in discrepancy (97) or to be mapped by hand (35). And 181 zones have no regime article at all in the record (explorer).
  8. The accuracy of the places and the pilot were reviewed by language models, not by people independent of whoever wrote the rules.
  9. Left out: easements and public-interest restrictions (such as the agricultural and ecological reserves), urbanisation and detailed plans, and the maps as images.
  10. The meta-PDM is a representation for reference and research. For any decision, what counts is the text published in the Diário da República, to which every article points.

How to cite

The article: Portela, A. (2026). Meta-PDM: 283 PDM regulations in one model. XYZ BIM, version of 25 October 2026. https://xyzbim.eu/en/research/meta-pdm/ (Portuguese original: https://xyzbim.eu/pesquisa/meta-pdm)

A record: Meta-PDM, record of <municipality>, expression of <date>, article <number>. XYZ BIM. https://pdm.xyzbim.eu/meta/<municipality>#<identifier>. For example, https://pdm.xyzbim.eu/meta/oliveira-de-frades#art_39__para_2__point_b.

How this was done

This article is by XYZ BIM and was written by Afonso Portela; this English version translates the Portuguese one. Every figure comes from a program that counts it in the 283 records generated on 25 October 2026, in the measurement of the places sample and in the pilot results; none was typed by hand. The external sources were consulted on 25 October 2026. What was not checked, or was checked only by a model:

Corrections

No corrections as of 25 October 2026. If you find an error, write to [email protected].