libsim Versione 7.2.1

◆ arrayof_georef_coord_array_delete()

subroutine arrayof_georef_coord_array_delete ( type(arrayof_georef_coord_array this,
logical, intent(in), optional  nodestroy,
logical, intent(in), optional  nodealloc 
)

Destructor for finalizing an array object.

If defined, calls the destructor for every element of the array object; finally it deallocates all the space occupied.

Parametri
thisarray object to be destroyed
thisif 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
[in]nodeallocif provided and .TRUE. , the space reserved for the array is not deallocated, thus the values are retained, while the array pointer is nullified, this means that the caller must have previously assigned the pointer contents thisarray to another pointer to prevent memory leaks

Definizione alla linea 596 del file georef_coord_class.F90.

601 CALL insert(this, nelem=ns)
602 DO i = 1, ns
603 CALL georef_coord_array_import(this%array(i), shphandle=shphandle, nshp=i-1)
604 ENDDO
605ENDIF
606
607CALL shpclose(shphandle)
608! pack object to save memory
609CALL packarray(this)
610
611END SUBROUTINE arrayof_georef_coord_array_import
612
613
619SUBROUTINE arrayof_georef_coord_array_export(this, shpfile)
620TYPE(arrayof_georef_coord_array),INTENT(in) :: this
621CHARACTER(len=*),INTENT(in) :: shpfile
622
623INTEGER :: i
624TYPE(shpfileobject) :: shphandle
625
626IF (this%arraysize > 0) THEN
627 shphandle = shpcreate(trim(shpfile), this%array(1)%topo)
628ELSE
629 shphandle = shpcreate(trim(shpfile), georef_coord_array_polygon)
630ENDIF
631IF (shpfileisnull(shphandle)) THEN
632 ! log here
633 CALL raise_error()
634 RETURN
635ENDIF
636
637DO i = 1, this%arraysize
638 CALL georef_coord_array_export(this%array(i), shphandle=shphandle, nshp=i-1)
639ENDDO
640
641CALL shpclose(shphandle)
642
643END SUBROUTINE arrayof_georef_coord_array_export
644#endif
645

Generated with Doxygen.