Frequently Asked Question
Symptom
- When using a geojson map file built with WGS84 coordinates in Webi, the mao may be "stretched".
- To get a more "real" view, you need to reproject your map (through QGIS for instance) in order to use it in your mapline/drillmap components
Environment
- QGIS v3.x
- Need4Viz : all versions
Cause
N4V offline map components cannot project map themselves so a pre-projection need to be provided inside the geojson file.
Resolution
To reproject your map (built with WGS84 coordinates), open the file in QGIS :
Choose the "Reproject Layer" tool:
Choose a target projection (for european countries, choose for example the "Lambert 93 projection) :
Then Run and Close.
Export the Reprojected layer :
Save the features in a new json file :
Use the reprojected geojson to build your N4V map.
Enrich the properties of the map with the "hc-transform" property. The value for this property can be found in QGIS. Open the Project properties / CRS panel, then choose the projection Lambert 93. In the bottom window, you'll find the "proj4" value corresponding to your projection. This is the value you need to fill in the hc-transform property of your map :
Once the map is achieved, you should see a correct projected view in Webi :