-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
contour problems at antimeridian line #25
Comments
My guess is that the shift comes from beveling at the edges #4 because the contour algorithm must contain the polygon with the grid. In GeoTIFF Contours II, I map x = [0, n] in the source raster to [-180, +180]. Is it possible you’re mapping from x = [0, n - 1] instead? |
No I don't think so and moreover I have also noticed the problem directly from the GeoTIFF Contours II example. I have just updated my repo because a file was missing to test the netcdfjs_05.html |
Try to analyze this problem. The geoStitch algorithm does correct the fact that the 2 polygons are separated by the antimeridian line and should be considered as one unique polygon but it leaves 2 small up and down stitches that should not be there. A solution could be to run d3-contour with duplicates columns at start and end of the array but my tries are not successfull for now. |
my solution is to remove the shared points from the stitched polygons |
Updated example: https://observablehq.com/@d3/geotiff-contours-ii |
Starting from GeoTIFF Contours II (https://bl.ocks.org/mbostock/83c0be21dba7602ee14982b020b12f51), I have tested direct reading from netCDF files (the standard of all Climate Models from IPCC and all Earth System Modeling community). See https://github.com/PBrockmann/D3_netcdfjs and try netcdfjs_05.html
It sounds very promissing. So a great great thank for this d3.contour module !
In my dreams, I would also like to get a raster pixels rendering as in http://geoexamples.com/d3-raster-tools-docs/code_samples/raster-pixels-page.html but that is another story. Is there an official d3 to do that BTW ?
The problem with d3.countour in a geo context is that some contours at antemeridian line are shifted either up or down.

See:
The map get from netcdfjs_05.html is zoomable so the problem can clearly be seen.
I haven't been able to find where this shift comes from ?
Any help welcomed on this topic that could help a huge community.
The text was updated successfully, but these errors were encountered: