bennycheung / D3HexMap

This repo is a companion demo for the article on Interactive Hex World Map using D3
11 stars 7 forks source link

combine this library with DGGRID indexing method #1

Open am2222 opened 5 years ago

am2222 commented 5 years ago

Hi, I was looking at this library and was wondering if there is any way to combine this work with DGGRID indexing method?

bennycheung commented 5 years ago

That's the idea to use DGGRID to cover the global; however, the mathematics are very different from what I am relying on in this code base. Please feel free to extend beyond what I have here, love to know how you will take it.

am2222 commented 5 years ago

@bennycheung Hi, You know my problem is that I am a bit confused about the structure of going from one zoom level to another zoom level , and also I see in your example that in your method actually hexagons are distorted in poles. In DGGS cells should have the same area

bennycheung commented 5 years ago

The hexagons are distorted in poles because the original image (rectangular) is using EPSG:4087 WGS 84 / World Equidistant Cylindrical from the sphere. In order to go in reverse without area distortion, we need to use Web Mercator (EPSG:3857) projection from the image. You can see my article on http://bennycheung.github.io/preparing-geospatial-data-in-postgis (section 1.3. Map Projections), illustrated the area is distorted. However, if we wrapped it back onto the sphere, the area will be projected correctly.

Sorry that I do not have sufficient knowledge consult you on DGGS cells geometry.

am2222 commented 5 years ago

@bennycheung Thanks so much for your help and information, I'll dig more into it to see if I can come up with any ideas, Thanks