We're just at the stage of starting to developing a GIS application accessible through a web front end. We're thinking of using the boundless stack which includes GeoServer and PostGIS.

One of our key requirements is having bespoke combinations of objects visible to each user. These can combinations of any type of object, which I expect would all exist across several layers in a mapping system.

My question is, how best to manage this high number of unique views? There can be a very high number of objects that make up one view, while another might have quite a small number, so I'd expect some form of caching will be necessary for performance and drawing them "on the fly" will be too slow. But my understanding of caching is that it will only be beneficial or practical if the same view is seen by number of users.

We have around 100,000 different objects (about half are vectors and half points) to give you a clue of the scale of data and some users will have access to all of it while others only a section.

The definitions of what objects are available to each user are already stored as queries in a relational database, so can potentially pass them over as a list of object ids if that's the right way to do things.

I have two ideas about how to solve this:

  1. Break these definitions down into tiles at a certain zoom level, so all the unique user access will be a list of tiles. This will have the disadvantage that the smallest section we can filter by is the size of a tile and other objects we might not have wanted them to have access to are shown.
  2. Have a general low detail view that everyone sees and some user interaction is performed to see which part they want to see in detail and this can be drawn "on the fly". This will mean only a small number of objects is drawn at the time so performance isn't too bad but will also mean they can't see everything they have access to at one time.

Or a combination of the two.

I'm really after a pointer in the right direction as am pretty new to developing G.I.S. software rather than a complete solution. I just want to check whether I'm on the right track.

Thanks very much.

edit: changed client to users

1 Answer 1


You have two options to achieve what you want:

  1. Use WMS Layers to server the data and have some logic in your Client that describes the needed data in the WMS Url. Geoserver then draws the layer and servers it back as tiles. GeoServer provides the filter, cql_filter and env extensions that allow you to specify in your WMS call what is displayed as the layer is drawn. These are implemented in the SLD files applied as the layer is created. It would not be appropriate to use any tile caches with this option.
  2. Have a base layer (OSM, Google, etc) and use an AJAX call to request the points from yur database. Your server would execute the appropriate query and serve back the selected points and lines as GeoJson or KML, etc which you would then load into a Vector Layer on your Client and style as you needed.

Some points to consider:

Bandwidth: Sending a ton of GeoJson or KML could end up being a bandwidth hog.
Client Performance: Trying to lod and style over 1000 points on OpenLayers (if you use that) is problematic and will lead to significant browser slowdowns.
Views: You mention the use of Views, the management of these would obviously be quite complex. Structuring your database and passing filters specific to a user in WMS calls maybe a more effective way of deciding what data to display and probably a lot more efficient.
Efficiency: When configured correctly, GeoServer is very efficient. The correct implementation of GeoSpatial Indexes, etc on the databases would make it quite viable to use WMS layers created on the fly, unless your number of on line users were significant.

  • I see, that's great great to know some of the specific approaches and that my thinking is roughly on the right track. We won't have a great number of users online at one time I think so perhaps the WMS layers idea is something we should consider creating these things on the fly except for our base map. This would mean we don't have to compromise any functionality and would just need to work on indexing and configuring GeoServer correctly.
    – Michael
    Commented Nov 20, 2013 at 16:27
  • The key to the WMS option working is the correct database structure. For example, you could add another column with a list of users who should see that particular point/polygon/line and supply the user id in the WMS querystring an then use that as one of your filters in SLD. Index everything. Commented Nov 20, 2013 at 17:59
  • Okay, I've got some of our data working now as a WMS with caching turned off. Performance seems fine. Just have to figure out the SLD bit now. I'll post this as a new question if I get stuck though. Thanks!
    – Michael
    Commented Nov 21, 2013 at 17:30
  • 1
    I've actually ended up using SQL Views passing the user's session as a view parameter and the database returning the objects the user has permission for to geoserver. Everything seems to be performing well! SLD seemed to be more about conditional styles than filtering when I looked into it unless I missed something.
    – Michael
    Commented Dec 12, 2013 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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