Earthworm messages can optionally be converted in JSON format. GeoJSON format could be also used but only when geographic references are directly or inderictely available for a specific message type.
Earthworm messages can optionally be converted in JSON format.
[[_TOC_]]
## Usage
`ew2openapi` can be used in two different ways:
- launched as an Earthworm module to redirect data into webservices or RabbitMQ
- stand-alone to convert Earthworm message to JSON ew2openapi format
1. Launched as an Earthworm module to redirect data into QuakeDB OpenAPI Webservices or RabbitMQ systems.
2. Stand-alone to convert Earthworm message to JSON ew2openapi format
#### ew2openapi as Earthworm module
#### Earthworm module
```sh
ew2openapi ew2openapi.d
```
#### ew2openapi as stand-alone command-line conversion tool
@@ -168,7 +207,7 @@ Each Earthworm message is converted in a JSON object which contains all fields o
Example of TYPE_HEARTBEAT Earthworm message:
```
```json
{
"ewLogo":{
"type":"TYPE_HEARTBEAT",
...
...
@@ -189,7 +228,7 @@ Example of TYPE_HEARTBEAT Earthworm message:
Example of TYPE_ERROR Earthworm message:
```
```json
{
"ewLogo":{
"type":"TYPE_ERROR",
...
...
@@ -210,7 +249,7 @@ Example of TYPE_ERROR Earthworm message:
Example of TYPE_PICK_SCNL Earthworm message:
```
```json
{
"ewLogo":{
"type":"TYPE_PICK_SCNL",
...
...
@@ -242,7 +281,7 @@ Example of TYPE_PICK_SCNL Earthworm message:
Example of TYPE_LINK Earthworm message:
```
```json
{
"ewLogo":{
"type":"TYPE_LINK",
...
...
@@ -264,7 +303,7 @@ Example of TYPE_LINK Earthworm message:
Example of TYPE_QUAKE2K Earthworm message:
```
```json
{
"ewLogo":{
"type":"TYPE_QUAKE2K",
...
...
@@ -294,7 +333,7 @@ Example of TYPE_QUAKE2K Earthworm message:
Example of TYPE_HYP2000ARC Earthworm message:
```
```json
{
"ewLogo":{
"type":"TYPE_HYP2000ARC",
...
...
@@ -439,7 +478,7 @@ Example of TYPE_HYP2000ARC Earthworm message:
Example of TYPE_MAGNITUDE Earthworm message:
```
```json
{
"ewLogo":{
"type":"TYPE_MAGNITUDE",
...
...
@@ -539,7 +578,7 @@ Example of TYPE_MAGNITUDE Earthworm message:
Example of TYPE_STRONGMOTIONII Earthworm message:
```
```json
{
"ewLogo":{
"type":"TYPE_STRONGMOTIONII",
...
...
@@ -585,11 +624,11 @@ Example of TYPE_STRONGMOTIONII Earthworm message:
## GeoJSON Earthworm message conversion
GeoJSON conversion encapsulate JSON Earthworm message conversion within the field `properties` of a `FeatureCollection`.
GeoJSON conversion encapsulate JSON Earthworm message conversion within the field `properties` of a `FeatureCollection`. GeoJSON format can be used only when geographic references are available within a specific message type, or inderictely derived by a hypoinverse station file.