OSGeo / PROJ

PROJ - Cartographic Projections and Coordinate Transformations Library
https://proj.org
Other
1.76k stars 791 forks source link

Add Dymaxion/Fuller Projection #232

Open proj4-bot opened 9 years ago

proj4-bot commented 9 years ago

Reported by wildintellect on 12 Apr 2014 18:41 UTC Someone's already done the hard part, we just need to convert it to C I believe this was written to work with Proj4js http://mbostock.github.io/protovis/ex/dymax.js

Migrated-From: https://trac.osgeo.org/proj/ticket/232

micahcochran commented 8 years ago

That Javascript code looks like it is a direct copy of Robert W. Gray's C code with some small adjustments for Javascript. http://www.rwgrayprojects.com/rbfnotes/maps/docs/graypr.c

I am not a lawyer, but it seems like Robert W. Gray's C code would have rights to license and copyright. The problem with integrating this Gray's C code in PROJ.4 is the licensing "[t]his C program is copyrighted by Robert W. Gray and may not be used in ANY for-profit project without written permission" (emphasis added). Getting permission would be the first step for incorporating this code to be incorporated into the project.

Gray has a little more information about the Dymaxion/Fuller projection on the his website.

poelzi commented 8 years ago

:+1: I so much would love to see dymaxion support - best projection ever :)

AnnanFay commented 7 years ago

Hello, I recently opened the above basemap issue about this.

Is there any more recent info? d3 seemed to include the js port of the code by including the copyright statement. If proj4 is not itself for-profit it should be possible to just include it and add a proviso to the proj4 licence which states the exception. Then it's up to people who use the library to be aware of the licensing?

In addition to the document the website says:

Usage Note: My work is copyrighted. You may use my work but you may not include my work, or parts of it, in any for-profit project without my consent.

The reason I include this is because the inline statement only says you cannot use it for-profit, while this says you can use it for anything not for-profit.

QuLogic commented 7 years ago

That's definitely a non-free clause that wouldn't be liked by downstream distros. It's certainly less free than the MIT license used for proj4.

hobu commented 7 years ago

We are not including this projection in Proj.4 until the licensing issues are resolved by the author(s).

busstoptaktik commented 7 years ago

We are not including this projection in Proj.4 until the licensing issues are resolved by the author(s).

The original submitter has done nothing to resolve this for more than 3 years. Additionally Dymaxion is even a trademark of the BF Institute, so even having a clean room reimplementation of R. Gray's code in PROJ.4 would cause trouble, unless we call it something else (like myDaxion, Damyxion, etc).

Hence closing this. I see no chance this is going to happen

IgnoredAmbience commented 6 years ago

From the linked d3 issue above, it appears that there's now a cleanroom implementation of the projection in JS. The authors have skirted the trademark issue by calling it "Buckminster Fuller's Airocean projection".

https://github.com/d3/d3-geo-projection/issues/25#issuecomment-372279520

kbevers commented 6 years ago

Well then, I guess it is time for one of the many people who has requested this projection to step up and implement it. Gentlemen, start your engines!

IgnoredAmbience commented 6 years ago

The cleanroom implementations referenced are in https://github.com/d3/d3-geo-polygon/blob/master/src/grayfuller.js and https://github.com/d3/d3-geo-polygon/blob/master/src/airocean.js

Fil commented 6 years ago

AMA

kbevers commented 6 years ago

AMA

Okay! Will you add the necessary code to PROJ?

Fil commented 6 years ago

I don't think so. The face projection is not so hard, but the polyhedral stuff is a lot of JS and will not lend itself to a simple adaptation. A solution for that might be to fix the coordinates of each triangle, rather than use a generic "face tree to projection" approach. But I'll gladly help whoever wants to try it :)

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

amillscampisi commented 4 years ago

I am willing to at least take a look at this. I went through your documentation, is there a style guide or anything I should be aware of before I get started?

kbevers commented 4 years ago

That sounds great! We do have some guidelines for code contributors here: https://proj.org/community/code_contributions.html. Note that they are not entirely up to date, so a few corrections are in order:

  1. Code base is generally C++11 now. In places where C-code is still used C99 is allowed.
  2. New parts of the code should be reformatted with clang-format, see https://github.com/OSGeo/PROJ/blob/master/scripts/reformat.sh and https://github.com/OSGeo/PROJ/blob/master/scripts/reformat_cpp.sh.
  3. We've gotten rid of the PJ_ and pj_ prefixes in file names.

I'll update the guidelines shortly.

Happy hacking :-)

Stimj commented 3 years ago

@amillscampisi Did you make any progress on this? I'm also interested in having a look

amillscampisi commented 3 years ago

I haven’t done any work on it.

On Sat, Jul 31, 2021 at 5:38 PM Stefan @.***> wrote:

@amillscampisi https://github.com/amillscampisi Did you make any progress on this? I'm also interested in having a look

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/OSGeo/PROJ/issues/232#issuecomment-890423884, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACABX6XD556IIOOJGEPCHVDT2SJO7ANCNFSM4BESK2RA .

cincodenada commented 3 years ago

I may take a run at this this week - I'm not familiar with this project's structure at all but I'm a quick study. I'm guessing I should be looking at src/projections primarily? What is a good existing projection to reference, namely one that's generally gotten attention and is up to date? I imagine nothing's going to be a particularly useful reference algortihm-wise, just looking for style/api guidance. Just looking at what's been worked on, looks like maybe the heavy hitters ortho, tmerc, stere may be a good reference?

I'd also appreciate any pointers to where the projection API (?) is defined, I can do my own digging of course but if it's already in someone's memory banks it'd save me some time :)

rouault commented 3 years ago

