DataCoveEU / API4INSPIRE

Various resources pertaining to the usage of APIs within INSPIRE
5 stars 2 forks source link

API bbox and format request is not working properly (text/html) #138

Closed kgaeb closed 4 years ago

kgaeb commented 4 years ago

The following returns all features and doesn't honour the bbox http://localhost:8086/ogcapisimple/collections/Navaids/items?bbox=8,46,14,51&f=text%2Fhtml http://localhost:8086/ogcapisimple/collections/Navaids/items?bbox=8,46,14,51&f=text/html bbox not working, delivers all Navaids log file: 19:23:58.750 [http-nio-8080-exec-2] INFO com.inspire.development.database.connector.PostgreSQL - Requesting Collection: Navaidswith settings: limit=1, offset=10, bbox=null, witSpatial=false

TobiasPressler commented 4 years ago

Refering to #132

kgaeb commented 4 years ago

This is also the case for the following requests: http://localhost:8086/ogcapisimple/collections/Navaids/items?designator=GSB&f=text%2Fhtml http://localhost:8086/ogcapisimple/collections/Navaids/items?designator=GSB&f=text/html

kgaeb commented 4 years ago

http://localhost:8086/ogcapisimple/collections/Navaids/items?bbox=8,46,14,51&f=text%2Fhtml honours now the bbox, but the next button doesn't work (in total this should return 17 items)

TobiasPressler commented 4 years ago

The page is requesting a wrongly build URL from the server when clicking the next button. For example: http://localhost:8080/ogcapisimple/collections/Navaids/items?limit=10&offset=10&bbox=8%2C46%2C14%2C51?bbox=8%2C46%2C14%2C51

kgaeb commented 4 years ago

@LukasGaebler: please check again, if this is working correctly. Couldn't find anything wrong, except, that the link in the next/prev JSON is something like this: http://localhost:8086/ogcapisimple/collections/Navaids/items?limit=10&offset=0&offset=10&bbox=8%2C46%2C14%2C51&limit=10 Can you explain why "limit=10" is at the end again?

LukasGaebler commented 4 years ago

Before I opened the pull request it worked properly... but I will take a look at it

kgaeb commented 4 years ago

http://localhost:8086/ogcapisimple/collections/Navaids/items?bbox=8,46,14,51&f=text%2Fhtml honours now the bbox, but the next button doesn't work (in total this should return 17 items)

HTML still not working! JSON seems to be ok.

kgaeb commented 4 years ago

In principle the bug doesn't appear anymore. But there are the following questions left: 1) why is the limit/offset parameter appearing twice in the the delivered json data (see example below - SELF and NEXT)? 2) why is the offset parameter 10 and 0 (see example below - NEXT)?

Example: SELF: "http://localhost:8086/ogcapisimple/collections/Navaids/items?limit=10&offset=0&offset=0&bbox=8%2C46%2C14%2C51&limit=10" NEXT: "http://localhost:8086/ogcapisimple/collections/Navaids/items?limit=10&offset=10&offset=0&bbox=8%2C46%2C14%2C51&limit=10"

TobiasPressler commented 4 years ago

Fixed with #177

kgaeb commented 4 years ago

Yeah man!!! That's it! Thank you!