Commit b626b39
authored
MiraMonVector: Repeated field names/description improvements (#14517)
In a MiraMon vector layer, some fields are mandatory. For example, ID_GRAFIC is required for all layer types (points, arcs, and polygons), while other mandatory fields may exist depending on the specific layer type.
A problem appeared when translating a MiraMon layer into another MiraMon layer, for example using ogr2ogr with an SQL query to select a subset of features. In these cases, if a field from the source layer had the same name as one of the mandatory fields, the source field was correctly renamed (for example, ID_GRAFIC became ID_GRAFIC2). However, when writing the metadata file (.rel) for the output layer, the renamed field information was lost and ID_GRAFIC was written twice.
This issue has now been fixed with a simple rule:
When a field name conflicts with one of the mandatory MiraMon fields, both the original field name and the renamed field name are preserved internally.
The renamed field name is then correctly used when writing the metadata.
Additionally, the field description is updated by appending " (previous)" to indicate its origin.
This problem was discovered during MiraMon-to-MiraMon translations. From now on, these translations will correctly preserve field names and metadata consistency.1 parent 609c185 commit b626b39
3 files changed
Lines changed: 133 additions & 9 deletions
File tree
- autotest/ogr
- frmts/miramon_common
- ogr/ogrsf_frmts/miramon
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1566 | 1566 | | |
1567 | 1567 | | |
1568 | 1568 | | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
358 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
359 | 367 | | |
360 | 368 | | |
361 | 369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5615 | 5615 | | |
5616 | 5616 | | |
5617 | 5617 | | |
5618 | | - | |
5619 | | - | |
5620 | | - | |
| 5618 | + | |
| 5619 | + | |
| 5620 | + | |
| 5621 | + | |
| 5622 | + | |
| 5623 | + | |
| 5624 | + | |
| 5625 | + | |
| 5626 | + | |
| 5627 | + | |
5621 | 5628 | | |
5622 | 5629 | | |
5623 | 5630 | | |
5624 | 5631 | | |
5625 | 5632 | | |
5626 | 5633 | | |
5627 | | - | |
5628 | | - | |
5629 | | - | |
5630 | | - | |
5631 | | - | |
5632 | | - | |
| 5634 | + | |
| 5635 | + | |
| 5636 | + | |
| 5637 | + | |
| 5638 | + | |
| 5639 | + | |
| 5640 | + | |
| 5641 | + | |
| 5642 | + | |
| 5643 | + | |
| 5644 | + | |
| 5645 | + | |
| 5646 | + | |
| 5647 | + | |
| 5648 | + | |
| 5649 | + | |
| 5650 | + | |
| 5651 | + | |
| 5652 | + | |
| 5653 | + | |
| 5654 | + | |
| 5655 | + | |
| 5656 | + | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
| 5660 | + | |
| 5661 | + | |
5633 | 5662 | | |
5634 | 5663 | | |
5635 | 5664 | | |
| |||
6068 | 6097 | | |
6069 | 6098 | | |
6070 | 6099 | | |
| 6100 | + | |
| 6101 | + | |
| 6102 | + | |
| 6103 | + | |
| 6104 | + | |
| 6105 | + | |
| 6106 | + | |
| 6107 | + | |
| 6108 | + | |
| 6109 | + | |
| 6110 | + | |
| 6111 | + | |
| 6112 | + | |
| 6113 | + | |
| 6114 | + | |
| 6115 | + | |
| 6116 | + | |
| 6117 | + | |
| 6118 | + | |
| 6119 | + | |
| 6120 | + | |
| 6121 | + | |
| 6122 | + | |
| 6123 | + | |
| 6124 | + | |
| 6125 | + | |
| 6126 | + | |
| 6127 | + | |
| 6128 | + | |
| 6129 | + | |
| 6130 | + | |
| 6131 | + | |
| 6132 | + | |
| 6133 | + | |
| 6134 | + | |
| 6135 | + | |
| 6136 | + | |
| 6137 | + | |
| 6138 | + | |
| 6139 | + | |
| 6140 | + | |
| 6141 | + | |
| 6142 | + | |
| 6143 | + | |
6071 | 6144 | | |
6072 | 6145 | | |
6073 | 6146 | | |
| |||
0 commit comments