PHP 클래스 PMA\libraries\gis\GISPolygon

상속: extends PMA\libraries\gis\GISGeometry
파일 보기 프로젝트 열기: phpmyadmin/phpmyadmin 1 사용 예제들

공개 메소드들

메소드 설명
area ( array $ring ) : float Calculates the area of a closed simple polygon.
generateParams ( string $value, integer $index ) : array Generate parameters for the GIS data editor from the value of the GIS column.
generateWkt ( array $gis_data, integer $index, string $empty = '' ) : string Generate the WKT with the set of parameters passed by the GIS editor.
getPointOnSurface ( array $ring ) : array | void Returns a point that is guaranteed to be on the surface of the ring.
isOuterRing ( array $ring ) : boolean Determines whether a set of points represents an outer ring.
isPointInsidePolygon ( array $point, array $polygon ) : boolean Determines whether a given point is inside a given polygon.
prepareRowAsOl ( string $spatial, integer $srid, string $label, string $fill_color, array $scale_data ) : string Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
prepareRowAsPdf ( string $spatial, string $label, string $fill_color, array $scale_data, TCPDF $pdf ) : TCPDF Adds to the TCPDF instance, the data related to a row in the GIS dataset.
prepareRowAsPng ( string $spatial, string $label, string $fill_color, array $scale_data, object $image ) : object Adds to the PNG image object, the data related to a row in the GIS dataset.
prepareRowAsSvg ( string $spatial, string $label, string $fill_color, array $scale_data ) : string Prepares and returns the code related to a row in the GIS dataset as SVG.
scaleRow ( string $spatial ) : array Scales each row.
singleton ( ) : GISPolygon Returns the singleton.

비공개 메소드들

메소드 설명
__construct ( ) A private constructor; prevents direct creation of object.
_drawPath ( string $polygon, array $scale_data ) : string Draws a ring of the polygon using SVG path element.

메소드 상세

area() 공개 정적인 메소드

Calculates the area of a closed simple polygon.
public static area ( array $ring ) : float
$ring array array of points forming the ring
리턴 float the area of a closed simple polygon

generateParams() 공개 메소드

Generate parameters for the GIS data editor from the value of the GIS column.
public generateParams ( string $value, integer $index ) : array
$value string Value of the GIS column
$index integer Index of the geometry
리턴 array params for the GIS data editor from the value of the GIS column

generateWkt() 공개 메소드

Generate the WKT with the set of parameters passed by the GIS editor.
public generateWkt ( array $gis_data, integer $index, string $empty = '' ) : string
$gis_data array GIS data
$index integer Index into the parameter object
$empty string Value for empty points
리턴 string WKT with the set of parameters passed by the GIS editor

getPointOnSurface() 공개 정적인 메소드

(for simple closed rings)
public static getPointOnSurface ( array $ring ) : array | void
$ring array array of points forming the ring
리턴 array | void a point on the surface of the ring

isOuterRing() 공개 정적인 메소드

If points are in clockwise orientation then, they form an outer ring.
public static isOuterRing ( array $ring ) : boolean
$ring array array of points forming the ring
리턴 boolean whether a set of points represents an outer ring

isPointInsidePolygon() 공개 정적인 메소드

Determines whether a given point is inside a given polygon.
public static isPointInsidePolygon ( array $point, array $polygon ) : boolean
$point array x, y coordinates of the point
$polygon array array of points forming the ring
리턴 boolean whether a given point is inside a given polygon

prepareRowAsOl() 공개 메소드

Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
public prepareRowAsOl ( string $spatial, integer $srid, string $label, string $fill_color, array $scale_data ) : string
$spatial string GIS POLYGON object
$srid integer Spatial reference ID
$label string Label for the GIS POLYGON object
$fill_color string Color for the GIS POLYGON object
$scale_data array Array containing data related to scaling
리턴 string JavaScript related to a row in the GIS dataset

prepareRowAsPdf() 공개 메소드

Adds to the TCPDF instance, the data related to a row in the GIS dataset.
public prepareRowAsPdf ( string $spatial, string $label, string $fill_color, array $scale_data, TCPDF $pdf ) : TCPDF
$spatial string GIS POLYGON object
$label string Label for the GIS POLYGON object
$fill_color string Color for the GIS POLYGON object
$scale_data array Array containing data related to scaling
$pdf TCPDF TCPDF instance
리턴 TCPDF the modified TCPDF instance

prepareRowAsPng() 공개 메소드

Adds to the PNG image object, the data related to a row in the GIS dataset.
public prepareRowAsPng ( string $spatial, string $label, string $fill_color, array $scale_data, object $image ) : object
$spatial string GIS POLYGON object
$label string Label for the GIS POLYGON object
$fill_color string Color for the GIS POLYGON object
$scale_data array Array containing data related to scaling
$image object Image object
리턴 object the modified image object

prepareRowAsSvg() 공개 메소드

Prepares and returns the code related to a row in the GIS dataset as SVG.
public prepareRowAsSvg ( string $spatial, string $label, string $fill_color, array $scale_data ) : string
$spatial string GIS POLYGON object
$label string Label for the GIS POLYGON object
$fill_color string Color for the GIS POLYGON object
$scale_data array Array containing data related to scaling
리턴 string the code related to a row in the GIS dataset

scaleRow() 공개 메소드

Scales each row.
public scaleRow ( string $spatial ) : array
$spatial string spatial data of a row
리턴 array an array containing the min, max values for x and y coordinates

singleton() 공개 정적인 메소드

Returns the singleton.
public static singleton ( ) : GISPolygon
리턴 GISPolygon the singleton