Chalker Continental Composites

General discussion of map projections.
PeteD
Posts: 261
Joined: Mon Mar 08, 2021 9:59 am

Re: The Chalker Continental series

Post by PeteD »

OK, then option B seems all right and avoids "Chalker-this, Chalker-that".
Atarimaster
Posts: 449
Joined: Fri Nov 07, 2014 2:43 am

Re: The Chalker Continental series

Post by Atarimaster »

PeteD wrote: Fri Jun 07, 2024 5:45 pmThe links to the files in Tobias's original email no longer work.
Yes, I obviously removed them from the server at some point.
I can’t find the starter kit that I sent you in 2020, but here’s a version from 2021, that I built for somebody else:
https://map-projections.net/download/d3-starterkit.zip

And these are the instructions that I added to this version, translated with DeepL.com (free version):
The ZIP archive in the attachment contains the following files:
- index.html: This file is opened in the browser. As an example, W23, W30 and W14 are rendered (the last two just picked out at random).
The W23 in the version with the .rotate([9.11, -48.59, -40.89])
- d3.js: The "centrepiece" of the d3 scripts, contains all the basic functions. You probably don't need to modify it.
- d3-geo.js: Contains all the basic functions for creating map projections, including the "rotate" function. A handful of projections are already included.
- d3-geo-projection.js: The functions for all other projections. This is the modified version into which I have inserted all the Canters projections (starting at line 4821).
- d3-geo-projection.original.js: The current original version of "d3-geo-projection.js". For reference only, you probably don't need it.
- world-50m.json and topojson.min.js: Are required so that not only the degree grid but also the continents are drawn. You do not need to touch them.
- d3-save-svg.min.js: Has nothing to do with the projections themselves. Is only required for the "Save ... SVG" button, with which you can download the generated SVG graphic.

I have also put the whole thing here so that you can see what it should look like in the end:
<https://map-projections.net/d3-starterkit/index.html>
(The recipient was particularly interested in the Canters projections, that’s why they are explicitly mentioned.)
Milo
Posts: 289
Joined: Fri Jan 22, 2021 11:11 am

Re: The Chalker Continental series

Post by Milo »

PeteD wrote: Fri Jun 07, 2024 5:48 pmThe files were zipped, and Gmail still rejected them, but perhaps dchalker's email provider is less strict.
Okay... yeah, that's overzealous. I can understand being worried about naked JavaScript files, because in an HTML email with an unsecured browser, it could be used to immediately run sketchy stuff as soon as you open it, before you even realize there's JavaScript there. But rejecting JavaScript files that are safely packed into a form that prevents you from running them without knowing what you're doing, and doing so in a way that doesn't merely warn you "we think this email is suspicious" but outright deletes it automatically without even giving you an option to dig into your spambox and pull it back out? Ridiculous.

But then, I guess it makes sense for Google to want to act overly paranoid about minor security concerns in order to distract you from the much more serious privacy concerns that come from using Google to begin with.
Atarimaster wrote: Sat Jun 08, 2024 2:42 am- d3-save-svg.min.js: Has nothing to do with the projections themselves. Is only required for the "Save ... SVG" button, with which you can download the generated SVG graphic.
Could be useful because SVG files are easier to edit losslessly than raster image files, if you know a bit about how they work. Could be helpful with removing the antimeridian lines in the azimuthal parts that PeteD was having trouble with.
Atarimaster
Posts: 449
Joined: Fri Nov 07, 2014 2:43 am

Re: The Chalker Continental series

Post by Atarimaster »

Milo wrote: Sat Jun 08, 2024 3:05 am Could be useful because SVG files are easier to edit losslessly than raster image files, if you know a bit about how they work.
Yes, that’s why I included the button, I use it very often myself. It’s a bit of a nuisance sometimes that the full graticule is a single vector object – but of course that’s still better than having to modify pixels.
dchalker
Posts: 33
Joined: Thu May 30, 2024 5:01 pm

Re: The Chalker Continental series

Post by dchalker »

Sweet, thank you Tobias. Straight out of the box, everything is working locally except rendering the continents. Looks like it may require a local JSON server? I don't presently have one set up, but I can fix that (if that's the problem), or stick them online somewhere if all my local troubleshooting fails.

Once I get the continents and the modification working, I'll spice the page up with some interactive features. I've designed some very basic js tools before, so once I get my bearings using d3 I can probably make something really fun powered by it. This is veering quite off-topic, but I've built local web utilities like this for a few other things like character generators for game art (nothing special, just compositing image layers) and keyboards:

Jigul Keyboard
jigulkeyboard.jpg
jigulkeyboard.jpg (68.74 KiB) Viewed 10987 times
Atarimaster
Posts: 449
Joined: Fri Nov 07, 2014 2:43 am

Re: The Chalker Continental series

Post by Atarimaster »

dchalker wrote: Sat Jun 08, 2024 8:51 amLooks like it may require a local JSON server?
Ah yes.
I always forget to mention that because I’ve got a local web server set up anyway so I run those scripts there. The easiest way to use one is probably something like XAMPP but as far as I remember you can also solve this problem by disabling a certain security feature in your web browser.

Peter, didn’t you do that?
PeteD
Posts: 261
Joined: Mon Mar 08, 2021 9:59 am

Re: The Chalker Continental series

Post by PeteD »

I got around the problem by using a very old version of Firefox that didn't have the security feature.
dchalker
Posts: 33
Joined: Thu May 30, 2024 5:01 pm

Re: The Chalker Continental series

Post by dchalker »

PeteD wrote: Sat Jun 08, 2024 10:26 am I got around the problem by using a very old version of Firefox that didn't have the security feature.
That sounds good, I'll just install the old Firefox to keep things simple. Would you mind taking a peek at which version is working for you, and sharing your page with the interruption implemented?
PeteD
Posts: 261
Joined: Mon Mar 08, 2021 9:59 am

Re: The Chalker Continental series

Post by PeteD »

It's release 67.0.4, which is from 20 June 2019. I've sent you an email with the code for the interruption. Gmail wouldn't let me send the JavaScript file either, even when zipped, so I just copied and pasted the code into the email.
dchalker
Posts: 33
Joined: Thu May 30, 2024 5:01 pm

Re: The Chalker Continental series

Post by dchalker »

Alright! Thanks to Tobias and some extra help from Peter, I've got d3 functioning locally now. Much gratitude, gentlemen!

Working on some sort of semielliptical + cylindrical combo for the base.

Here, I try Apian II with equirect
chalkerapiang.png
chalkerapiang.png (184.46 KiB) Viewed 10875 times
Think I've found my favorite general setup, aesthetically. I welcome insights into optimization.
Post Reply