OS OpenSpace [logo]

OS OpenSpace Forum » OS OpenSpace » OpenSpace Forum

Thread: Boundary zoom levels - request

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 12 - Pages: 1 - Last Post: 11-Apr-2012 23:34 by: simonfitz
hillbagging

Posts: 29
Registered: 04/02/08
Boundary zoom levels - request
Posted: 13-May-2009 11:55
  Click to reply to this thread Reply

I'm enjoying playing with the boundary layer provided in the new version of the API. Would it be possible to make some of the boundaries visible at lower zoom levels? For example Counties, Metropolitan Districts and Unitary Authorities (CTY, MTD, UTA) at level 1, and London Boroughs (LBO) at level 3,4,5. This would not require greater resolution, so I'd have thought it should be possible. At the moment you can't fit a lower level map showing all the above on a webpage.

OS OpenSpace Team

Posts: 1,112
Registered: 31/01/08
Re: Boundary zoom levels - request
Posted: 14-May-2009 12:28   in response to: hillbagging
  Click to reply to this thread Reply

Hi

The availability of AREA_CODE by zoom level as detailed in the look-up table;

http://openspace.ordnancesurvey.co.uk/openspaceforum/thread.jspa?threadID=257&tstart=0

will remain as is for now because some boundaries at lower zoom levels will get quite small and so start to become unsuitable. We also want to monitor performance and usage over a period of time but if we can improve it later on we will.

Thanks for the feedback - let us know what sort of thing you want to use boundary data for?

hillbagging

Posts: 29
Registered: 04/02/08
Re: Boundary zoom levels - request
Posted: 14-May-2009 21:49   in response to: OS OpenSpace Team
  Click to reply to this thread Reply

My website has pages depicting the highest point in each County, Metropolitan District, Unitary Authority and London Borough. I intend to use the boundary layers for each of these area types to enhance the appearance and usefulness of these pages.

To illustrate, here are my existing pages which use Google Maps with a crude and not very scalable image layer for the boundaries...

http://www.hill-bagging.co.uk/CountyTops.php
http://www.hill-bagging.co.uk/LondonBoroughs.php

And here is what I have so far using OS OpenSpace...

http://www.hill-bagging.co.uk/CountyTopsOS.php
http://www.hill-bagging.co.uk/LondonBoroughsOS.php

As you can see, the boundary layers do not display at the initial zoom level. For County Tops you have to zoom in one level, and for London Boroughs you have to zoom in twice to see the LBO boundaries. So you can't get a good overview with the current availabilities.

WiseOwl

Posts: 1
Registered: 31/07/09
Re: Boundary zoom levels - request
Posted: 06-Jan-2011 12:24   in response to: OS OpenSpace Team
  Click to reply to this thread Reply

Hi,

Has there been any further thought to altering the zoom levels for boundaries. I've produced a thematic map for the 33 boroughs in London but the "LBO" layer does not appear until zoom level 6, so it's not possible to view all LBs in Greater London? It would be useful if the "LBO" layer appeared at the same scale as "DIS" (level 5).

Thanks.

neontribe

Posts: 1
Registered: 27/10/10
Re: Boundary zoom levels - request
Posted: 27-Jun-2011 13:04   in response to: hillbagging
  Click to reply to this thread Reply

I'd support WiseOwl and hillbagging very strongly in this, particularly in regard to LBO boundaries.

Currently I'm afraid I'm going to be asked to switch away from OpenSpace because of the difficulty of showing a thematic map of London coloured with data from the different boroughs. This is especially frustrating when the API is so eminently capable of performing this task.

OS OpenSpace Team

Posts: 1,112
Registered: 31/01/08
Re: Boundary zoom levels - request
Posted: 29-Jun-2011 08:34   in response to: WiseOwl
  Click to reply to this thread Reply

Hi

Thank you for your posts and feedback.

Currently this is not possible however, I will add this to my issues log to have further discussions for future recommendations and development.

Many thanks

Tamsyn
OS OpenSpace Team

paulweb2

Posts: 12
Registered: 30/09/11
Re: Boundary zoom levels - request
Posted: 20-Oct-2011 16:16   in response to: OS OpenSpace Team
  Click to reply to this thread Reply

Any update on this? LBOs are a good case in point, as they really should show up at the same levels as DIS. But in general wouldn't it be better to allow developers to specify programmatically what boundary line boundaries appear at what zoom levels? Or is this already possible in a function called after the 'zoomend' event?

OS OpenSpace Team

Posts: 1,112
Registered: 31/01/08
Re: Boundary zoom levels - request
Posted: 21-Oct-2011 09:42   in response to: paulweb2
  Click to reply to this thread Reply

Hi Paul,

Thank you for your post, we are investigating this issue and will be in touch with more details shortly.

In the mean time all the look-ups and details of what boundaries appear at what zoom level are situated here: https://openspace.ordnancesurvey.co.uk/openspaceforum/thread.jspa?threadID=257&tstart=0

Kind regards

Tamsyn
OS OpenSpace Team

paulweb2

Posts: 12
Registered: 30/09/11
Re: Boundary zoom levels - request
Posted: 28-Feb-2012 13:34   in response to: OS OpenSpace Team
  Click to reply to this thread Reply

Is it looking like it won't be possible to determine what boundaries appear/disappear at the various zoom levels any time soon?

I've now run into another issue that's connected to this i.e. originally I just thought it was desirable to have maps that could show the county and district boundaries at, for example, level 1 and 2, as it looks good and gives a great overview of the mapped data. And also it would allow us to display LBOs at the same time as Districts etc.

But, on top of this, I've now run into a use case where I want a thematic map that displays color-coded boundaries such as county and district. But, because it's almost always desirable to show the underlying base-map layer, each boundary uses an opacity of approx '0.7'. (Like your example thematic map (but that only uses regions so isn't affected)). However, because at some zoom levels both boundaries are 'on', this messes with the color of the top boundary i.e. in this case a district.

Have you any idea how I might tackle this without slowing down the app too much? Is it necessary/possible to load from file what boundaries should appear at each level, if that's, the API would allow that boundary to appear, at that level, if you set it to?

Just to recap: when a low-level boundary, such as district, first appears I don't want the color from the still underlying county boundary to 'pollute' its color. The colors are always meaningful and so need to be true. And going to fully opaque isn't ideal as you lose any sense of place.

paulweb2

Posts: 12
Registered: 30/09/11
Re: Boundary zoom levels - request
Posted: 28-Feb-2012 16:49   in response to: paulweb2
  Click to reply to this thread Reply

OK, I've found the solution to the second part of my request i.e. how to stop the boundaries stacking on top of each other and, if their opacity isn't at 1, affecting the display colour of the top boundaries.

If we take the OpenSpace example of a thematic map here: http://openspace.ordnancesurvey.co.uk/openspace/example14.html then in the 'context' function (it's the first thing inside createBoundaryLayer()) that gets passed each 'feature' which, in this case, would be each of the boundaries you've asked the Boundary object to display by passing it the area_codes, you could put a switch statement like this:

//make sure there's no 'stacking' of layers (only matters when opacity's not 1 and colour matters)
switch(osMap.getZoom())
{
case 2:
//switch off 'EUR' as 'CTY' level boundaries appear
if(feature.attributes["AREA_CODE"] == "EUR") {
value = {"MY_VALUE": 0};
}
break;
case 3:
//switch off 'CTY' as 'DIS' appear
if(feature.attributes["AREA_CODE"] == "EUR" || feature.attributes["AREA_CODE"] == "CTY") {
value = {"MY_VALUE": 0};
}
break;
case 4:
if(feature.attributes["AREA_CODE"] == "EUR" || feature.attributes["AREA_CODE"] == "CTY") {
value = {"MY_VALUE": 0};
}
break;
case 5:
if(feature.attributes["AREA_CODE"] == "EUR" || feature.attributes["AREA_CODE"] == "CTY") {
value = {"MY_VALUE": 0};
}
break;
case 6:
//switch off 'GLA' as 'LBO' appear
if(feature.attributes["AREA_CODE"] == "EUR" || feature.attributes["AREA_CODE"] == "CTY"
|| feature.attributes["AREA_CODE"] == "GLA") {
value = {"MY_VALUE": 0};
}
break;
//add some more if Ward level boundaries are used
default:
break;
}

Also immediately prior to this I now include this:

//catch any missing boundaries i.e. those you might have forgot to put in your the input file
if (value == undefined) {
var value = {"MY_VALUE": 0};
}

As I found that if any boundaries were missing in the text file they were read in from then all boundaries would disappear. So to stop this you needed to ensure even individual boundaries that weren't going to be used i.e Essex in 'CTY' had a default value set. But now it doesn't matter, any missing are just set to 0 and there's no rule for this value so the boundary is displayed without a colour which in a thematic map is the same (almost) as not being there at all.

But it would still be nice to have full control of what boundaries appear when?

simonfitz

Posts: 2
Registered: 04/03/12
Re: Boundary zoom levels - request
Posted: 06-Mar-2012 21:15   in response to: paulweb2
  Click to reply to this thread Reply

Just to echo previous requests, I would like the ability to display all local authorities (or even all London boroughs) in one go. Is this likely to be possible as some point?

The alternative for me is to simply use OpenSpace as a map backdrop and overlay image files that contain my themed data. Users could then control the image transparency to reveal the location context. Not ideal as I'd rather pass the data to style a boundary rather than create image tiles.

OS OpenSpace Team

Posts: 1,112
Registered: 31/01/08
Re: Boundary zoom levels - request
Posted: 11-Apr-2012 10:56   in response to: simonfitz
  Click to reply to this thread Reply

Hi 'simonfitz'

Thank you for your post.

We have received this request on several occasions and we have added it to the RoadMap for further investigation, the reason we do not currently allow this is the impact it would have on performance both server and customer side but we are going to discuss this in more detail as part of the future web service enhancements and will investigate the possibilities that are available.

Many thanks

Tamsyn
OS OpenSpace Team

simonfitz

Posts: 2
Registered: 04/03/12
Re: Boundary zoom levels - request
Posted: 11-Apr-2012 23:34   in response to: OS OpenSpace Team
  Click to reply to this thread Reply

Hi Tamsyn

Cheers for the update. I understand the performance considerations so I hope the future investigations prove successful!

Thanks

Simon

Legend
Expert: 51 - 1000 pts
Advanced: 31 - 50 pts
Intermediate: 16 - 30 pts
Novice: 5 - 15 pts
Newbie: 0 - 4 pts
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums