March 3, 2025
New Reef Charts
March 3, 2025
The charts on this site have always been a pain to update. Starting with a spreadsheet of coordinates, converting DMS to decimal and then to pixel coordinates, then precisely placing markers in an image editor. Then generating a corresponding html image map for the links, and putting the whole thing in WordPress in such a way that WordPress doesn't simply eat it, as it is prone to do with a lot of things.
The charts on this post are drawn by a WordPress 'plugin' that I wrote that generates everything from a database. With a nice graphical/mathematical interface on the back-end, I can dispense with all the bother above. I originally wrote the plugin for something else, but I kept thinking how useful it would be here. But the situation here is a lot more complicated than I figured a reasonably simple program could handle.
I took a shot at it anyway, and much to my surprise, the resulting upgraded plugin does a fine job. With the new charts, I can easily alter the scale, and by enlarging the charts and shrinking the labels, everything fits. On over 30 charts, there are only one or two spots that would benefit from hand-tweaking, and I'm just going to ignore them.
Sea Girt Artificial Reef
But that's just for the artificial reefs, the big charts are far too complicated to do except by hand. Which is fine, because they almost never need to be updated - ships just don't sink very often any more, so there is almost no need to update them. The reef charts on the other hand are updated annually, although not as much as in years past. I have about half a dozen additions to make that I have been putting off, and now it will be easy.
The chart above can be zoomed and panned, but I have turned that off for the rest. The new charts are actually sharper than the old ones, with nice link effects that match the rest of the website. I was expecting to abandon this project as unworkable, instead it is an improvement all around. With 4 new reefs in New York, the Artificial Reefs section of the website now has 41 charts. Now to get to the rest of the updates I've been putting off.
And thanks again to all my generous donors - web hosting is not getting cheaper.
Axel Carlson Artificial Reef
Atlantic City Artificial Reef
Update:
This new system exceeds all my expectations - it really works! I just added 4 new reef sites in New York, without touching a spreadsheet or graphics editor at all. I also re-made all the index charts, like the one at the top of this post. I think they look great, better than the old ones. I didn't think I could get all the labels to fit, but I gave myself enough options to make it work.
The map source here is actually free, although there are others you can pay for. The individual reef charts don't even use a map source, they are just points and shapes on a white background.
I wrote all the php and javascript code for the plugin myself; it uses the OpenLayers library. So my brain still works, even after Covid did a number on me. What also amazes me is that my code is less than 2 MB, while the plugin I bought a few years ago and no longer use is almost 40 MB ! I guess I am a pretty efficient coder. Mine doesn't have all the bells and whistles of the other, but I wasn't using them anyway.