4559a3f702f3f2e2d796d46458a61f38595d6e08 could be an example of how to add a projection (you won't need changes in coordinateoperation_constants.hpp and proj_constants.h as there's no mapping to EPSG projection and parameter names for Dymaxion)

I'd also appreciate any pointers to where the projection API (?) is defined,

The public API ? https://proj.org/development/quickstart.html might help. But for adding a new projection method, using the proj utility is enough for testing

plouvart commented 4 weeks ago

Hello everyone! I'm a GIS developer that silently followed this issue for a while now.

The lack of dymaxion-fuller or dymaxion-fuller-like projection in the proj library is very problematic for people who have applications requiring a map of uninterrupted lands with little distortion.

I myself have a need for such a projection, so I took the time to research and program what amount to a cleanroom implementation in C/C++ of the dymaxion-fuller projection. You can find the fork in this repository.

Basically how the forward projection work is done by:

Here's an image of the result using the picture generator python script of the project:

dymaxion

I have not written any test yet, but I have used this projection profusely. In particular:

Here's a picture of the worldmap OSM data reprojected using this implementation image

And a closeup of the region of specific OSM data that I imported for my own use. image

For the time being, I need to recompile many things that use the proj lib so that I can use this custom projection implementation. Hence why I (and probably many other people) would be pretty pleased to see this implementation merged in the main branch of the proj library.

I would be very happy if someone could reopen this issue and put a bullet point task list of things to do so that my contribution could be merged!

@rouault @kbevers

rouault commented 4 weeks ago

See commit c03a3c3ee262b1e1517582a9400cd39c451d2f5e as an example of a new projection being added

plouvart commented 4 weeks ago

Thank you very much! I'll get on it as soon as I have some time off from work.

plouvart commented 3 weeks ago

I have written some tests for the forward and inverse projection that cover all 23 triangle faces that compose the polyhedral net for the projection. Those tests pass successfully with 0.1mm precision. I have also written a doc page for the projection and made sure it rendered well using the docker tool provided. I have all the material to open a pull request right now.

The only uncertainty I have now is about the name of the projection and the whole legal issue surrounding it that I absolutely want no part in. Despite the fact that the implementation proposed is not based on the source copyrighted material, I still feel we should distance ourselves from the name dymaxion, even if that would come at the cost of lesser recognition. I really like the name airocean mentionned earlier in the discussion as a possible alternative with some form of establishment. A personal suggestion from me would be the name pangea, as a throwback to when all lands were once connected 300M years ago :slightly_smiling_face:

Any other suggestion?

rouault commented 3 weeks ago

I really like the name airocean mentionned earlier in the discussion as a possible alternative with some form of establishment.

Sounds good to me, especially if it matches what other implementations have used. We definitely need to avoid any trademark issue when we are aware in advance of them.

Fil commented 3 weeks ago

Airocean has my vote too, for the sake of consistency with D3; to be honest I think we are all overly cautious with this trademark issue, because it's not holding water anyway. But, better safe than sorry :)

rouault commented 3 weeks ago

But, better safe than sorry :)

I had to deal with take down notice recently, so yes...

poelzi commented 3 weeks ago

I suggest the name: Fuller (projection) Airocean does not sound catchy and I think Fuller would pay homage to Buckminster Fuller while not using the copyrighted name.

mwtoews commented 3 weeks ago

It's not clear to me where the name "Air-Ocean" comes from. While I can't freely view the two articles by Gray (1, 2), the abstracts don't mention Airocean. Jason Davies and d3-geo-polygon have settled on Fuller's Airocean projection, but again, I don't see their source for the name.

To me, "Fuller projection" is simpler and consistent with most others projections named after a person. ArcGIS Pro chose this name too. However, a counterpoint is that the 1954 version with icosahedrons (as implemented in the PR) was created by multiple individuals: Fuller, cartographer Shoji Sadao, and implemented by Jason Davies (2013), Enrico Spinielli (2017) and Philippe Rivière.

Fil commented 3 weeks ago

Fuller has made dozens of maps with different arrangements of squares and triangles; he was using the word “Dymaxion” to depict, well, everything he invented: car, house, scrapbook… https://buckminsterfuller.net/images/geography.html https://www.raremaps.com/gallery/detail/88899/dymaxion-world-map-world-map-on-dymaxion-projection-fluid-fuller https://en.wikipedia.org/wiki/Dymaxion_Chronofile

The most iconic of his maps is the icosahedron-based arrangement, made only of triangles (some cut in half), which we implemented in D3: https://collections.lib.uwm.edu/digital/collection/agdm/id/14899/

That is where the name “Airocean” comes from. It is spelled Air-Ocean on some other iterations https://bostonraremaps.com/inventory/buckminster-fuller-dymaxion-air-ocean-world-1967/

“Map (Based on Buckminster Fuller's Dymaxion Airocean World)”, is the full title of a very large and famous painting by Jasper Johns (1967) https://www.moma.org/momaorg/shared/pdfs/docs/press_archives/4725/releases/MOMA_1971_0162_115.pdf

Fil commented 3 weeks ago

AFAIK there are 3 implementations of this projection in JavaScript:

mwtoews commented 3 weeks ago

Thanks @Fil for tracing the origins! Looking further, I see the earliest being the 1954 "Raleigh Edition" with the title "Dymaxion Airocean World".

Given there are a few different icosahedral nets (e.g. here) and an abundance of potential names, it does make sense to align with all other open source implementations and use "airocean" as the name for this representation.

plouvart commented 2 weeks ago

As per @mwtoews suggestion, I added support for the +orient parameter. Possible values are either vertical (default) or horizontal.

Here's a picture of the result: airocean