|
◆ arrayof_georef_coord_array_remove()
subroutine arrayof_georef_coord_array_remove |
( |
type(arrayof_georef_coord_array) |
this, |
|
|
integer, intent(in), optional |
nelem, |
|
|
integer, intent(in), optional |
pos, |
|
|
logical, intent(in), optional |
nodestroy |
|
) |
| |
Method for removing elements of the array at a desired position.
If necessary, the array is reallocated to reduce space.
- Parametri
-
| this | array object in which an element has to be removed |
[in] | nelem | number of elements to remove, if not provided, a single element is removed |
[in] | pos | position of the element to be removed, if it is out of range, it is clipped, if it is not provided, objects are removed at the end |
[in] | pos | if provided and .TRUE. , the destructor possibily defined for the TYPE(georef_coord_array) is not called for every deleted object, may be useful if the objects to be deleted have been copied to another instance of arrayof_georef_coord_array and continue their life there |
Definizione alla linea 558 del file georef_coord_class.F90.
560 IF (.NOT.shpisnull(shpobj)) THEN 561 i = shpwriteobject(shphandle, nshp, shpobj) 562 CALL shpdestroyobject(shpobj) 565 END SUBROUTINE georef_coord_array_export 578 SUBROUTINE arrayof_georef_coord_array_import(this, shpfile) 579 TYPE(arrayof_georef_coord_array), INTENT(out) :: this 580 CHARACTER(len=*), INTENT(in) :: shpfile 582 REAL(kind=fp_d) :: minb(4), maxb(4) 583 INTEGER :: i, ns, shptype, dbfnf, dbfnr 584 TYPE(shpfileobject) :: shphandle 586 shphandle = shpopen(trim(shpfile), 'rb') 587 IF (shpfileisnull(shphandle)) THEN 594 CALL shpgetinfo(shphandle, ns, shptype, minb, maxb, dbfnf, dbfnr) 596 CALL insert(this, nelem=ns) 598 CALL georef_coord_array_import(this%array(i), shphandle=shphandle, nshp=i-1) 602 CALL shpclose(shphandle) 606 END SUBROUTINE arrayof_georef_coord_array_import Method for inserting elements of the array at a desired position.
Method for packing the array object reducing at a minimum the memory occupation, without destroying i...
|