libsim Versione 7.2.6
|
◆ arrayof_georef_coord_array_delete()
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.
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
614!> Export an array of \a georef_coord_array objects to a file
615!! in ESRI/Shapefile format. All the \a this%arraysize shapes
616!! contained in \a this are exported to the requested
617!! shapefile. Topology information and possible polygon parts are
618!! exported as well, while projection information is ignored.
619SUBROUTINE arrayof_georef_coord_array_export(this, shpfile)
620TYPE(arrayof_georef_coord_array),INTENT(in) :: this !< array object to be exported
621CHARACTER(len=*),INTENT(in) :: shpfile !< name of shapefile (with or without extension)
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
646!> Determines whether the point \a this lies inside the polygon \a poly.
647!! The polygon is forced to be closed if it is not already the case,
648!! and there is no check about the topology of \a poly to really be of
649!! polygon type. It works also with polygons in parts (as from
650!! shapefile specification) defining either multiple polygons or
651!! polygons with holes.
652!!
|