PHP 클래스 WkbPolyline, google-map-polyline-encoding-tool

An example class to convert well-known binary files to Google encoded strings This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see .
상속: extends Polyline
파일 보기 프로젝트 열기: emcconville/google-map-polyline-encoding-tool

보호된 프로퍼티들

프로퍼티 타입 설명
$cursor
$endianness
$fd

공개 메소드들

메소드 설명
encodeFromBlob ( string $blob ) : string Encoded WKB from blob
encodeFromFile ( string $filename ) : string Parse binary file & converts WKB to google encoded string.

보호된 메소드들

메소드 설명
chunk ( integer $size = 1 ) : string Pulls data directly from file descriptor by given length.
parseWkb ( ) : array Extract points from well-known binary
readByte ( ) : integer Read single byte from file descriptor.
readDouble ( ) : double Read 8 bytes and cast to double. Respects file endianness.
readU32 ( ) : integer Read 4 bytes and cast to unsigned integer. Respects file endianness.

메소드 상세

chunk() 보호된 메소드

Pulls data directly from file descriptor by given length.
protected chunk ( integer $size = 1 ) : string
$size integer - Default 1
리턴 string - Binary safe string.

encodeFromBlob() 공개 메소드

This method will copy the given blob to memory descriptor. There's better ways to do this.
public encodeFromBlob ( string $blob ) : string
$blob string - Binary safe string
리턴 string

encodeFromFile() 공개 메소드

Parse binary file & converts WKB to google encoded string.
public encodeFromFile ( string $filename ) : string
$filename string - The path to the binary file to be encoded.
리턴 string - Encoded string

parseWkb() 보호된 메소드

Extract points from well-known binary
protected parseWkb ( ) : array
리턴 array - Points found in binary

readByte() 보호된 메소드

Read single byte from file descriptor.
protected readByte ( ) : integer
리턴 integer - Order of byte.

readDouble() 보호된 메소드

Read 8 bytes and cast to double. Respects file endianness.
protected readDouble ( ) : double
리턴 double

readU32() 보호된 메소드

Read 4 bytes and cast to unsigned integer. Respects file endianness.
protected readU32 ( ) : integer
리턴 integer

프로퍼티 상세

$cursor 보호되어 있는 프로퍼티

protected $cursor

$endianness 보호되어 있는 프로퍼티

protected $endianness

$fd 보호되어 있는 프로퍼티

protected $fd