Skip to content

Commit

Permalink
Merge pull request #34 from PDOK/pdok-15939-viewer-mist-service_2
Browse files Browse the repository at this point in the history
Pdok 15939 viewer mist service 2
  • Loading branch information
rahmabPublic authored Jan 29, 2024
2 parents e7fa3af + 0b8941f commit bb2f862
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ options:
1. To generate a list of layers per service run the following:

```sh
ngr-spider layers -p 'OGC:WMS,OGC:WMTS' -m services pdok-services.json
ngr-spider layers -p 'OGC:WMS,OGC:WMTS' pdok-services.json
ngr-spider services -p 'OGC:WMS,OGC:WMTS' pdok-services.json

```

## Development
Expand Down
8 changes: 2 additions & 6 deletions ngr_spider/csw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ def _get_csw_records(

records = [CswServiceRecord(rec[1].xml) for rec in csw.records.items()]
result.extend(records)
if (
maxresults != 0 and len(result) >= maxresults
): # break only early when maxresults set
break
if csw.results["nextrecord"] != 0:
if csw.results["nextrecord"] != 0 and (maxresults == 0 or len(result) < maxresults):
start = csw.results["nextrecord"]
continue
result_out: list[CswServiceRecord] = result
Expand All @@ -75,7 +71,7 @@ def _get_csw_records_by_protocol(
max_results: int = 0,
no_filter: bool = False,
) -> list[CswServiceRecord]:
protocol_key = "protocol"
protocol_key = "OnlineResourceType"
if (
protocol == OAT_PROTOCOL
): # required since NGR does not support OGC API TILES as a seperate protocol
Expand Down

0 comments on commit bb2f862

Please sign in to comment.