2

I want to create an application displaying road network with traffic details.

I am using OpenLayers 3 and GeoServer 2.14 for this purpose. My data (stored in PostgreSQL+ PostGIS) has around half a million geometries (road network) which is published in Geoserver through SQL view. Geometry of the data is fixed but its attributes related to traffic are changing every 2 minutes. The approach we are currently using is slow. Is there any other option available to render data faster.

We have road network data with unique link id assigned to each road segment. There is one more column which stores speed data. According to the speed we display color of the road segment (red, orange, green etc.) on map using openlayers. This speed info updates every 2 min while road geometry is fixed. We have indexes built on the table. Currently we are fetching these details using SQL view using Geoserver where we are calling a function which fetches required data. For better performance we are also passing bbox (via view params) of tile into the function to fetch data of specific bbox only. This has improved the performance when data count is approx 2.5 lacs. Now the data count has just doubles and this approach is not working as expected.

  • 3
    I changed 5 lakh to half a million, as lakh is not widely understood outside of India. Could you explain a bit more about your approach, what you are trying to show and how it is not working. – John Powell Apr 30 at 9:11
  • how is your data structured? do you have indexes? – Ian Turton Apr 30 at 9:17
  • I have edited the question – Neha Sharma Apr 30 at 9:29
  • When I attempt to add 500,000 single segments linestrings to a layer it kills the browser (but 250,000 worked). I think you will need to revise your approach, display your road network as multisegment linestrings or multilinestrings and only return traffic data for segments which have non-default traffic conditions and display those over the default road network, or if that's not possible filter out the default conditions in the load function so they don't get added to the map. – Mike Apr 30 at 16:14
  • Is it possible in geoserver or openlayers 3 to update only attributes not geometry ?? – Neha Sharma May 1 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.