Xcity is data transfer format used by Trimble Locus software (previously Tekla Xcity). Format has two separate files. XCI-file contains geometry and some attributes. XCA-file contains additional attributes in database-style format.
GIS-attribute type definitions needed for writing.
Marks closed breaklines as areas.
Calculates area point for closed breaklines. The calculated point is always inside the area.
Control file for code and attribute conversion.
Tables are handled following way:
points: 100 <= table < 200 and 400,683 (excluding texts, below)
lines: 200 <= table < 400 and 410,682
texts: 500 <= table < 680 and 104,105,106,108,111,112,113,115,116,117,118
If the table is not recognized, warning is written to log file when reading. Writing write unrecognized codes to defalt tables: points 102, lines 202, texts 105.
Attribute and code handling is defined in Control file.
In the code file you must define codes and attributes.
Example of code file:
Code file (Code_43.dat):
[t3] Feature code 430 Well 100,19,-1.00,0.20,64 1,19,0.00,0.00,64 1,19,0.00,0.00,64 0,-1.00,0.00,0.00 0 ATTR DIA,Diameter,*<0.00<9.00< DEP,Depth,*<0.00<9.00< MAT,Material,1=Steel,2=Concrete,3=Plastic 439 Pipe 999,19,-1.00,0.00,8256 1,19,0.00,0.30,8256,DIA,1.000 1,19,0.00,0.00,8256 0,-1.00,0.00,0.00 0 ATTR DIA,Diameter,*<0.00<9.00< WID,Width,*<0.00<9.00< HGT,Height,*<0.00<9.00< PRO,Protection area,*<0.00<10.00< MAT, Material,1=Steel,2=Concrete,3=Plastic
In format settigns you must define this code file, if indexed attributes are used.
Control file is an Ascii-file to define codes in both system and possible attributes. First column is a 8 character code in 3D-Win, next Xcity table and code and attributes in free format. N.B. Attribute can be given as fixed value ("abc").
Control file: XCITY.DAT
! Xcity control file 430 102 10430 $DIA $HGT "abc" $MAT 439 207 10439 $DIA $PRO "0.100" $MAT 449 207 10449 $WID $HGT "0.100"
If the code is not found in control file, code field T3 is left empty or T3-field default value. If default value is asterisk (*), the original code of Xcityn file is copied into T3-field.
Lines in table 207 can have line number. This is working is reading and writing.
An interpolation-parameter for break lines to define 0=break line (default) or 1=spline. This will be given as the 9. paramaeter in control file. Use empty fields if the preceeding attributes are missing.
141 205 722641 "" "" "" "" "" 1 150 207 722650 $HALK $MAT $DATE "" $Z2 0
Kaivon pohjan korkeus voidaan hakea annetusta ominaisuustiedosta. Ominaisuuden nimi annetaan ohjaintiedoston rivin kahdeksantena parametrina. Tämä toimii vain tauluun 110 menevillä pisteillä. Alla olevassa esimerkissä kaivon pohjan korkeus haetaan ominaisuudesta $POHJA. 3D:ssä samaan ominaisuuteen voi liittyä muutakin tietoa, mutta siitä käytetään vain alun numeerinen osuus (POHJA==21.418 150PVC).
! Xcity ohjaintiedosto 432 110 10432 $DIA $HGT "abc" $MAT $POHJA
Viivan pisteiden T5-kenttä voidaan myös siirtää Xcityyn. Kun laitat T5, saat viivan T5-kentän arvon. Kun laitat P5, saat viivan pisteen T5-kentän arvon. (Viivallahan kolme ensimmäistä kenttää ovat samoja kaikille viivan pisteille, mutta loput kolme voivat olla erilaisia kullekin pisteelle. )
! Xcity, Testing for Espoo 41022 207 941022 T6 T5 T4 T3 41023 207 941023 P6 P5 P4 P3 41024 207 941024 P6 T5 P4 T3
Tee ohjaintiedosto, jossa määrätään tekstien ominaisuuksien käsittely.
Anna taulun ja lajin jälkeen T0 jolloin ko. ominaisuus kopioidaan varsinaiseksi tekstiksi, tai + jolloin ko. ominaisuus lisätään varsinaiseen tekstiin
Esimerkkejä:
1701 106 17010002 T0
eka ominaisuus kopioidaan varsinaiseksi tekstiksi
1701 106 17010002 T3 + + +
eka ominaisuus tekstin koodiksi, muut ominaisuudet liitetään varsinaiseen tekstiin pilkulla erotettuna
1701 106 17010002 T3 T0 + +
eka ominaisuus tekstin koodiksi, toinen kopioidaan tekstiksi ja muut ominaisuudet liitetään varsinaiseen tekstiin pilkulla erotettuna
1701 106 17010002 + + + +
kaikki ominaisuudet liitetään varsinaiseen tekstiin pilkulla erotettuna
Below sample data in MmAscii-format with attribute data :
Data file: TEST_CAB.XYZ
9 0 430 8 6697121.549 3444312.964 4.420 !A DIA==0.6 !A DEP==3 !A MAT=2 9 4 439 1 6697282.852 3444490.793 12.430 9 4 439 2 6697271.585 3444436.655 12.030 9 4 439 3 6697257.912 3444398.055 11.540 9 4 439 4 6697247.277 3444354.435 10.300 9 4 439 5 6697214.196 3444343.316 6.500 9 4 439 6 6697173.620 3444355.835 6.060 9 4 439 7 6697134.909 3444351.336 3.900 9 4 439 8 6697121.549 3444312.964 2.900 9 4 439 23 6697089.160 3444298.616 2.300 !A DIA==0.6 !A MAT==Plastic
The same data in Xcity-format :
Data file: TEST_CAB.XCI
102 10430 6697121.549 3444312.964 4.420 0.0000 "8" 0.000 0.000 0.0000 "0.6" "" \\ "abc" "Concrete" 207 10439 6697282.852 3444490.793 12.430 6697271.585 3444436.655 12.030 \\ 0.00000000 0 "" 0.000 0.000 0.0000 "0.6" "" "0.100" "Plastic" 207 10439 6697271.585 3444436.655 12.030 6697257.912 3444398.055 11.540 \\ 0.00000000 0 "" 0.000 0.000 0.0000 "0.6" "" "0.100" "Plastic" 207 10439 6697257.912 3444398.055 11.540 6697247.277 3444354.435 10.300 \\ 0.00000000 0 "" 0.000 0.000 0.0000 "0.6" "" "0.100" "Plastic" 207 10439 6697247.277 3444354.435 10.300 6697214.196 3444343.316 6.500 \\ 0.00000000 0 "" 0.000 0.000 0.0000 "0.6" "" "0.100" "Plastic" 207 10439 6697214.196 3444343.316 6.500 6697173.620 3444355.835 6.060 \\ 0.00000000 0 "" 0.000 0.000 0.0000 "0.6" "" "0.100" "Plastic" 207 10439 6697173.620 3444355.835 6.060 6697134.909 3444351.336 3.900 \\ 0.00000000 0 "" 0.000 0.000 0.0000 "0.6" "" "0.100" "Plastic" 207 10439 6697134.909 3444351.336 3.900 6697121.549 3444312.964 2.900 \\ 0.00000000 0 "" 0.000 0.000 0.0000 "0.6" "" "0.100" "Plastic" 207 10439 6697121.549 3444312.964 2.900 6697089.160 3444298.616 2.300 \\ 0.00000000 0 "" 0.000 0.000 0.0000 "0.6" "" "0.100" "Plastic"
There are some special settings related to this converter.
If you define this offset, all lines in table 207 will get these values for the first line point.
If you read in a Xcity-file having this dx,dy, 3D will not store the values and if you write the same file back to Xcity-format, the values in LineTextOffset will be used.
dx,dytext offset in meters
To swap the 2. ja 3. field in the control file (Xcity table and code).
0 do not swap fields.
1 swap fields automatically if needed.
2 swap fields always.
Point name can be positioned with these offset values dx/dy. The values given here are default values for all points not having these values.
Point name in Xcity-format can be stored as attribute with new positioning (dx and dy). The same values can be written in XCI-file.
0 dx/dy and name not used
1 dx/dy and name used
Object is stored into the result file, although the table number is not legal.
For a closed line a single point is saved (coordinates inside the line) using given table and code.
See also: Common special settings