source: osm/applications/editors/josm/plugins/seachart/src/render/Signals.java@ 31955

Last change on this file since 31955 was 31955, checked in by malcolmh, 9 years ago

[Seachart] update

File size: 19.6 KB
Line 
1/* Copyright 2014 Malcolm Herring
2 *
3 * This is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, version 3 of the License.
6 *
7 * For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.
8 */
9
10package render;
11
12import java.awt.Color;
13import java.awt.Font;
14import java.awt.geom.*;
15import java.util.ArrayList;
16import java.util.EnumMap;
17
18import s57.S57att.*;
19import s57.S57obj.*;
20import s57.S57val.*;
21import s57.S57map.*;
22import symbols.Beacons;
23import symbols.Symbols;
24import symbols.Topmarks;
25import symbols.Symbols.*;
26
27public class Signals {
28
29 static final EnumMap<ColCOL, Color> lightColours = new EnumMap<ColCOL, Color>(ColCOL.class);
30 static {
31 lightColours.put(ColCOL.COL_WHT, new Color(0xffff00));
32 lightColours.put(ColCOL.COL_RED, new Color(0xff0000));
33 lightColours.put(ColCOL.COL_GRN, new Color(0x00ff00));
34 lightColours.put(ColCOL.COL_BLU, new Color(0x0000ff));
35 lightColours.put(ColCOL.COL_YEL, new Color(0xffff00));
36 lightColours.put(ColCOL.COL_AMB, new Color(0xffc200));
37 lightColours.put(ColCOL.COL_VIO, new Color(0xee82ee));
38 lightColours.put(ColCOL.COL_ORG, Color.orange);
39 lightColours.put(ColCOL.COL_MAG, Color.magenta);
40 }
41
42 static final EnumMap<ColCOL, String> lightLetters = new EnumMap<ColCOL, String>(ColCOL.class);
43 static {
44 lightLetters.put(ColCOL.COL_WHT, "W");
45 lightLetters.put(ColCOL.COL_RED, "R");
46 lightLetters.put(ColCOL.COL_GRN, "G");
47 lightLetters.put(ColCOL.COL_BLU, "Bu");
48 lightLetters.put(ColCOL.COL_YEL, "Y");
49 lightLetters.put(ColCOL.COL_AMB, "Am");
50 lightLetters.put(ColCOL.COL_VIO, "Vi");
51 lightLetters.put(ColCOL.COL_ORG, "Or");
52 }
53
54 static final EnumMap<LitCHR, String> lightCharacters = new EnumMap<LitCHR, String>(LitCHR.class);
55 static {
56 lightCharacters.put(LitCHR.CHR_F, "F");
57 lightCharacters.put(LitCHR.CHR_FL, "Fl");
58 lightCharacters.put(LitCHR.CHR_LFL, "LFl");
59 lightCharacters.put(LitCHR.CHR_Q, "Q");
60 lightCharacters.put(LitCHR.CHR_VQ, "VQ");
61 lightCharacters.put(LitCHR.CHR_UQ, "UQ");
62 lightCharacters.put(LitCHR.CHR_ISO, "Iso");
63 lightCharacters.put(LitCHR.CHR_OC, "Oc");
64 lightCharacters.put(LitCHR.CHR_IQ, "IQ");
65 lightCharacters.put(LitCHR.CHR_IVQ, "IVQ");
66 lightCharacters.put(LitCHR.CHR_IUQ, "IUQ");
67 lightCharacters.put(LitCHR.CHR_MO, "Mo");
68 lightCharacters.put(LitCHR.CHR_FFL, "FFl");
69 lightCharacters.put(LitCHR.CHR_FLLFL, "FlLFl");
70 lightCharacters.put(LitCHR.CHR_OCFL, "OcFl");
71 lightCharacters.put(LitCHR.CHR_FLFL, "FLFl");
72 lightCharacters.put(LitCHR.CHR_ALOC, "Al.Oc");
73 lightCharacters.put(LitCHR.CHR_ALLFL, "Al.LFl");
74 lightCharacters.put(LitCHR.CHR_ALFL, "Al.Fl");
75 lightCharacters.put(LitCHR.CHR_ALGR, "Al.Gr");
76 lightCharacters.put(LitCHR.CHR_QLFL, "Q+LFl");
77 lightCharacters.put(LitCHR.CHR_VQLFL, "VQ+LFl");
78 lightCharacters.put(LitCHR.CHR_UQLFL, "UQ+LFl");
79 lightCharacters.put(LitCHR.CHR_AL, "Al");
80 lightCharacters.put(LitCHR.CHR_ALFFL, "Al.FFl");
81 }
82
83 public static void addSignals(Feature feature) {
84 if (feature.objs.containsKey(Obj.FOGSIG)) fogSignals(feature);
85 if (feature.objs.containsKey(Obj.RTPBCN)) radarStations(feature);
86 if (feature.objs.containsKey(Obj.RADSTA)) radarStations(feature);
87 if (feature.objs.containsKey(Obj.RDOSTA)) radioStations(feature);
88 if (feature.objs.containsKey(Obj.LIGHTS)) lights(feature);
89 }
90
91 static final EnumMap<CatFOG, String> fogSignals = new EnumMap<CatFOG, String>(CatFOG.class);
92 static {
93 fogSignals.put(CatFOG.FOG_EXPL, "Explos");
94 fogSignals.put(CatFOG.FOG_DIA, "Dia");
95 fogSignals.put(CatFOG.FOG_SIRN, "Siren");
96 fogSignals.put(CatFOG.FOG_NAUT, "Horn");
97 fogSignals.put(CatFOG.FOG_REED, "Horn");
98 fogSignals.put(CatFOG.FOG_TYPH, "Horn");
99 fogSignals.put(CatFOG.FOG_BELL, "Bell");
100 fogSignals.put(CatFOG.FOG_WHIS, "Whis");
101 fogSignals.put(CatFOG.FOG_GONG, "Gong");
102 fogSignals.put(CatFOG.FOG_HORN, "Horn");
103 }
104
105 public static void fogSignals(Feature feature) {
106 Renderer.symbol(feature, Beacons.FogSignal);
107 AttMap atts = feature.objs.get(Obj.FOGSIG).get(0);
108 String str = "";
109 if (atts.containsKey(Att.CATFOG)) {
110 str += fogSignals.get(((ArrayList<?>)(atts.get(Att.CATFOG).val)).get(0));
111 }
112 if (atts.containsKey(Att.SIGGRP)) {
113 str += "(" + atts.get(Att.SIGGRP).val + ")";
114 } else {
115 str += " ";
116 }
117 if (atts.containsKey(Att.SIGPER)) {
118 str += atts.get(Att.SIGPER).val + "s";
119 }
120 if (atts.containsKey(Att.VALMXR)) {
121 str += atts.get(Att.VALMXR).val + "M";
122 }
123 if ((Renderer.zoom >= 15) && !str.isEmpty()) {
124 Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40),Color.black, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-60, -30)));
125 }
126 }
127
128 public static void radarStations(Feature feature) {
129 Renderer.symbol(feature, Beacons.RadarStation);
130 String bstr = "";
131 CatRTB cat = (CatRTB) Rules.getAttEnum(feature, Obj.RTPBCN, 0, Att.CATRTB);
132 String wal = Rules.getAttStr(feature, Obj.RTPBCN, 0, Att.RADWAL);
133 switch (cat) {
134 case RTB_RAMK:
135 bstr += " Ramark";
136 break;
137 case RTB_RACN:
138 bstr += " Racon";
139 String astr = Rules.getAttStr(feature, Obj.RTPBCN, 0, Att.SIGGRP);
140 if (!astr.isEmpty()) {
141 bstr += "(" + astr + ")";
142 }
143 Double per = (Double) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.SIGPER);
144 Double mxr = (Double) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.VALMXR);
145 if ((per != null) || (mxr != null)) {
146 bstr += (astr.isEmpty() ? " " : "");
147 if (per != null) bstr += (per != 0) ? per.toString() + "s" : "";
148 if (mxr != null) bstr += (mxr != 0) ? mxr.toString() + "M" : "";
149 }
150 break;
151 default:
152 break;
153 }
154 if (!wal.isEmpty()) {
155 switch (wal) {
156 case "0.03-X":
157 bstr += "(3cm)";
158 break;
159 case "0.10-S":
160 bstr += "(10cm)";
161 break;
162 }
163 }
164 if ((Renderer.zoom >= 15) && !bstr.isEmpty()) {
165 Renderer.labelText(feature, bstr, new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-30, -70)));
166 }
167 }
168
169 @SuppressWarnings("unchecked")
170 public static void radioStations(Feature feature) {
171 Renderer.symbol(feature, Beacons.RadarStation);
172 ArrayList<CatROS> cats = (ArrayList<CatROS>)Rules.getAttList(feature, Obj.RDOSTA, 0, Att.CATROS);
173 boolean vais = false;
174 String bstr = "";
175 for (CatROS ros : cats) {
176 switch (ros) {
177 case ROS_OMNI:
178 bstr += " RC";
179 break;
180 case ROS_DIRL:
181 bstr += " RD";
182 break;
183 case ROS_ROTP:
184 bstr += " RW";
185 break;
186 case ROS_CNSL:
187 bstr += " Consol";
188 break;
189 case ROS_RDF:
190 bstr += " RG";
191 break;
192 case ROS_QTA:
193 bstr += " R";
194 break;
195 case ROS_AERO:
196 bstr += " AeroRC";
197 break;
198 case ROS_DECA:
199 bstr += " Decca";
200 break;
201 case ROS_LORN:
202 bstr += " Loran";
203 break;
204 case ROS_DGPS:
205 bstr += " DGPS";
206 break;
207 case ROS_TORN:
208 bstr += " Toran";
209 break;
210 case ROS_OMGA:
211 bstr += " Omega";
212 break;
213 case ROS_SYLD:
214 bstr += " Syledis";
215 break;
216 case ROS_CHKA:
217 bstr += " Chiaka";
218 break;
219 case ROS_PCOM:
220 case ROS_COMB:
221 case ROS_FACS:
222 case ROS_TIME:
223 break;
224 case ROS_PAIS:
225 case ROS_SAIS:
226 bstr += " AIS";
227 break;
228 case ROS_VAIS:
229 vais = true;
230 break;
231 case ROS_VANC:
232 vais = true;
233 Renderer.symbol(feature, Topmarks.TopNorth, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
234 break;
235 case ROS_VASC:
236 vais = true;
237 Renderer.symbol(feature, Topmarks.TopSouth, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
238 break;
239 case ROS_VAEC:
240 vais = true;
241 Renderer.symbol(feature, Topmarks.TopEast, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
242 break;
243 case ROS_VAWC:
244 vais = true;
245 Renderer.symbol(feature, Topmarks.TopWest, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
246 break;
247 case ROS_VAPL:
248 vais = true;
249 Renderer.symbol(feature, Topmarks.TopCan, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
250 break;
251 case ROS_VASL:
252 vais = true;
253 Renderer.symbol(feature, Topmarks.TopCone, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
254 break;
255 case ROS_VAID:
256 vais = true;
257 Renderer.symbol(feature, Topmarks.TopIsol, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
258 break;
259 case ROS_VASW:
260 vais = true;
261 Renderer.symbol(feature, Topmarks.TopSphere, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
262 break;
263 case ROS_VASP:
264 vais = true;
265 Renderer.symbol(feature, Topmarks.TopX, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
266 break;
267 case ROS_VAWK:
268 vais = true;
269 Renderer.symbol(feature, Topmarks.TopCross, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
270 break;
271 default:
272 break;
273 }
274 }
275 if (Renderer.zoom >= 15) {
276 if (vais) {
277 Renderer.labelText(feature, "V-AIS", new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
278 }
279 if (!bstr.isEmpty()) {
280 Renderer.labelText(feature, bstr, new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-30, -110)));
281 }
282 }
283 }
284
285 class Sect {
286 int dir;
287 LitCHR chr;
288 ColCOL col;
289 ColCOL alt;
290 String grp;
291 double per;
292 double rng;
293 }
294
295 @SuppressWarnings("unchecked")
296 public static void lights(Feature feature) {
297 Enum<ColCOL> col = null;
298 Enum<ColCOL> tcol = null;
299 ObjTab lights = feature.objs.get(Obj.LIGHTS);
300 for (AttMap atts : lights.values()) {
301 if (atts.containsKey(Att.COLOUR)) {
302 ArrayList<Enum<ColCOL>> cols = (ArrayList<Enum<ColCOL>>) atts.get(Att.COLOUR).val;
303 if (cols.size() == 1) {
304 tcol = cols.get(0);
305 if (col == null) {
306 col = tcol;
307 } else if (tcol != col) {
308 col = ColCOL.COL_MAG;
309 break;
310 }
311 } else {
312 col = ColCOL.COL_MAG;
313 break;
314 }
315 }
316 }
317 Renderer.symbol(feature, Beacons.LightFlare, new Scheme(lightColours.get(col)), new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120))));
318 if (lights.get(1) != null) {
319 for (AttMap atts : lights.values()) {
320 Enum<ColCOL> col1 = null;
321 Enum<ColCOL> col2 = null;
322 double radius = 0.2;
323 double s1 = 0;
324 double s2 = 0;
325 boolean dir = false;
326 if (atts.containsKey(Att.COLOUR)) {
327 ArrayList<Enum<ColCOL>> cols = (ArrayList<Enum<ColCOL>>) atts.get(Att.COLOUR).val;
328 col1 = cols.get(0);
329 if (cols.size() > 1) col2 = cols.get(1);
330 } else {
331 continue;
332 }
333 if (atts.containsKey(Att.RADIUS)) {
334 radius = (Double) atts.get(Att.RADIUS).val;
335 }
336 if (atts.containsKey(Att.SECTR1)) {
337 s1 = (Double) atts.get(Att.SECTR1).val;
338 } else {
339 continue;
340 }
341 if (atts.containsKey(Att.SECTR2)) {
342 s2 = (Double) atts.get(Att.SECTR2).val;
343 } else {
344 continue;
345 }
346 if (atts.containsKey(Att.CATLIT)) {
347 ArrayList<CatLIT> cats = (ArrayList<CatLIT>) atts.get(Att.CATLIT).val;
348 if (cats.contains(CatLIT.LIT_DIR)) {
349 dir = true;
350 }
351 }
352 String str = "";
353 if (atts.containsKey(Att.LITCHR)) {
354 str += lightCharacters.get(atts.get(Att.LITCHR).val);
355 }
356 if (atts.containsKey(Att.SIGGRP)) {
357 str += "(" + atts.get(Att.SIGGRP).val + ")";
358 } else if (!str.isEmpty()) {
359 str += ".";
360 }
361 if (atts.containsKey(Att.COLOUR)) {
362 ArrayList<Enum<ColCOL>> cols = (ArrayList<Enum<ColCOL>>) atts.get(Att.COLOUR).val;
363 str += lightLetters.get(cols.get(0));
364 if (cols.size() > 1)
365 str += lightLetters.get(cols.get(1));
366 }
367 if (dir && atts.containsKey(Att.ORIENT)) {
368 double orient = (Double)atts.get(Att.ORIENT).val;
369 str += " " + orient + "°";
370 s1 = (orient - 4 + 360) % 360;
371 s2 = (orient + 4) % 360;
372 double n1 = 360;
373 double n2 = 360;
374 for (AttMap sect : lights.values()) {
375 if (sect != atts) {
376
377 }
378 }
379 }
380 Renderer.lightSector(feature, lightColours.get(col1), lightColours.get(col2), radius, s1, s2, dir, str);
381 }
382 }
383/* int secmax = countObjects(item, "light");
384 if ((idx == 0) && (secmax > 0)) {
385 struct SECT {
386 struct SECT *next;
387 int dir;
388 LitCHR_t chr;
389 ColCOL_t col;
390 ColCOL_t alt;
391 char *grp;
392 double per;
393 double rng;
394 } *lights = NULL;
395 for (int i = secmax; i > 0; i--) {
396 struct SECT *tmp = calloc(1, sizeof(struct SECT));
397 tmp->next = lights;
398 lights = tmp;
399 obj = getObj(item, LIGHTS, i);
400 if ((att = getAtt(obj, CATLIT)) != NULL) {
401 lights->dir = testAtt(att, LIT_DIR);
402 }
403 if ((att = getAtt(obj, LITCHR)) != NULL) {
404 lights->chr = att->val.val.e;
405 switch (lights->chr) {
406 case CHR_AL:
407 lights->chr = CHR_F;
408 break;
409 case CHR_ALOC:
410 lights->chr = CHR_OC;
411 break;
412 case CHR_ALLFL:
413 lights->chr = CHR_LFL;
414 break;
415 case CHR_ALFL:
416 lights->chr = CHR_FL;
417 break;
418 case CHR_ALFFL:
419 lights->chr = CHR_FFL;
420 break;
421 default:
422 break;
423 }
424 }
425 if ((att = getAtt(obj, SIGGRP)) != NULL) {
426 lights->grp = att->val.val.a;
427 } else {
428 lights->grp = "";
429 }
430 if ((att = getAtt(obj, SIGPER)) != NULL) {
431 lights->per = att->val.val.f;
432 }
433 if ((att = getAtt(obj, VALNMR)) != NULL) {
434 lights->rng = att->val.val.f;
435 }
436 if ((att = getAtt(obj, COLOUR)) != NULL) {
437 lights->col = att->val.val.l->val;
438 if (att->val.val.l->next != NULL)
439 lights->alt = att->val.val.l->next->val;
440 }
441 }
442 struct COLRNG {
443 int col;
444 double rng;
445 } colrng[14];
446 while (lights != NULL) {
447 strcpy(string2, "");
448 bzero(colrng, 14*sizeof(struct COLRNG));
449 colrng[lights->col].col = 1;
450 colrng[lights->col].rng = lights->rng;
451 struct SECT *this = lights;
452 struct SECT *next = lights->next;
453 while (next != NULL) {
454 if ((this->dir == next->dir) && (this->chr == next->chr) &&
455 (strcmp(this->grp, next->grp) == 0) && (this->per == next->per)) {
456 colrng[next->col].col = 1;
457 if (next->rng > colrng[next->col].rng)
458 colrng[next->col].rng = next->rng;
459 struct SECT *tmp = lights;
460 while (tmp->next != next) tmp = tmp->next;
461 tmp->next = next->next;
462 free(next);
463 next = tmp->next;
464 } else {
465 next = next->next;
466 }
467 }
468 if (this->chr != CHR_UNKN) {
469 if (this->dir) strcpy(string2, "Dir.");
470 strcat(string2, light_characters[this->chr]);
471 if (strcmp(this->grp, "") != 0) {
472 if (this->grp[0] == '(')
473 sprintf(strchr(string2, 0), "%s", this->grp);
474 else
475 sprintf(strchr(string2, 0), "(%s)", this->grp);
476 } else {
477 if (strlen(string2) > 0) strcat(string2, ".");
478 }
479 int n = 0;
480 for (int i = 0; i < 14; i++) if (colrng[i].col) n++;
481 double max = 0.0;
482 for (int i = 0; i < 14; i++) if (colrng[i].col && (colrng[i].rng > max)) max = colrng[i].rng;
483 double min = max;
484 for (int i = 0; i < 14; i++) if (colrng[i].col && (colrng[i].rng > 0.0) && (colrng[i].rng < min)) min = colrng[i].rng;
485 if (min == max) {
486 for (int i = 0; i < 14; i++) if (colrng[i].col) strcat(string2, light_letters[i]);
487 } else {
488 for (int i = 0; i < 14; i++) if (colrng[i].col && (colrng[i].rng == max)) strcat(string2, light_letters[i]);
489 for (int i = 0; i < 14; i++) if (colrng[i].col && (colrng[i].rng < max) && (colrng[i].rng > min)) strcat(string2, light_letters[i]);
490 for (int i = 0; i < 14; i++) if (colrng[i].col && colrng[i].rng == min) strcat(string2, light_letters[i]);
491 }
492 strcat(string2, ".");
493 if (this->per > 0.0) sprintf(strchr(string2, 0), "%gs", this->per);
494 if (max > 0.0) {
495 sprintf(strchr(string2, 0), "%g", max);
496 if (min != max) {
497 if (n == 2) strcat(string2, "/");
498 else if (n > 2) strcat(string2, "-");
499 if (min < max) sprintf(strchr(string2, 0), "%g", min);
500 }
501 strcat(string2, "M");
502 }
503 if (strlen(string1) > 0) strcat(string1, "\n");
504 strcat(string1, string2);
505 }
506 lights = this->next;
507 free(this);
508 this = lights;
509 }
510 } else {
511 if ((att = getAtt(obj, CATLIT)) != NULL) {
512 if (testAtt(att, LIT_DIR))
513 strcat(string1, "Dir");
514 }
515 if ((att = getAtt(obj, MLTYLT)) != NULL)
516 sprintf(strchr(string1, 0), "%s", stringValue(att->val));
517 if ((att = getAtt(obj, LITCHR)) != NULL) {
518 char *chrstr = strdup(stringValue(att->val));
519 Att_t *grp = getAtt(obj, SIGGRP);
520 if (grp != NULL) {
521 char *strgrp = strdup(stringValue(grp->val));
522 char *grpstr = strtok(strgrp, "()");
523 switch (att->val.val.e) {
524 case CHR_QLFL:
525 sprintf(strchr(string1, 0), "Q(%s)+LFl", grpstr);
526 break;
527 case CHR_VQLFL:
528 sprintf(strchr(string1, 0), "VQ(%s)+LFl", grpstr);
529 break;
530 case CHR_UQLFL:
531 sprintf(strchr(string1, 0), "UQ(%s)+LFl", grpstr);
532 break;
533 default:
534 sprintf(strchr(string1, 0), "%s(%s)", chrstr, grpstr);
535 break;
536 }
537 free(strgrp);
538 } else {
539 sprintf(strchr(string1, 0), "%s", chrstr);
540 }
541 free(chrstr);
542 }
543 if ((att = getAtt(obj, COLOUR)) != NULL) {
544 int n = countValues(att);
545 if (!((n == 1) && (idx == 0) && (testAtt(att, COL_WHT)))) {
546 if ((strlen(string1) > 0) && ((string1[strlen(string1)-1] != ')')))
547 strcat(string1, ".");
548 Lst_t *lst = att->val.val.l;
549 while (lst != NULL) {
550 strcat(string1, light_letters[lst->val]);
551 lst = lst->next;
552 }
553 }
554 }
555 if ((idx == 0) && (att = getAtt(obj, CATLIT)) != NULL) {
556 if (testAtt(att, LIT_VERT))
557 strcat(string1, "(vert)");
558 if (testAtt(att, LIT_HORI))
559 strcat(string1, "(hor)");
560 }
561 if ((strlen(string1) > 0) &&
562 ((getAtt(obj, SIGPER) != NULL) ||
563 (getAtt(obj, HEIGHT) != NULL) ||
564 (getAtt(obj, VALMXR) != NULL)) &&
565 (string1[strlen(string1)-1] != ')'))
566 strcat(string1, ".");
567 if ((att = getAtt(obj, SIGPER)) != NULL)
568 sprintf(strchr(string1, 0), "%ss", stringValue(att->val));
569 if ((idx == 0) && (item->objs.obj != LITMIN)) {
570 if ((att = getAtt(obj, HEIGHT)) != NULL)
571 sprintf(strchr(string1, 0), "%sm", stringValue(att->val));
572 if ((att = getAtt(obj, VALNMR)) != NULL)
573 sprintf(strchr(string1, 0), "%sM", stringValue(att->val));
574 }
575 if ((idx == 0) && (att = getAtt(obj, CATLIT)) != NULL) {
576 if (testAtt(att, LIT_FRNT))
577 strcat(string1, "(Front)");
578 if (testAtt(att, LIT_REAR))
579 strcat(string1, "(Rear)");
580 if (testAtt(att, LIT_UPPR))
581 strcat(string1, "(Upper)");
582 if (testAtt(att, LIT_LOWR))
583 strcat(string1, "(Lower)");
584 }
585 }
586 }
587*/ }
588
589}
Note: See TracBrowser for help on using the repository browser.