Documentation

MultiInstance extends Event
in package
implements IteratorAggregate

PHP library to access FDSN Webservices and request Event (earthquake) information in text format

Tags
see
https://www.fdsn.org/webservices/fdsnws-event-1.2.pdf

FDSN official documentation

Table of Contents

Interfaces

IteratorAggregate

Constants

basePath  = 'https://%s/fdsnws/event/1'
defaultFdsnServer  = 'webservices.ms.ingv.it'
fdsnSupportedVersion  = '^1.'

Properties

$arrayOfResults  : array<string|int, mixed>
$counter  : int
$eventList  : string
$fdsnServer  : string
$parameters  : array<string|int, mixed>
$url  : string
$version  : string
$webserviceFullPath  : string
$dateTimeRange  : DateTimeRange
$depthRange  : DepthRange
$latlon  : LatLon
$magnitudeRange  : MagnitudeRange
$radiusRange  : RadiusRange
$square  : LatLonRange

Methods

__construct()  : mixed
addFilterByBoundingBox()  : void
Add filter based on geographical selection
addFilterByDateTimeRange()  : void
Add filter based on datetime range
addFilterByDepthRange()  : void
Add filter based on depth range
addFilterByMagnitudeRange()  : void
Add filter based on magnitude range
addFilterByRadiusRange()  : void
Add filter based on latlon->radius
fetch()  : int
Apply all filter and DO the request to the Official ONT Webservice
getIterator()  : array<string|int, mixed>
Iterate over catalogis found
numRows()  : int
Return the number of elems found
version()  : string
Get FDSN running version
formatIsValid()  : bool
Check if format set is valid
getFetch()  : string
Fetch data from selected FDSN server
parse()  : int
Loop over found elems found (in text format) and convert the to \Fdsn\DataStructure\Quake obj

Constants

basePath

public Base basePath = 'https://%s/fdsnws/event/1'

URL to compile with FDSN server url

defaultFdsnServer

public Default defaultFdsnServer = 'webservices.ms.ingv.it'

server url

fdsnSupportedVersion

public Max fdsnSupportedVersion = '^1.'

supported version

Properties

$arrayOfResults

protected array<string|int, mixed> $arrayOfResults = array()

$counter

protected int $counter = 0

$parameters

protected array<string|int, mixed> $parameters = array()

$webserviceFullPath

protected string $webserviceFullPath

Methods

__construct()

public __construct(string $format, string|null $user[, string $fdns_server = Fdsnws_Webservice::defaultFdsnServer ]) : mixed
Parameters
$format : string
$user : string|null
$fdns_server : string = Fdsnws_Webservice::defaultFdsnServer

addFilterByBoundingBox()

Add filter based on geographical selection

public addFilterByBoundingBox(LatLonRange $square) : void
Parameters
$square : LatLonRange

Lat/Lon min -> Lat/Lon max

addFilterByDateTimeRange()

Add filter based on datetime range

public addFilterByDateTimeRange(DateTimeRange $dateTimeRange) : void
Parameters
$dateTimeRange : DateTimeRange

Datetime min -> Datetime max (default value is TODAY)

addFilterByDepthRange()

Add filter based on depth range

public addFilterByDepthRange(DepthRange $depthRange) : void
Parameters
$depthRange : DepthRange

Depth min -> Depth max

addFilterByMagnitudeRange()

Add filter based on magnitude range

public addFilterByMagnitudeRange(MagnitudeRange $magnitudeRange) : void
Parameters
$magnitudeRange : MagnitudeRange

Magnitude min -> Magnitude max

addFilterByRadiusRange()

Add filter based on latlon->radius

public addFilterByRadiusRange(LatLon $latlon, RadiusRange $radiusRange) : void
Parameters
$latlon : LatLon

lat/lon as coordinate to start search

$radiusRange : RadiusRange

radius min->max to search ( valid range [0:180] for both radius )

fetch()

Apply all filter and DO the request to the Official ONT Webservice

public fetch() : int
Return values
int

Return the number of elems found

getIterator()

Iterate over catalogis found

public getIterator() : array<string|int, mixed>
Return values
array<string|int, mixed>

array of \Fdsn\DataStructure\Catalog obj

numRows()

Return the number of elems found

public numRows() : int
Return values
int

The number of elems found

version()

Get FDSN running version

public version() : string
Return values
string

FDSN running version (trimmed by newline)

formatIsValid()

Check if format set is valid

protected formatIsValid(string $format) : bool
Parameters
$format : string
Return values
bool

format is valid?

getFetch()

Fetch data from selected FDSN server

protected getFetch(string $url) : string
Parameters
$url : string
Return values
string

downloaded string

parse()

Loop over found elems found (in text format) and convert the to \Fdsn\DataStructure\Quake obj

protected parse(string $response) : int
Parameters
$response : string
Return values
int

        
On this page

Search results