Revision 24250 branches/v2_0_0_prep/libraries/libFMap_dataFile/src/org/gvsig/fmap/data/feature/file/dxf/DXFResource.java
DXFResource.java | ||
---|---|---|
290 | 290 |
pto = point.get(0); |
291 | 291 |
// FShape nuevoShp; |
292 | 292 |
if (point.isTextPoint()) { |
293 |
feature.set(ID_FIELD_ID,i); |
|
293 |
feature.setAttribute(ID_FIELD_ID,i);
|
|
294 | 294 |
// auxRow[ID_FIELD_ID] = new Integer(i); |
295 | 295 |
// feature.set(ID_FIELD_FSHAPE,"Point2D"); |
296 | 296 |
// auxRow[ID_FIELD_FSHAPE] = new String("FPoint2D"); |
297 |
feature.set(ID_FIELD_ENTITY,fea.getProp("dxfEntity")); |
|
297 |
feature.setAttribute(ID_FIELD_ENTITY,fea.getProp("dxfEntity"));
|
|
298 | 298 |
// auxRow[ID_FIELD_ENTITY] = new String(fea.getProp("dxfEntity")); |
299 |
feature.set(ID_FIELD_LAYER,fea.getProp("layer")); |
|
299 |
feature.setAttribute(ID_FIELD_LAYER,fea.getProp("layer"));
|
|
300 | 300 |
// auxRow[ID_FIELD_LAYER] = new String(fea.getProp("layer")); |
301 | 301 |
int auxInt = Integer.parseInt(fea.getProp("color")); |
302 |
feature.set(ID_FIELD_COLOR,auxInt); |
|
302 |
feature.setAttribute(ID_FIELD_COLOR,auxInt);
|
|
303 | 303 |
// auxRow[ID_FIELD_COLOR] = new Integer(auxInt); |
304 |
feature.set(ID_FIELD_TEXT,fea.getProp("text")); |
|
304 |
feature.setAttribute(ID_FIELD_TEXT,fea.getProp("text"));
|
|
305 | 305 |
// auxRow[ID_FIELD_TEXT] = ValueFactory |
306 | 306 |
// .createValue(new String(fea.getProp("text"))); |
307 | 307 |
heightText = Float.parseFloat(fea.getProp("textHeight")); |
308 |
feature.set(ID_FIELD_HEIGHTTEXT,heightText); |
|
308 |
feature.setAttribute(ID_FIELD_HEIGHTTEXT,heightText);
|
|
309 | 309 |
// auxRow[ID_FIELD_HEIGHTTEXT] = ValueFactory |
310 | 310 |
// .createValue(heightText); |
311 | 311 |
double auxR = Double.parseDouble(fea |
312 | 312 |
.getProp("textRotation")); |
313 |
feature.set(ID_FIELD_ROTATIONTEXT,auxR); |
|
313 |
feature.setAttribute(ID_FIELD_ROTATIONTEXT,auxR);
|
|
314 | 314 |
// auxRow[ID_FIELD_ROTATIONTEXT] = ValueFactory |
315 | 315 |
// .createValue(auxR); |
316 | 316 |
double auxE = Double.parseDouble(fea.getProp("elevation")); |
317 |
feature.set(ID_FIELD_ELEVATION,auxE); |
|
317 |
feature.setAttribute(ID_FIELD_ELEVATION,auxE);
|
|
318 | 318 |
// auxRow[ID_FIELD_ELEVATION] = ValueFactory.createValue(auxE); |
319 | 319 |
double auxT = Double.parseDouble(fea.getProp("thickness")); |
320 |
feature.set(ID_FIELD_THICKNESS,auxT); |
|
320 |
feature.setAttribute(ID_FIELD_THICKNESS,auxT);
|
|
321 | 321 |
// auxRow[ID_FIELD_THICKNESS] = ValueFactory.createValue(auxT); |
322 | 322 |
// Attributes |
323 | 323 |
for (int j = 0; j < nAtt; j++) { |
324 | 324 |
String[] attributes = new String[2]; |
325 | 325 |
attributes = (String[]) featureMaker.getAttributes() |
326 | 326 |
.get(j); |
327 |
feature.set(10+j,attributes[1]); |
|
327 |
feature.setAttribute(10+j,attributes[1]);
|
|
328 | 328 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
329 | 329 |
// attributes[1])); |
330 | 330 |
if (!fea.getProp(attributes[0]).equals(attributes[1])) { |
331 |
feature.set(10+j,fea.getProp(attributes[0])); |
|
331 |
feature.setAttribute(10+j,fea.getProp(attributes[0]));
|
|
332 | 332 |
// auxRow[10 + j] = ValueFactory |
333 | 333 |
// .createValue(new String(fea |
334 | 334 |
// .getProp(attributes[0]))); |
... | ... | |
341 | 341 |
|
342 | 342 |
// addShape(nuevoShp, auxRow); |
343 | 343 |
} else { |
344 |
feature.set(ID_FIELD_ID,i); |
|
344 |
feature.setAttribute(ID_FIELD_ID,i);
|
|
345 | 345 |
// auxRow[ID_FIELD_ID] = ValueFactory.createValue(i); |
346 | 346 |
// feature.set(ID_FIELD_FSHAPE,"Point2D"); |
347 | 347 |
// auxRow[ID_FIELD_FSHAPE] = ValueFactory |
348 | 348 |
// .createValue(new String("FPoint2D")); |
349 |
feature.set(ID_FIELD_ENTITY,fea.getProp("dxfEntity")); |
|
349 |
feature.setAttribute(ID_FIELD_ENTITY,fea.getProp("dxfEntity"));
|
|
350 | 350 |
// auxRow[ID_FIELD_ENTITY] = ValueFactory |
351 | 351 |
// .createValue(new String(fea.getProp("dxfEntity"))); |
352 |
feature.set(ID_FIELD_LAYER,fea.getProp("layer")); |
|
352 |
feature.setAttribute(ID_FIELD_LAYER,fea.getProp("layer"));
|
|
353 | 353 |
// auxRow[ID_FIELD_LAYER] = ValueFactory |
354 | 354 |
// .createValue(new String(fea.getProp("layer"))); |
355 | 355 |
int auxInt = Integer.parseInt(fea.getProp("color")); |
356 |
feature.set(ID_FIELD_COLOR,auxInt); |
|
356 |
feature.setAttribute(ID_FIELD_COLOR,auxInt);
|
|
357 | 357 |
// auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(auxInt); |
358 | 358 |
double auxE = Double.parseDouble(fea.getProp("elevation")); |
359 |
feature.set(ID_FIELD_ELEVATION,auxE); |
|
359 |
feature.setAttribute(ID_FIELD_ELEVATION,auxE);
|
|
360 | 360 |
// auxRow[ID_FIELD_ELEVATION] = ValueFactory.createValue(auxE); |
361 | 361 |
double auxT = Double.parseDouble(fea.getProp("thickness")); |
362 |
feature.set(ID_FIELD_THICKNESS,auxT); |
|
362 |
feature.setAttribute(ID_FIELD_THICKNESS,auxT);
|
|
363 | 363 |
// auxRow[ID_FIELD_THICKNESS] = ValueFactory.createValue(auxT); |
364 | 364 |
// Attributes |
365 | 365 |
for (int j = 0; j < nAtt; j++) { |
366 | 366 |
String[] attributes = new String[2]; |
367 | 367 |
attributes = (String[]) featureMaker.getAttributes() |
368 | 368 |
.get(j); |
369 |
feature.set(10+j,attributes[1]); |
|
369 |
feature.setAttribute(10+j,attributes[1]);
|
|
370 | 370 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
371 | 371 |
// attributes[1])); |
372 | 372 |
if (!fea.getProp(attributes[0]).equals(attributes[1])) { |
373 |
feature.set(10+j,fea.getProp(attributes[0])); |
|
373 |
feature.setAttribute(10+j,fea.getProp(attributes[0]));
|
|
374 | 374 |
// auxRow[10 + j] = ValueFactory |
375 | 375 |
// .createValue(new String(fea |
376 | 376 |
// .getProp(attributes[0]))); |
... | ... | |
389 | 389 |
pto = point.getPoint3D(0); |
390 | 390 |
// FShape nuevoShp; |
391 | 391 |
if (point.isTextPoint()) { |
392 |
feature.set(ID_FIELD_ID,i); |
|
392 |
feature.setAttribute(ID_FIELD_ID,i);
|
|
393 | 393 |
// auxRow[ID_FIELD_ID] = ValueFactory.createValue(i); |
394 | 394 |
feature.setGeometry(ID_FIELD_GEOMETRY,"Point3D"); |
395 | 395 |
// auxRow[ID_FIELD_FSHAPE] = ValueFactory |
396 | 396 |
// .createValue(new String("FPoint3D")); |
397 |
feature.set(ID_FIELD_ENTITY,fea.getProp("dxfEntity")); |
|
397 |
feature.setAttribute(ID_FIELD_ENTITY,fea.getProp("dxfEntity"));
|
|
398 | 398 |
// auxRow[ID_FIELD_ENTITY] = ValueFactory |
399 | 399 |
// .createValue(new String(fea.getProp("dxfEntity"))); |
400 |
feature.set(ID_FIELD_LAYER,fea.getProp("layer")); |
|
400 |
feature.setAttribute(ID_FIELD_LAYER,fea.getProp("layer"));
|
|
401 | 401 |
// auxRow[ID_FIELD_LAYER] = ValueFactory |
402 | 402 |
// .createValue(new String(fea.getProp("layer"))); |
403 | 403 |
int auxInt = Integer.parseInt(fea.getProp("color")); |
404 |
feature.set(ID_FIELD_COLOR,auxInt); |
|
404 |
feature.setAttribute(ID_FIELD_COLOR,auxInt);
|
|
405 | 405 |
// auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(auxInt); |
406 |
feature.set(ID_FIELD_TEXT,fea.getProp("text")); |
|
406 |
feature.setAttribute(ID_FIELD_TEXT,fea.getProp("text"));
|
|
407 | 407 |
// auxRow[ID_FIELD_TEXT] = ValueFactory |
408 | 408 |
// .createValue(new String(fea.getProp("text"))); |
409 | 409 |
heightText = Float.parseFloat(fea.getProp("textHeight")); |
410 |
feature.set(ID_FIELD_HEIGHTTEXT,heightText); |
|
410 |
feature.setAttribute(ID_FIELD_HEIGHTTEXT,heightText);
|
|
411 | 411 |
// auxRow[ID_FIELD_HEIGHTTEXT] = ValueFactory |
412 | 412 |
// .createValue(heightText); |
413 | 413 |
double auxR = Double.parseDouble(fea |
414 | 414 |
.getProp("textRotation")); |
415 |
feature.set(ID_FIELD_ROTATIONTEXT,auxR); |
|
415 |
feature.setAttribute(ID_FIELD_ROTATIONTEXT,auxR);
|
|
416 | 416 |
// auxRow[ID_FIELD_ROTATIONTEXT] = ValueFactory |
417 | 417 |
// .createValue(auxR); |
418 | 418 |
double auxE = Double.parseDouble(fea.getProp("elevation")); |
419 |
feature.set(ID_FIELD_ELEVATION,auxE); |
|
419 |
feature.setAttribute(ID_FIELD_ELEVATION,auxE);
|
|
420 | 420 |
// auxRow[ID_FIELD_ELEVATION] = ValueFactory.createValue(auxE); |
421 | 421 |
double auxT = Double.parseDouble(fea.getProp("thickness")); |
422 |
feature.set(ID_FIELD_THICKNESS,auxT); |
|
422 |
feature.setAttribute(ID_FIELD_THICKNESS,auxT);
|
|
423 | 423 |
// auxRow[ID_FIELD_THICKNESS] = ValueFactory.createValue(auxT); |
424 | 424 |
// Attributes |
425 | 425 |
for (int j = 0; j < nAtt; j++) { |
426 | 426 |
String[] attributes = new String[2]; |
427 | 427 |
attributes = (String[]) featureMaker.getAttributes() |
428 | 428 |
.get(j); |
429 |
feature.set(10+j,attributes[1]); |
|
429 |
feature.setAttribute(10+j,attributes[1]);
|
|
430 | 430 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
431 | 431 |
// attributes[1])); |
432 | 432 |
if (!fea.getProp(attributes[0]).equals(attributes[1])) { |
433 |
feature.set(10+j,fea.getProp(attributes[0])); |
|
433 |
feature.setAttribute(10+j,fea.getProp(attributes[0]));
|
|
434 | 434 |
// auxRow[10 + j] = ValueFactory |
435 | 435 |
// .createValue(new String(fea |
436 | 436 |
// .getProp(attributes[0]))); |
... | ... | |
442 | 442 |
addDXFFeature(feature); |
443 | 443 |
// addShape(nuevoShp, auxRow); |
444 | 444 |
} else { |
445 |
feature.set(ID_FIELD_ID,i); |
|
445 |
feature.setAttribute(ID_FIELD_ID,i);
|
|
446 | 446 |
// auxRow[ID_FIELD_ID] = ValueFactory.createValue(i); |
447 | 447 |
feature.setGeometry(ID_FIELD_GEOMETRY,"Point3D"); |
448 | 448 |
// auxRow[ID_FIELD_FSHAPE] = ValueFactory |
449 | 449 |
// .createValue(new String("FPoint3D")); |
450 |
feature.set(ID_FIELD_ENTITY,fea.getProp("dxfEntity")); |
|
450 |
feature.setAttribute(ID_FIELD_ENTITY,fea.getProp("dxfEntity"));
|
|
451 | 451 |
// auxRow[ID_FIELD_ENTITY] = ValueFactory |
452 | 452 |
// .createValue(new String(fea.getProp("dxfEntity"))); |
453 |
feature.set(ID_FIELD_LAYER,fea.getProp("layer")); |
|
453 |
feature.setAttribute(ID_FIELD_LAYER,fea.getProp("layer"));
|
|
454 | 454 |
// auxRow[ID_FIELD_LAYER] = ValueFactory |
455 | 455 |
// .createValue(new String(fea.getProp("layer"))); |
456 | 456 |
int auxInt = Integer.parseInt(fea.getProp("color")); |
457 |
feature.set(ID_FIELD_COLOR,auxInt); |
|
457 |
feature.setAttribute(ID_FIELD_COLOR,auxInt);
|
|
458 | 458 |
// auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(auxInt); |
459 | 459 |
|
460 | 460 |
double auxE = Double.parseDouble(fea.getProp("elevation")); |
461 |
feature.set(ID_FIELD_ELEVATION,auxE); |
|
461 |
feature.setAttribute(ID_FIELD_ELEVATION,auxE);
|
|
462 | 462 |
// auxRow[ID_FIELD_ELEVATION] = ValueFactory.createValue(auxE); |
463 | 463 |
double auxT = Double.parseDouble(fea.getProp("thickness")); |
464 |
feature.set(ID_FIELD_THICKNESS,auxT); |
|
464 |
feature.setAttribute(ID_FIELD_THICKNESS,auxT);
|
|
465 | 465 |
// auxRow[ID_FIELD_THICKNESS] = ValueFactory.createValue(auxT); |
466 | 466 |
// Attributes |
467 | 467 |
for (int j = 0; j < nAtt; j++) { |
468 | 468 |
String[] attributes = new String[2]; |
469 | 469 |
attributes = (String[]) featureMaker.getAttributes() |
470 | 470 |
.get(j); |
471 |
feature.set(10+j,attributes[1]); |
|
471 |
feature.setAttribute(10+j,attributes[1]);
|
|
472 | 472 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
473 | 473 |
// attributes[1])); |
474 | 474 |
if (!fea.getProp(attributes[0]).equals(attributes[1])) { |
475 |
feature.set(10+j,fea.getProp(attributes[0])); |
|
475 |
feature.setAttribute(10+j,fea.getProp(attributes[0]));
|
|
476 | 476 |
// auxRow[10 + j] = ValueFactory |
477 | 477 |
// .createValue(new String(fea |
478 | 478 |
// .getProp(attributes[0]))); |
... | ... | |
495 | 495 |
for (int j = 1; j < pts.length; j++) { |
496 | 496 |
genPathX.lineTo(pts[j].getX(), pts[j].getY()); |
497 | 497 |
} |
498 |
feature.set(ID_FIELD_ID,i); |
|
498 |
feature.setAttribute(ID_FIELD_ID,i);
|
|
499 | 499 |
// auxRow[ID_FIELD_ID] = ValueFactory.createValue(i); |
500 | 500 |
feature.setGeometry(ID_FIELD_GEOMETRY,"Polyline2D"); |
501 | 501 |
// auxRow[ID_FIELD_FSHAPE] = ValueFactory.createValue(new String( |
502 | 502 |
// "FPolyline2D")); |
503 |
feature.set(ID_FIELD_ENTITY,fea.getProp("dxfEntity")); |
|
503 |
feature.setAttribute(ID_FIELD_ENTITY,fea.getProp("dxfEntity"));
|
|
504 | 504 |
// auxRow[ID_FIELD_ENTITY] = ValueFactory.createValue(new String( |
505 | 505 |
// fea.getProp("dxfEntity"))); |
506 |
feature.set(ID_FIELD_LAYER,fea.getProp("layer")); |
|
506 |
feature.setAttribute(ID_FIELD_LAYER,fea.getProp("layer"));
|
|
507 | 507 |
// auxRow[ID_FIELD_LAYER] = ValueFactory.createValue(new String( |
508 | 508 |
// fea.getProp("layer"))); |
509 | 509 |
int auxInt = Integer.parseInt(fea.getProp("color")); |
510 |
feature.set(ID_FIELD_COLOR,auxInt); |
|
510 |
feature.setAttribute(ID_FIELD_COLOR,auxInt);
|
|
511 | 511 |
// auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(auxInt); |
512 | 512 |
double auxE = Double.parseDouble(fea.getProp("elevation")); |
513 |
feature.set(ID_FIELD_ELEVATION,auxE); |
|
513 |
feature.setAttribute(ID_FIELD_ELEVATION,auxE);
|
|
514 | 514 |
// auxRow[ID_FIELD_ELEVATION] = ValueFactory.createValue(auxE); |
515 | 515 |
double auxT = Double.parseDouble(fea.getProp("thickness")); |
516 |
feature.set(ID_FIELD_THICKNESS,auxT); |
|
516 |
feature.setAttribute(ID_FIELD_THICKNESS,auxT);
|
|
517 | 517 |
// auxRow[ID_FIELD_THICKNESS] = ValueFactory.createValue(auxT); |
518 | 518 |
// Attributes |
519 | 519 |
for (int j = 0; j < nAtt; j++) { |
520 | 520 |
String[] attributes = new String[2]; |
521 | 521 |
attributes = (String[]) featureMaker.getAttributes().get(j); |
522 |
feature.set(10+j,attributes[1]); |
|
522 |
feature.setAttribute(10+j,attributes[1]);
|
|
523 | 523 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
524 | 524 |
// attributes[1])); |
525 | 525 |
if (!fea.getProp(attributes[0]).equals(attributes[1])) { |
526 |
feature.set(10+j,fea.getProp(attributes[0])); |
|
526 |
feature.setAttribute(10+j,fea.getProp(attributes[0]));
|
|
527 | 527 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
528 | 528 |
// fea.getProp(attributes[0]))); |
529 | 529 |
} |
... | ... | |
547 | 547 |
for (int j = 0; j < pts.length; j++) { |
548 | 548 |
elevations[j] = pts[j].getZ(); |
549 | 549 |
} |
550 |
feature.set(ID_FIELD_ID,i); |
|
550 |
feature.setAttribute(ID_FIELD_ID,i);
|
|
551 | 551 |
// auxRow[ID_FIELD_ID] = ValueFactory.createValue(i); |
552 | 552 |
feature.setGeometry(ID_FIELD_GEOMETRY,"Polyline3D"); |
553 | 553 |
// auxRow[ID_FIELD_FSHAPE] = ValueFactory.createValue(new String( |
554 | 554 |
// "FPolyline3D")); |
555 |
feature.set(ID_FIELD_ENTITY,fea.getProp("dxfEntity")); |
|
555 |
feature.setAttribute(ID_FIELD_ENTITY,fea.getProp("dxfEntity"));
|
|
556 | 556 |
// auxRow[ID_FIELD_ENTITY] = ValueFactory.createValue(new String( |
557 | 557 |
// fea.getProp("dxfEntity"))); |
558 |
feature.set(ID_FIELD_LAYER,fea.getProp("layer")); |
|
558 |
feature.setAttribute(ID_FIELD_LAYER,fea.getProp("layer"));
|
|
559 | 559 |
// auxRow[ID_FIELD_LAYER] = ValueFactory.createValue(new String( |
560 | 560 |
// fea.getProp("layer"))); |
561 | 561 |
int auxInt = Integer.parseInt(fea.getProp("color")); |
562 |
feature.set(ID_FIELD_COLOR,auxInt); |
|
562 |
feature.setAttribute(ID_FIELD_COLOR,auxInt);
|
|
563 | 563 |
// auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(auxInt); |
564 | 564 |
if (fea.getProp("elevation") != null) { |
565 | 565 |
double auxE = Double.parseDouble(fea.getProp("elevation")); |
566 |
feature.set(ID_FIELD_ELEVATION,auxE); |
|
566 |
feature.setAttribute(ID_FIELD_ELEVATION,auxE);
|
|
567 | 567 |
// auxRow[ID_FIELD_ELEVATION] = ValueFactory.createValue(auxE); |
568 | 568 |
} |
569 | 569 |
double auxT = Double.parseDouble(fea.getProp("thickness")); |
570 |
feature.set(ID_FIELD_THICKNESS,auxT); |
|
570 |
feature.setAttribute(ID_FIELD_THICKNESS,auxT);
|
|
571 | 571 |
// auxRow[ID_FIELD_THICKNESS] = ValueFactory.createValue(auxT); |
572 | 572 |
// Attributes |
573 | 573 |
for (int j = 0; j < nAtt; j++) { |
574 | 574 |
String[] attributes = new String[2]; |
575 | 575 |
attributes = (String[]) featureMaker.getAttributes().get(j); |
576 |
feature.set(10+j,attributes[1]); |
|
576 |
feature.setAttribute(10+j,attributes[1]);
|
|
577 | 577 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
578 | 578 |
// attributes[1])); |
579 | 579 |
if (!fea.getProp(attributes[0]).equals(attributes[1])) { |
580 |
feature.set(10+j,fea.getProp(attributes[0])); |
|
580 |
feature.setAttribute(10+j,fea.getProp(attributes[0]));
|
|
581 | 581 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
582 | 582 |
// fea.getProp(attributes[0]))); |
583 | 583 |
} |
... | ... | |
605 | 605 |
for (int j = 1; j < pts.length; j++) { |
606 | 606 |
genPathX.lineTo(pts[j].getX(), pts[j].getY()); |
607 | 607 |
} |
608 |
feature.set(ID_FIELD_ID,i); |
|
608 |
feature.setAttribute(ID_FIELD_ID,i);
|
|
609 | 609 |
// auxRow[ID_FIELD_ID] = ValueFactory.createValue(i); |
610 | 610 |
feature.setGeometry(ID_FIELD_GEOMETRY,"Polygon2D"); |
611 | 611 |
// auxRow[ID_FIELD_FSHAPE] = ValueFactory.createValue(new String( |
612 | 612 |
// "FPolygon2D")); |
613 |
feature.set(ID_FIELD_ENTITY,fea.getProp("dxfEntity")); |
|
613 |
feature.setAttribute(ID_FIELD_ENTITY,fea.getProp("dxfEntity"));
|
|
614 | 614 |
// auxRow[ID_FIELD_ENTITY] = ValueFactory.createValue(new String( |
615 | 615 |
// fea.getProp("dxfEntity"))); |
616 |
feature.set(ID_FIELD_LAYER,fea.getProp("layer")); |
|
616 |
feature.setAttribute(ID_FIELD_LAYER,fea.getProp("layer"));
|
|
617 | 617 |
// auxRow[ID_FIELD_LAYER] = ValueFactory.createValue(new String( |
618 | 618 |
// fea.getProp("layer"))); |
619 | 619 |
int auxInt = Integer.parseInt(fea.getProp("color")); |
620 |
feature.set(ID_FIELD_COLOR,auxInt); |
|
620 |
feature.setAttribute(ID_FIELD_COLOR,auxInt);
|
|
621 | 621 |
// auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(auxInt); |
622 | 622 |
double auxE = Double.parseDouble(fea.getProp("elevation")); |
623 |
feature.set(ID_FIELD_ELEVATION,auxE); |
|
623 |
feature.setAttribute(ID_FIELD_ELEVATION,auxE);
|
|
624 | 624 |
// auxRow[ID_FIELD_ELEVATION] = ValueFactory.createValue(auxE); |
625 | 625 |
double auxT = Double.parseDouble(fea.getProp("thickness")); |
626 |
feature.set(ID_FIELD_THICKNESS,auxT); |
|
626 |
feature.setAttribute(ID_FIELD_THICKNESS,auxT);
|
|
627 | 627 |
// auxRow[ID_FIELD_THICKNESS] = ValueFactory.createValue(auxT); |
628 | 628 |
// Attributes |
629 | 629 |
for (int j = 0; j < nAtt; j++) { |
630 | 630 |
String[] attributes = new String[2]; |
631 | 631 |
attributes = (String[]) featureMaker.getAttributes().get(j); |
632 |
feature.set(10+j,attributes[1]); |
|
632 |
feature.setAttribute(10+j,attributes[1]);
|
|
633 | 633 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
634 | 634 |
// attributes[1])); |
635 | 635 |
if (!fea.getProp(attributes[0]).equals(attributes[1])) { |
636 |
feature.set(10+j,fea.getProp(attributes[0])); |
|
636 |
feature.setAttribute(10+j,fea.getProp(attributes[0]));
|
|
637 | 637 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
638 | 638 |
// fea.getProp(attributes[0]))); |
639 | 639 |
} |
... | ... | |
666 | 666 |
for (int j = 0; j < pts.length; j++) { |
667 | 667 |
elevations[j] = pts[j].getZ(); |
668 | 668 |
} |
669 |
feature.set(ID_FIELD_ID,i); |
|
669 |
feature.setAttribute(ID_FIELD_ID,i);
|
|
670 | 670 |
// auxRow[ID_FIELD_ID] = ValueFactory.createValue(i); |
671 | 671 |
feature.setGeometry(ID_FIELD_GEOMETRY,"Polygon3D"); |
672 | 672 |
// auxRow[ID_FIELD_FSHAPE] = ValueFactory.createValue(new String( |
673 | 673 |
// "FPolygon3D")); |
674 |
feature.set(ID_FIELD_ENTITY,fea.getProp("dxfEntity")); |
|
674 |
feature.setAttribute(ID_FIELD_ENTITY,fea.getProp("dxfEntity"));
|
|
675 | 675 |
// auxRow[ID_FIELD_ENTITY] = ValueFactory.createValue(new String( |
676 | 676 |
// fea.getProp("dxfEntity"))); |
677 |
feature.set(ID_FIELD_LAYER,fea.getProp("layer")); |
|
677 |
feature.setAttribute(ID_FIELD_LAYER,fea.getProp("layer"));
|
|
678 | 678 |
// auxRow[ID_FIELD_LAYER] = ValueFactory.createValue(new String( |
679 | 679 |
// fea.getProp("layer"))); |
680 | 680 |
int auxInt = Integer.parseInt(fea.getProp("color")); |
681 |
feature.set(ID_FIELD_COLOR,auxInt); |
|
681 |
feature.setAttribute(ID_FIELD_COLOR,auxInt);
|
|
682 | 682 |
// auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(auxInt); |
683 | 683 |
if (fea.getProp("elevation") != null) { |
684 | 684 |
double auxE = Double.parseDouble(fea.getProp("elevation")); |
685 |
feature.set(ID_FIELD_ELEVATION,auxE); |
|
685 |
feature.setAttribute(ID_FIELD_ELEVATION,auxE);
|
|
686 | 686 |
// auxRow[ID_FIELD_ELEVATION] = ValueFactory.createValue(auxE); |
687 | 687 |
} |
688 | 688 |
double auxT = Double.parseDouble(fea.getProp("thickness")); |
689 |
feature.set(ID_FIELD_THICKNESS,auxT); |
|
689 |
feature.setAttribute(ID_FIELD_THICKNESS,auxT);
|
|
690 | 690 |
// auxRow[ID_FIELD_THICKNESS] = ValueFactory.createValue(auxT); |
691 | 691 |
// Attributes |
692 | 692 |
for (int j = 0; j < nAtt; j++) { |
693 | 693 |
String[] attributes = new String[2]; |
694 | 694 |
attributes = (String[]) featureMaker.getAttributes().get(j); |
695 |
feature.set(10+j,attributes[1]); |
|
695 |
feature.setAttribute(10+j,attributes[1]);
|
|
696 | 696 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
697 | 697 |
// attributes[1])); |
698 | 698 |
if (!fea.getProp(attributes[0]).equals(attributes[1])) { |
699 |
feature.set(10+j,fea.getProp(attributes[0])); |
|
699 |
feature.setAttribute(10+j,fea.getProp(attributes[0]));
|
|
700 | 700 |
// auxRow[10 + j] = ValueFactory.createValue(new String( |
701 | 701 |
// fea.getProp(attributes[0]))); |
702 | 702 |
} |
Also available in: Unified diff