carbonplan / glsl-geo-projection

shader math for geographic projections
Other
27 stars 1 forks source link

tests #1

Open freeman-lab opened 3 years ago

freeman-lab commented 3 years ago

I'd like to add tests showing that these equations produce identical results as the functions from d3-geo and d3-geo-projection that they are based on. Unit testing GLSL is non-trivial, so we'll need to get creative.

For some simple test data, we can compare, for each projection, rendering results with these equations via WebGL and rendering the same target via SVG or Canvas with the JavaScript versions.

Test data could include graticule lines (for forward equations) and some simple raster (for inverse equations).

TomBor commented 1 year ago

d3 as a function geoProject in d3-geo-projection to pre-project a geojson. Maybe it could help compare result of both equations in the same render environment.