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
Is it possible to add a GeoTransform? #5
Comments
There are a lot of options for displaying GeoJSON while applying simple transformations in planar coordinates:
Here’s a live example of the surface temperature GeoTIFF using the first option: https://bl.ocks.org/mbostock/4886c227038510f1c103ce305bef6fcc If you want to convert from planar coordinates back to spherical coordinates, and then reproject those spherical coordinates using a different spherical-to-planar projection (say d3.geoOrthographic), it’s a bit tricker. You could either assume that the planar coordinates are equirectangular (d3.geoEquirectangular) and then treat them as x = longitude, y = latitude (perhaps with another simpler planar translate and scale), or you’d need to know the exact spherical projection in use and run it through project.invert. After that, you’d want to run it through d3.geoStitch to remove the antimeridian and polar cuts, and lastly run back through your new projection. |
Thank you! It's very simple, a very nice library. |
Here’s an example of reprojecting contours: |
Could you add an example for reprojecting contours when the source is a limited domain rather than 0,360 -90,90? |
I made a similar (worse) library some months ago: https://github.com/rveciana/raster-marching-squares
I don't find how to give d3-contour the geographical positions for the pixels, so it's possible to project the output isolines.
In GDAL they call it GeoTransform, which is simply the coordinates of the first pixel and the delta for each position in the x and y directions.
If a geotransform could be set, the output coordinates would be in lon/lat and a projected geo-path could be used.
An example using my old library and reading the data from a GeoTiff: http://bl.ocks.org/rveciana/bef48021e38a77a520109d2088bff9eb
The text was updated successfully, but these errors were encountered: