Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My question is how best to decide which layer (from a set of nested, aggregated census polygons) to display for any given map extent in an online map.

Australia's census boundaries are built from multiple layers, aggregated from highly detailed collection districts through a number of intermediate layers to eventually comprise the whole country. This same principle applies to city/county/state/country boundaries.

Switching census layers based on scale dependency is unsatisfactory, since there must be a compromise between the populated cities and the vastly empty interior. Eg, over Sydney the Collection Districts should show at around 1:10k whereas in rural areas they should show above 1:500k

1) Are there any examples available in online maps where this problem has been solved elegantly? All of the examples I've seen use scale dependencies to switch layers on/off

2) I'm contemplating counting the features every time the map extent changes, and using this to decide which is the best layer to display. This "breaks" the traditional GIS paradigm whereby layers can switch on/off based on scale, since in my scenario they may also switch on/off based on different map extents at the same scale.

Are there any examples of this in action? Does anyone have any thoughts or advice on whether this will be confusing to the user?

Eg, a user might be viewing Collection Districts, then pan the map slightly. This could cause the Collection Districts to switch off, and the next layer to switch on. Has this been done anywhere before?

Thanks, Steve

I've put a sample map at showing the direction I'm hoping to go. Note that this is a QA server so it may be slow, and not up 100% of the time.

Pan and zoom around the map down to street level, and note that the polygon boundaries change (if you open the Legend panel, you can see which of the 5 layers is currently displayed).

The boundary layer is chosen each time the map draws, based on the count of features rather than the scale (eg, a different boundary will draw over Sydney, compared to a rural area at the same scale). This can mean that panning the map results in the layer changing.

The idea is for this process to be transparent to the (novice) user, who should just see the "best" information wherever they browse.

My original question was whether the experts feel this "breaks" the traditional model of scale-dependent rendering. Does anyone have any feedback on whether this approach has merit or is flawed?

share|improve this question
As far as the application experience is considered, scale dependent display makes more sense. I didn't quite get the compromise can set the scale dependent display setting for individual layers and not the same setting for every layer. Regarding the feature counting approach, I feel it will seriously hamper the performance of your application and dampen user spirit as well as application, in addition to the points mentioned by you. – ujjwalesri Jun 6 '11 at 4:36
How about dividing your layers into an URBAN and RURAL, and then applying different scale dependencies? – geographika Jun 6 '11 at 8:44
@GEOGRAPHIKA: I think they're already in seperate stated by slead in the question. – ujjwalesri Jun 6 '11 at 11:31
@geographika is on the right track.Here's my site - a placename search on an urban area (…) shows the desired behaviour while a rural search (…) zooms you "inside" the polygon at the same scale. I'd like to show a more detailed census level in the rural area. – Stephen Lead Jun 6 '11 at 23:16
I'd prefer not to edit the layers to create urban/rural categories. Also, this wouldn't resolve the issue of changing the map on a pan from an urban to rural area. Surely this issue has occurred elsewhere around the world, eg a census map of the US would show the same density disparity between urban and rural? Thanks. – Stephen Lead Jun 6 '11 at 23:22

I have displayed different census layers simply by making all the large one's hollow and using different border weights.

This means that SLAs have a thick dashed boundary, while Suburbs are thinner and light grey, say, and CDs may be coloured by population or whatever.

share|improve this answer
That's a good approach - for a site aimed at GIS experts. Since my site is aimed at non-expert users, I'd still prefer to do something based on the complexity/density of the areas. I'm currently doing some testing and hope to have a test URL for comment shortly. – Stephen Lead Jun 20 '11 at 2:31
I've put a sample map at… showing a prototype. It changes the layers based on count rather than scale. Is this a valid way to change the layers? – Stephen Lead Jun 24 '11 at 0:40

I recently used the same approach that you describe:

2) I'm contemplating counting the features every time the map extent changes, and using this to decide which is the best layer to display. This "breaks" the traditional GIS paradigm whereby layers can switch on/off based on scale, since in my scenario they may also switch on/off based on different map extents at the same scale.

In our case, we checked the zoom level that the user was at (we were using the google maps api v3), and then chose to display data for that scale using an if/else statement. I feel that this is quite intuitive for users, as they already understand that aerial data is available at different scales when looking at urban or rural areas.

share|improve this answer
sounds great - is there a URL that you can share? Or failing that, can you post screenshots? – Stephen Lead Jun 20 '11 at 23:22
up vote 0 down vote accepted

I haven't received a 100% satisfactory reply, so I guess I'll take my current implementation as the answer.

Each time the map extent changes, the number of features in the most detailed layer is counted. If this crosses a threshold then the next level up is tested, and so on.

The performance seems reasonable - by counting the centroids of the polygons, and drawing the polygons as Dynamic Layers, the drawing time is on par with the Bing basemap.

I believe this results in the best layer being shown at any scale, and any extent. As for breaking the paradigms - I'm happy to be a trail blazer.

Happy to take any comments or feedback.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.