Post Reply 

Graticules and NOAA charts

May 21, 2014, 20:29
Post: #1
Graticules and NOAA charts
I'm looking at GIMP, and I'm wondering if I'm trying to use a 15 yard Kenworth dump truck where all I need is a pickup.

I’m working on NOAA nautical charts. NOAA recently released all of their free navigation charts as PDFs, which is a giant step forward for sailors.

What I need to do is crop the charts (they're huge, for the cockpit of a racing sloop) to 13x19, then add back in the border. This project is for printing hard copies on a large format (13x19 inch) printer.

The border contains the graticule, the scale of degrees, minutes and seconds.

The latitude is significantly different from the longitude, the size is quite different.

I see that GIMP has a grid that has the ability to configure the X axis independantly of the Y axis, but I’m having trouble wrapping my brain around the problem. I’m not an artist, by any stretch of the imagination.

I need to line the grid up with two points on the edge of the cropped PDF, one on the top or bottom, and one on the side, so that the grid reflects degrees, minutes and seconds correctly. (The PDF has a printed grid every two minutes.)

I need sixty seconds in every minute. (None of the charts cover a full degree. Thank god.) I think I can put independant labels on each minute.

But I don’t even know where to start my research on how to make GIMP do this.

Thank you!

~Jammer
Find all posts by this user
Quote this message in a reply
May 21, 2014, 21:35
Post: #2
RE: Graticules and NOAA charts
There are two "grids" in Gimp that are two completely different animals:

- the positioning grid (View>Show grid, Image>Configure grid): this is meant to position things (individual layers). It can be displayed but isn't part of the image and won't print.

- a drawn grid: Filters>Render>Pattern>Grid which is a real printable grid.

I'll assume you are talking about the second. It can be used for your purposes but you'll have to do a little math(*) because it is not geared towards filling a space with N bars, but towards repeating a bar every N pixels (vertically and/or horizontally) from a given origin (X/Y offsets). The Measure tool (Measure) will also help you a bit.

With a bit more explanation (a hand-made example on paper, photographed to post here), I can also write a a script that will do most of the job (the truck can become a custom race car).

(*) The math is very simplified because the input fields in the grid dialog accept simple formulas, so if you measure 1200 pixels and want 60 bars in your grid you can enter the spacing as "1200/60".

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
May 21, 2014, 22:03
Post: #3
RE: Graticules and NOAA charts
Thank you!

I'll work now on figuring out how to take a screen shot. I'm pretty sure I can make a suitable screen shot (or two) that shows my problem.
Find all posts by this user
Quote this message in a reply
May 21, 2014, 22:57
Post: #4
RE: Graticules and NOAA charts
With Gimp: File>Create>Screenshot

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
May 21, 2014, 23:12
Post: #5
RE: Graticules and NOAA charts
Okay, I have a couple shots I think will work.

GIMP opens the chart happily. I figured the PDF issue out. This is the lower right corner. I've included it to demonstrate two things: one, the size of the minutes of latitude are considerably different from the size of the minutes of longitude, and two, the numbers run "backwards". That is, because I'm in Puget Sound, latitude runs from south to north, and longitude runs from east to west.


.tiff  Lower Right.tiff (Size: 966.47 KB / Downloads: 21)

The next shot is a shot of the most important bit: how I need to divide minutes, both of longitude and latitude.


.tiff  Seconds.tiff (Size: 238.97 KB / Downloads: 20)

The last shot is of a cropped chart, and it's an example. I just cropped it for this reply, it's not the chart I want to make. I take the original chart, crop it in some way to make if fit on my paper so that the part of the chart I want is there, and then I want to align the graticule back up to the printed lines on the paper. There are lines on this chart, and those lines represent, in most cases, two minutes of longitude or latitude, and I need to be able to line a suitable graticule up to them as precisely as possible, and then print the whole mess out.

(Sometimes, to make the exercise harder, NOAA leaves different minute lines out, and there's only lines every three minutes, or five minutes, depending on the chart and the area, and what's in the area. They do it to avoid "chart clutter", and to make sure I break out in hives when I'm trying to figure graticules out.)


.tiff  Cropped Chart.tiff (Size: 220.61 KB / Downloads: 22)

Thank you for your help!
Find all posts by this user
Quote this message in a reply
May 21, 2014, 23:46 (This post was last modified: May 21, 2014 23:49 by ofnuts.)
Post: #6
RE: Graticules and NOAA charts
Cropping part of the image at the center and splicing to it the matching bits of the border is easy (can even be done by hand with a bit of method, mostly using the guillotine (*)). Of course a script is going to do it faster.

What I don't completely understand is if you want to draw an additional and finer grid than the NOAA one over the image?

(*) you position 4 quides for the borders, 4 guides for the central part), use the Guillotine, which produces 25 sub-images, and then splice together the 9 relevant ones

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
May 22, 2014, 00:08
Post: #7
RE: Graticules and NOAA charts
No, I don't want anymore lines on the chart.

I assumed that the grid would be the easiest way to get the marks on the border.

The Guillotine may be exactly what I want, assuming it works in both vertical and horizontal.
Find all posts by this user
Quote this message in a reply
May 22, 2014, 00:19 (This post was last modified: May 22, 2014 00:39 by ofnuts.)
Post: #8
RE: Graticules and NOAA charts
Yes it does... To splice the borders,
  • find the image for the central part,
  • increase its canvas size (Image>Canvas Size) to fit the borders (you can take some margin)
  • position guides around the layer (which should remain at its cropped size)
  • For each border image
    • Activate the image
    • Drag/drop the layer from the Layers list dialog to the canvas of the center part
    • Use the Move tool (Move) to align it (if you set up the guides correctly, the borders will just snap at the right place when you get close).
  • Save/export your cropped image and discard the rest.

    Edit: even simpler solution: after the Guillotine step, go back to the original image, remove the main image layer, and drag the center part and the border bits back in it... all these should position nicely around the guides that determined the central part for the Guillotine. Once done use Image>Fit canvas to layers to reduce the canvas size to the minimum necessary.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
May 25, 2014, 21:35 (This post was last modified: May 25, 2014 21:36 by ofnuts.)
Post: #9
RE: Graticules and NOAA charts
Just wrote a script for this, see crop-chart-0.0.py here

Install it using instructions in the sidebar here.

Usage: position 4 vertical and 4 horizontal guides, the outer ones indicating the margin area to keep, the inner ones the part of the chart to keep.

Invoke the plugin (appears in the menus as "Layer>Crop chart to guides").

It creates a new Gimp image containing the cropped chart.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
May 27, 2014, 03:39
Post: #10
RE: Graticules and NOAA charts
Thank you!

I can't figure out how to make this forum let me write your name... that's how good *I* am with computers.

I'll be looking at your script in detail.

So is GIMP for experts who can write scripts? Should I be studying how to write scripts?

Here's another piece of my puzzle: the Coast Guard puts out updates to these charts every Wednesday. So when I wake up each Thursday, my precious charts are out of date.

In the days of paper, one raced to one's desk every Thursday morning, looked over the list of updates, and started making updates on the chart with one's drafting equipment.

Now, it would be good to use GIMP on the PDFs, while replacing the chart on the bottom of the stack of overlays occasionally.

So I've been looking over various Mac programs that allow me to do that, including iDraw and OpenOffice, and while OpenOffice seems to have knocked itself out of the running, iDraw lets me draw a graticule fairly quickly. But replacing the chart on the bottom could be a pain in iDraw.

So is the idea behind GIMP that I can customize it with scripts, instead of using it out of the box?

If so, I can see how, after a long, painful process of developing appropriate scripts, that it could be much easier to use GIMP to update charts rather than iDraw, in spite of the fact that superficially, iDraw appears easier to use.
Find all posts by this user
Quote this message in a reply
May 27, 2014, 07:02
Post: #11
RE: Graticules and NOAA charts
No, Gimp is not only for experts. Like many applications it can be made a lot more useful with scripts (your favorite spreadsheet program becomes a different animal the days you start writing your own macros) so people who know how to program will always have an edge over those who don't Smile But you can do a lot of useful things without scripts.

I don't know what the updates look like (would you have the URLs for the chart and the updates?), but typically you can use Gimp to stack images using layers, and if you draw a graticule on its own transparent layer and move it to the top of the stack, you don't need to redraw it.

Btw, due to "politics" the original OpenOffice is dead, replaced by LibreOffice (http://www.libreoffice.org).

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS