diff --git a/data/World/America/USA/fprn.json b/data/World/America/USA/fprn.json index 2421d39..5080ee1 100644 --- a/data/World/America/USA/fprn.json +++ b/data/World/America/USA/fprn.json @@ -12,16 +12,7 @@ "last_update": "2024-12-09", "streams": [ { - "filter": { - "lat_lon_bboxes": [ - [ - 167.65, - 14.92, - -63.88, - 74.71 - ] - ] - }, + "filter": "all", "crss": [ { "id": "EPSG:6319", diff --git a/dist/ntrip-catalog.json b/dist/ntrip-catalog.json index 1b5ed3f..fb488b1 100644 --- a/dist/ntrip-catalog.json +++ b/dist/ntrip-catalog.json @@ -3,6 +3,45 @@ "release": 0, "comment": "This file has been automatically generated by a script. Update the 'data' folder if any change is needed.", "entries": [ + { + "name": "AUSCORS", + "description": "Geoscience Australia AUSCORS NTRIP Broadcaster", + "urls": [ + "https://ntrip.data.gnss.ga.gov.au:443", + "http://ntrip.data.gnss.ga.gov.au:2101" + ], + "reference": { + "url": "https://gnss.ga.gov.au/stream", + "comments": "Also provides base stations outside of Australia" + }, + "last_update": "2025-01-13", + "streams": [ + { + "filter": { + "countries": [ + "AUS" + ] + }, + "crss": [ + { + "id": "EPSG:7843", + "name": "GDA2020" + } + ], + "comments": "Broadcast Coordinates: Stations within Australia - GDA2020" + }, + { + "filter": "all", + "crss": [ + { + "id": "EPSG:9989", + "name": "ITRF2020" + } + ], + "comments": "Broadcast Coordinates: Station outside of Australia - ITRF2020" + } + ] + }, { "name": "FPRN", "description": "Florida Primary Reference Network", @@ -16,16 +55,7 @@ "last_update": "2024-12-09", "streams": [ { - "filter": { - "lat_lon_bboxes": [ - [ - 167.65, - 14.92, - -63.88, - 74.71 - ] - ] - }, + "filter": "all", "crss": [ { "id": "EPSG:6319", @@ -146,6 +176,29 @@ } ] }, + { + "name": "SPSLUX", + "description": "Satellite Positioning System Luxembourg", + "urls": [ + "http://stream.spslux.lu:5005" + ], + "reference": { + "url": "https://act.public.lu/fr/gps-reseaux/spslux1/spsluxgeodeticdatum.html" + }, + "last_update": "2025-01-13", + "streams": [ + { + "filter": "all", + "crss": [ + { + "id": "EPSG:7931", + "name": "ETRF2000", + "epoch": 2020.82 + } + ] + } + ] + }, { "name": "Topnet Live Europe", "description": "Topcon NTRIP service in Europe", diff --git a/schemas/v0.1/entries.schema.json b/schemas/v0.1/entries.schema.json index 2f9802d..a4d37d6 100644 --- a/schemas/v0.1/entries.schema.json +++ b/schemas/v0.1/entries.schema.json @@ -52,7 +52,6 @@ "description": "Item to match a stream from the sourcetable with a CRS.", "properties": { "filter": { - "type": "object", "description": "Criterion to filter in the sourcetable", "oneOf": [ { @@ -63,6 +62,13 @@ }, { "$ref": "#/$defs/countries_def" + }, + { + "type": "string", + "enum": [ + "all" + ], + "description": "Matches all the streams. Use with caution." } ] }, @@ -168,6 +174,9 @@ }, "description": "Bounding box, in degrees, with the order: West, South, East, North." }, + "all_def": { + "type": "string" + }, "mountpoints_def": { "type": "object", "properties": { @@ -177,7 +186,7 @@ "items": { "type": "string" }, - "description": "Matches the 'Mountpoint' field in the Stream", + "description": "Matches the 'Mountpoint' field in the stream", "additionalProperties": false } }, @@ -211,7 +220,7 @@ "items": { "type": "string" }, - "description": "Matches the 'Country Code' field in the Stream" + "description": "Matches the 'Country Code' field in the stream" } }, "required": [ diff --git a/scripts/query.py b/scripts/query.py index 7452581..5f9b6af 100755 --- a/scripts/query.py +++ b/scripts/query.py @@ -86,6 +86,32 @@ def point_in_bbox(point_lat, point_lon, bbox): return point_lon >= bbox[0] and point_lon <= bbox[2] +def _crss_from_stream(stream, mountpoint, url, server_streams): + crss = stream["crss"] + stream_filter = stream["filter"] + if stream_filter == "all": + return crss + elif "mountpoints" in stream_filter: + if mountpoint in stream_filter["mountpoints"]: + return crss + else: + if not server_streams: + server_streams += get_streams_from_server(url) + line = get_str_line_from_server(server_streams, mountpoint) + if not line or len(line) < 10: + return None + country = line[8] + base_lat = float(line[9]) + base_lon = normalize_lon(float(line[10])) + + if country in stream_filter.get("countries", []): + return crss + + for bbox in stream_filter.get("lat_lon_bboxes", []): + if point_in_bbox(base_lat, base_lon, bbox): + return crss + + def filter_crs( json_entry, url, @@ -107,33 +133,10 @@ def filter_by_rover(crss): return crs return None - def crss_from_stream(stream, server_streams): - crss = stream["crss"] - stream_filter = stream["filter"] - if "mountpoints" in stream_filter: - if mountpoint in stream_filter["mountpoints"]: - return crss - else: - if not server_streams: - server_streams += get_streams_from_server(url) - line = get_str_line_from_server(server_streams, mountpoint) - if not line or len(line) < 10: - return None - country = line[8] - base_lat = float(line[9]) - base_lon = normalize_lon(float(line[10])) - - if country in stream_filter.get("countries", []): - return crss - - for bbox in stream_filter.get("lat_lon_bboxes", []): - if point_in_bbox(base_lat, base_lon, bbox): - return crss - server_streams = [*sourcetable_lines_splitted] if sourcetable_lines_splitted else [] for stream in json_entry["streams"]: - crss = crss_from_stream(stream, server_streams) + crss = _crss_from_stream(stream, mountpoint, url, server_streams) if crss: crs = filter_by_rover(crss) if crs: