Limit the AIS messages you receive if you're only interested in particular regions
Two Ways to Apply a Geographical Filter to the Messages API
If you're only interested in a particular region of the world and want to filter out everything else, we recommend using geographical filters. These filters are inclusive: any messages that fall on the border will be included.
Try it out within an API call
This can be done via the "position" API filter parameter. Here's an example: https://ais.spire.com/messages?fields=decoded&position={"type":"Polygon","coordinates":[[[135.25, -30], [135.25, 30.5], [170, 30.5], [170, -30], [135.25, -30]]]} .
Note 1: Make sure the definition of the polygon follows the "right-hand rule", otherwise your query may not work properly. We recommend testing your coordinates at geojson.io or GeoJSONLint to ensure it's formatted properly.
Note 1: Make sure that the first point of the polygon is repeated as the last point of the polygon to close it. The example below uses a valid GeoJson polygon but does not repeat the first point to close the polygon.
Make a request to the Spire Customer Experience team
If you are positively interested in a particular region of the earth, we're happy to place a geo-filter on your account. Once applied, the Messages API will only feed you AIS messages within the defined region.
Note: If you're using the TCP feed, the Customer Experience team will have to apply a geo-filter for you.