|
◆ arrayof_georef_coord_array_delete()
subroutine, private georef_coord_class::arrayof_georef_coord_array_delete |
( |
type(arrayof_georef_coord_array) |
this, |
|
|
logical, intent(in), optional |
nodestroy, |
|
|
logical, intent(in), optional |
nodealloc |
|
) |
| |
|
private |
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
-
| this | array object to be destroyed |
| this | 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 |
[in] | nodealloc | if 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 621 del file georef_coord_class.F90.
621 IF (this%arraysize > 0) THEN 622 shphandle = shpcreate(trim(shpfile), this%array(1)%topo) 624 shphandle = shpcreate(trim(shpfile), georef_coord_array_polygon) 626 IF (shpfileisnull(shphandle)) THEN 632 DO i = 1, this%arraysize 633 CALL georef_coord_array_export(this%array(i), shphandle=shphandle, nshp=i-1) 636 CALL shpclose(shphandle) 638 END SUBROUTINE arrayof_georef_coord_array_export 652 FUNCTION georef_coord_inside(this, poly) RESULT(inside) 653 TYPE(georef_coord), INTENT(IN) :: this 654 TYPE(georef_coord_array), INTENT(IN) :: poly 660 IF (.NOT. c_e(this)) RETURN 661 IF (.NOT. ALLOCATED(poly%coord)) RETURN 663 IF (poly%bbox_updated) THEN 664 IF (.NOT.georef_coord_inside_rectang(this, poly%bbox(1), poly%bbox(2))) RETURN 667 IF ( ALLOCATED(poly%parts)) THEN 668 DO i = 1, SIZE(poly%parts)-1 669 inside = inside .NEQV. pointinpoly(this%x, this%y, & 670 poly%coord(poly%parts(i)+1:poly%parts(i+1))%x, & 671 poly%coord(poly%parts(i)+1:poly%parts(i+1))%y)
|