You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to their About page, the Woodland Trust manages "over 1000" woods in the UK.
We could ask them for a list of these woods. (Shapefiles would be even better – then we can calculate overlaps with constituencies and local authority boundaries.)
Or we could scrape the list from their website. Their "Find woods" page uses ajax to query a database of these woods. It’s clever enough to reject requests that don’t look like they’re coming from a browser, but if you call something like:
curl 'https://www.woodlandtrust.org.uk/umbraco/api/woodspages/SearchWoodsNearAll?lat=54.093409&lng=-2.89479&distance=999999' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0'
You get back a JSON object with 5000 items, that looks like:
I can’t guarantee this is a list of all woods, only the ones within a distance=999999 of Morecambe Bay, the centre of the UK. But upping the distance doesn’t increase the item count beyond 5000. Such a round number is suspicious, I expect we’re hitting an internal cap. Perhaps it might be worth trying coordinates at different ends of the country, and checking whether the same 5000 items are always returned.
We’d probably want to investigate what happens when items have a WoodsInGroup value higher than 1, and also what the different values are for Owner, IsWoodlandTrust, and ItemType.
The text was updated successfully, but these errors were encountered:
According to their About page, the Woodland Trust manages "over 1000" woods in the UK.
We could ask them for a list of these woods. (Shapefiles would be even better – then we can calculate overlaps with constituencies and local authority boundaries.)
Or we could scrape the list from their website. Their "Find woods" page uses ajax to query a database of these woods. It’s clever enough to reject requests that don’t look like they’re coming from a browser, but if you call something like:
You get back a JSON object with 5000 items, that looks like:
I can’t guarantee this is a list of all woods, only the ones within a
distance=999999
of Morecambe Bay, the centre of the UK. But upping the distance doesn’t increase the item count beyond 5000. Such a round number is suspicious, I expect we’re hitting an internal cap. Perhaps it might be worth trying coordinates at different ends of the country, and checking whether the same 5000 items are always returned.We’d probably want to investigate what happens when items have a
WoodsInGroup
value higher than1
, and also what the different values are forOwner
,IsWoodlandTrust
, andItemType
.The text was updated successfully, but these errors were encountered: