libsim Versione 7.1.11
|
◆ arrayof_georef_coord_array_remove()
Method for removing elements of the array at a desired position. If necessary, the array is reallocated to reduce space.
Definizione alla linea 539 del file georef_coord_class.F90. 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
590
591shphandle = shpopen(trim(shpfile), 'rb')
592IF (shpfileisnull(shphandle)) THEN
593 ! log here
594 CALL raise_error()
595 RETURN
|