libsim Versione 7.2.4

◆ 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
thisarray object in which an element has to be removed
[in]nelemnumber of elements to remove, if not provided, a single element is removed
[in]posposition 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]posif 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 533 del file georef_coord_class.F90.

538ENDIF
539
540
541END SUBROUTINE georef_coord_array_import
542
543
544! internal method for exporting a single shape
545SUBROUTINE georef_coord_array_export(this, shphandle, nshp)
546TYPE(georef_coord_array),INTENT(in) :: this
547TYPE(shpfileobject),INTENT(inout) :: shphandle
548INTEGER,INTENT(IN) :: nshp ! index of shape to write starting from 0, -1 to append
549
550INTEGER :: i
551TYPE(shpobject) :: shpobj
552
553IF (ALLOCATED(this%coord)) THEN
554 IF (ALLOCATED(this%parts)) THEN
555 shpobj = shpcreateobject(this%topo, -1, SIZE(this%parts), this%parts, &
556 this%parts, SIZE(this%coord), this%coord(:)%x, this%coord(:)%y)
557 ELSE
558 shpobj = shpcreatesimpleobject(this%topo, SIZE(this%coord), &
559 this%coord(:)%x, this%coord(:)%y)
560 ENDIF
561ELSE
562 RETURN
563ENDIF
564
565IF (.NOT.shpisnull(shpobj)) THEN
566 i = shpwriteobject(shphandle, nshp, shpobj)
567 CALL shpdestroyobject(shpobj)
568ENDIF
569
570END SUBROUTINE georef_coord_array_export
571
572
583SUBROUTINE arrayof_georef_coord_array_import(this, shpfile)
584TYPE(arrayof_georef_coord_array),INTENT(out) :: this
585CHARACTER(len=*),INTENT(in) :: shpfile
586
587REAL(kind=fp_d) :: minb(4), maxb(4)
588INTEGER :: i, ns, shptype, dbfnf, dbfnr
589TYPE(shpfileobject) :: shphandle

Generated with Doxygen.