Commit 00bc9544 authored by Jean-Charles BRAUN's avatar Jean-Charles BRAUN

Re-arrange data order, include new field

parent d8405e3e
......@@ -69,7 +69,7 @@ for element in list_files:
# Traitement du fichier contenant les XDATA (pas de texte ici)
for field in ['layer', 'subclasses', 'linetype', 'entityhand', 'text']:
document.delete_fields(field)
document.add_fields('UE C(50); TYPE C(20); OP C(12); DATE C(8); COMMUNE C(45); INSEE C(5)')
document.add_fields('UE C(50); TYPE C(20); Z C(10); DATE C(10); COMMUNE C(40); OP C(10)')
# Préparation des nouvelles données
table = []
......
......@@ -28,10 +28,10 @@ Dans un logiciel de type CAD, les XDATA ne sont pas directement visibles à l'é
* Code 1002, Starting or ending brace: {
* Code 1000, ASCII string: 28
* Code 1000, ASCII string: Structure
* Code 1000, ASCII string: 094268
* Code 1000, ASCII string: 258.13
* Code 1000, ASCII string: 20160222
* Code 1000, ASCII string: Saulx
* Code 1000, ASCII string: 70478
* Code 1000, ASCII string: 094268
* Code 1002, Starting or ending brace: }
```
......@@ -60,25 +60,25 @@ Le script `dbfconvert.py` crée une copie des fichiers CPG, DBF, PRJ, QPJ, SHP e
Exemple de contenu d'un fichier DBF avec *Extended Entity Data* :
| Layer | SubClasses | ExtendedEn | Linetype | EntityHand | Text |
|--------------|---------------------------|------------------------------------------------|----------|------------|------|
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 13 Structure 094268 20160222 Saulx 70478 }` | | 25E | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 14 Structure 094268 20160222 Saulx 70478 }` | | 269 | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 16 Structure 094268 20160222 Saulx 70478 }` | | 27F | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 21 Structure 094268 20160222 Saulx 70478 }` | | 2EA | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 22 Structure 094268 20160222 Saulx 70478 }` | | 2FB | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 28 Structure 094268 20160222 Saulx 70478 }` | | 33E | |
| Layer | SubClasses | ExtendedEn | Linetype | EntityHand | Text |
|--------------|---------------------------|-------------------------------------------------|----------|------------|------|
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 13 Structure 260.89 20160222 Saulx 094268 }` | | 25E | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 14 Structure 260.73 20160222 Saulx 094268 }` | | 269 | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 16 Structure 260.62 20160222 Saulx 094268 }` | | 27F | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 21 Structure 260.60 20160222 Saulx 094268 }` | | 2EA | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 22 Structure 260.45 20160222 Saulx 094268 }` | | 2FB | |
| 2-Structures | AcDbEntity:AcDb2dPolyline | `{ 28 Structure 258.13 20160222 Saulx 094268 }` | | 33E | |
Après traitement, seule la colonne **ExtendedEn** est conservée et les informations sont séparées :
| UE | TYPE | OP | DATE | COMMUNE | INSEE |
|----|-----------|--------|----------|---------|-------|
| 13 | Structure | 094268 | 20160222 | Saulx | 70478 |
| 14 | Structure | 094268 | 20160222 | Saulx | 70478 |
| 16 | Structure | 094268 | 20160222 | Saulx | 70478 |
| 21 | Structure | 094268 | 20160222 | Saulx | 70478 |
| 22 | Structure | 094268 | 20160222 | Saulx | 70478 |
| 28 | Structure | 094268 | 20160222 | Saulx | 70478 |
| UE | TYPE | Z | DATE | COMMUNE | OP |
|----|-----------|--------|----------|---------|--------|
| 13 | Structure | 260.89 | 20160222 | Saulx | 094268 |
| 14 | Structure | 260.73 | 20160222 | Saulx | 094268 |
| 16 | Structure | 260.62 | 20160222 | Saulx | 094268 |
| 21 | Structure | 260.60 | 20160222 | Saulx | 094268 |
| 22 | Structure | 260.45 | 20160222 | Saulx | 094268 |
| 28 | Structure | 258.13 | 20160222 | Saulx | 094268 |
Le fichier DBF est prêt !
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment