Smart M.App discussions

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Staff
Posts: 106
Registered: ‎11-24-2015
Accepted Solution

Recommendations on GeoJSON usage

We have a potential customer for Smart M.Apps business intelligence mapping who have supplied datasets to us as Shapefiles.

In setting up a demo for them, and converting the shapefiles to geojson, the resulting geojson file can get quite large considering the number of polygons in the shapefile. The larger the geojson file the bigger the hit on performance loading the map and doing subsequent operations.

 

I have tried various things to reduce the size of the geojson, like reducing precision on coordinate values (decimal points), generalising the shape of the polygons, minifying the resulting text file...

 

Are there any other recommendations for improving performance for large datasets?

 

Thanks in advance

Highlighted
Technical Evangelist
Posts: 132
Registered: ‎08-05-2015

Re: Recommendations on GeoJSON usage

Hi Jonny,

 

In case your GeoJSON is being used for Business Intelligence maps, the rendering is dynamic and it uses SVG, what brings its own limitations.

The GeoJSON rendering performance is mainly affected by

  • the number of vertices
  • the number of polygons
We recommend that:
* the GeoJSON file doesn't exceed a few megabytes.
* it is minified
* it is generalized/simplified to fit actual context (so that it doesn't contain vertices that are not needed in zoom levels considered in the application)
 
In case we are talking about the BI scenario, it is also recommended to have a separate CSV file for tabular data so that the GeoJSON contains only essential data (for example used in tooltips).
 
The development is aware of GeoJSON limitations and the team is already working on a more service-oriented vector scenario (so that big datasets could be delivered from WFS and we could use spatial/attribute queries to filter our the data that are not needed).

 

Best regards

Highlighted
Staff
Posts: 106
Registered: ‎11-24-2015

Re: Recommendations on GeoJSON usage

Thanks Piotr!