• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Making big PDF maps

Originally posted by Morte:
If I want to make PDF maps of sector or more size, looking roughly like a Shane's maps minus the subsector lines but with UWP data
I'm mostly finished with a Perl script that generates fully-annotated PDF maps from standard SEC-format data files. Subsector lines are optional, most paper sizes are supported, a single page can be any of a full sector, a quadrant, or a subsector, and you can create an entire sector's worth of quadrant or subsector pages at once.

Output is currently in color only, I still need to create decent icons for bases and asteroid belts, and I haven't done anything about drawing jump or x-boat routes, but otherwise it's looking pretty good.

The current version of the script is here, and sample quadrant-level output of Gateway Sector is here (72Kbytes, based on Flynn's SEC files, thank you very much). You need the PDF::API2 module from CPAN to run the script. "sec2pdf --help" for an options list.

I want to make a B&W-friendly option, spiff up the asteroid belt icon, sort out the base codes and give them icons, print subsector names, control map sizing more precisely, and (eventually) add a map legend. I'll also add an option to always print UWP+PBG instead of system name (currently only done if the system doesn't have a name).

Free for any use, of course. Suggestions/corrections welcome.

UPDATE: I put a newer version of the script up, that includes support for a metadata file containing things that aren't in SEC files, like the full sector and subsector names, the year, and corrections for systems with really long names (Hold-Your-Breath, etc). I also added an option to always print the UWP and PBG instead of the system name.

I've updated the sample quadrant map to use the metadata, and added a subsector-level map here.

-j
 
Mr Greely,

Very, very impressive. Thank you for sharing that script with us, and for working so diligently on this. The output, while not as informative as Robject's code, does look very cool. I've become a big fan of quadrants since Gateway exposes us to them, and appreciate software that supports that map format.

With Thanks,
Flynn
 
The links to Robject's scripts on page 2 of this thread are dead, so I can't download to compare. I'll cheerfully steal features from anyone, though, so which aspects of his maps do you like?

As for why I rolled my own, basically I didn't have anything more interesting to do on Sunday, and I'd worked with PDF::API2 before (generating NRA bullseye targets), so I went for it. The assortment of errors in the official maps of Gateway Domain were an added incentive. :)

-j
 
What I liked about Robject's version:

</font>
  • World name and UWP appeared as part of the Hex, not one or the other.</font>
  • Was scalable, so that I could put in any sized data file, from subsector to quadrant to sector, or just a part of any of them, and it would scale the results to the page. Dependent on what was in the data file that it read from.</font>
What I like about yours is:
</font>
  • Maps look much more traditional, with a single dot to indicate gas giant presence.</font>
  • Easier to read the data that is presented.</font>
  • Automatically breaks a sector file down into quadrants and subsectors, as part of one big file.</font>
If you can find a way to display just the UPP portion of the UWP (X000000-0) under the name and still have it look good, I think that would be perfect for what I would want.

Does that help?

BTW, how does one install the PDF::API2 in their environment so that they can use your scripts? Also, what's the syntax used to call your scripts (i.e. parameters, etc.)? And what's the format of this secondary data file?

Thanks in advance,
Flynn
 
(side note: The SEC files for Gateway to Destiny that someone (Flynn?) typed in erroneously apply trade classification Lo to systems with Pop 4. Just something I noticed in passing...)

Originally posted by Flynn:
If you can find a way to display just the UPP portion of the UWP (X000000-0) under the name and still have it look good, I think that would be perfect for what I would want.
Looks like I could do that if I moved the Allegiance code up and to the right, just outside of the amber/red zone arc. I'll tinker with it tonight. I'm actually thinking of adding several different print layouts, once I clean up the positioning code a bit, but that can wait.

BTW, how does one install the PDF::API2 in their environment so that they can use your scripts? Also, what's the syntax used to call your scripts (i.e. parameters, etc.)? And what's the format of this secondary data file?
In order:
</font>
  • I haven't run Perl under Windows recently, but it should have CPAN support. If your Perl distribution includes the command-line cpan client, you should be able to just say "cpan PDF::API2" and it will be downloaded and installed, otherwise check your documentation.</font>
  • Calling my script with the "--help" option gives a complete list of options. I've also included it in a code block below.</font>
  • Sample metadata file for Gateway Sector below.</font>
  • When the script is finished, I'll probably convert it into an interactive CGI page where you can paste in a SEC file and get back a PDF.</font>
</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">usage: sec2pdf [-abBu] [-t sector/quadrant] [-p papersize] [-s secname]
[-d datafile] [-o outputfile] [col row]
-a generate entire sector of quadrant/subsector pages
-b print border around edge of each map
-B print subsector boundaries on sector/quadrant maps
-d data file in standard SEC format
-m file containing metadata (sector & subsector names, year, longnames)
-o outputfile (.pdf appended if not present)
-p paper size (4x6,8.5x11,8.5x14,11x17,a3,a4,b4,b5)
-s name of sector (map title)
-t what type of map to print (subsector is default)
-u always print UWP+PBG instead of system name

[col row] selects a specific quadrant/subsector to print
(top left is "1 1", the default)

metadata file format is simple keyword/value, one per line:
"sector foo","year 993","a subname" ... "p subname",
"2135 Cantrell's Grant" (for names longer than 14 characters)</pre>[/QUOTE]</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">domain Gateway Domain
sector Gateway Sector
year 993 Imperial
a Darksky
b Atoon
c Denkard
d Lowton
e Abysm
f Windfleet
g Castra
h Forcett
i Arconna
j Beckann
k Ashton
l Riftin
m Ownsbee
n Ariel
o Cinder
p Farina

1520 Halversons Rock
1839 Hold-Your-Breath
2310 Smuggler's Hide
1424 Welmertins Star</pre>[/QUOTE]-j
 
My apologies, Mr Greely. I must have used a source that I inadvertantly attributed a range of 1-4 Population for worlds with a trade classification of Lo. I will confirm against references at home and correct that as needed.


The world data came originally from a grep of the Gateway PDF, cleaned up, parsed and reproduced in a proper SEC file format. After that, errata was added and then I used an app I wrote to update the trade codes, etc. Easy enough to change, however. Thanks for catching that.

I look forward to seeing what happens with your CGI script page.


Thanks for the feedback and your diligent efforts,
Flynn
 
Okay, I've updated the script to print UWP above system name, and generated new sample output for Gateway Sector (complete, by quadrant, and by subsector).

I've made a first pass at pulling all the color data together for creating a B&W print mode, but I probably won't finish it today; I have to do some real work tonight.


-j
 
Mr Greely,

Fine work, thank you very much! Any chance of getting the Glimmerdrift Reaches sector in this mode?

Thanks!
 
Oh, sure, I was just holding off until I was finished with the script. I went ahead and generated all four sectors in Gateway Domain with the latest version, and put them all online here.

-j
 
Originally posted by J Greely:
Oh, sure, I was just holding off until I was finished with the script. I went ahead and generated all four sectors in Gateway Domain with the latest version, and put them all online here.

-j
Awesome work! Thank you very much.
 
Mr Greely,

As an aside, I reviewed my source material for determining trade codes, and the Lo trade code is defined as being applicable to worlds of Pop 3- in CT (Book 7), MT, T4 and GT, and as 4- in TNE. As the application I created was originally written to support TNE/TNE 1248, I never looked anywhere but Book 3 (where it wasn't defined) and the TNE core rules. My bad for not checking everywhere else.


I'll correct the files and update them this weekend,
Flynn
 
Originally posted by J Greely:
The links to Robject's scripts on page 2 of this thread are dead, so I can't download to compare. I'll cheerfully steal features from anyone, though, so which aspects of his maps do you like?

As for why I rolled my own, basically I didn't have anything more interesting to do on Sunday, and I'd worked with PDF::API2 before (generating NRA bullseye targets), so I went for it. The assortment of errors in the official maps of Gateway Domain were an added incentive. :)

-j
Sorry about that! The links are on my home machine, which isn't always running, or serving for that matter.

The link, again, is

http://24.1.3.180/tas/webps.cgi

I'm running Indigoperl (Perl 8 plus Apache 2) on Win XP.

My cute little Perl module which reads a UWP line into an object is at:

http://24.1.3.180/tas/UWP.pm

Enjoy... comments to downport at comcast dot net.
 
Originally posted by Flynn:
As an aside, I reviewed my source material for determining trade codes, and the Lo trade code is defined as being applicable to worlds of Pop 3- in CT (Book 7), MT, T4 and GT, and as 4- in TNE.

I'll correct the files and update them this weekend
Flynn,

Please don't be so quick to make that change. Classifying pop 4 worlds as lo-pop actually makes a lot of sense, and it can be argued that it was a fix made by TNE, not just a "TNE thing".

For example, look at the stellar data from the Regency Sourcebook vs anything published prior. They tried hard to make it work better (still failed, but at least they tried). Does that mean we have to use the even worse data if we aren't dealing with TNE/1248? Or was it a setting correction introduced through TNE?
 
daryen,

If I had my drothers, I wouldn't change it, because that means less work for me. ;) However, I can see where some people might have some issues with it, based on the fact that TNE is the only edition to support Lo for Pop 4 worlds. I'll definitely wantt to keep it for TNE and 1248, though, as well as any sectors of my own creation.

The difference is less than 9999 versus less that 99,999 population. The small town where I went to college, Canyon, TX, numbered more than 10,000 people but less than 100,000, and I'd say any world with that population should be considered Lo, but others might argue that such should be reserved for the small villages you drive through and miss by blinking.

It's no skin off my nose, either way, in the long run. Just wanting to provide good data for those interested.

-Flynn
 
Originally posted by robject:
Sorry about that! The links are on my home machine, which isn't always running, or serving for that matter.
Thanks. I downloaded a few to check them out, and they're very nice. I'm surprised you didn't use the standard "dup stringwidth pop 2 div neg 0 rmoveto" trick to get the hex numbers and system names centered, though. :)

While we're talking about your maps, it took me a while to figure out the "oN" and ":N" codes. Also, it looks like you haven't added amber and red zones, yet, unless you're being very subtle. I like the way you leave out labels on empty hexes; I wouldn't always want it, but it's a cool way to clean up a cluttered map.

-j
 
Oh?! No amber or red zones showing up? That's bad, they should be amber and red arcs. Guess I'll have to debug.

Update. Yeah, that was a bug alright. Looks better now, tho.

Ah, and the UWP.pm was hastily updated, so it's got errors I'm since ferreting out. I'm also tidying it up and adding POD, in order to upload it to CPAN. I'm putting it under the package name TAS::UWP, in hopes that future TAS modules can be put there.

By the way, the reason I didn't use that handy PS shortcut is simple: I can't PostScript my way out of a paper bag. I'm PostScript-Illiterate.
 
Heh. I know how easy it is for little errors to creep in. You should see the fun I'm having with the code for adding routes and regional borders to my maps. That isn't going to be bulletproof for a while...

On that note, I took advantage of the 11x17 color laser printer at work and printed some maps. I liked the results so much (especially at the quadrant level) that I updated my mapping page to include 11x17 color maps of Gateway Domain and The Spinward Marches, as well as 8.5x11 grayscale maps for B&W printing.

11x17 is also the perfect size for adding a nice legend to the map. "Real Soon Now".

Oh, and I think Games::Traveller::UWP would be a better name for the module. CPAN already has too many top-level directory entries.

As for PostScript literacy, if you want some assistance, feel free to ask. I've been writing little Perl/PS hacks since 1988.


-j
 
I'm right with ya. Games::Traveller::UWP was created last night.

Also, the map-maker script I put out there isn't the latest and greatest, although I think I haven't added functionality for awhile now. I *did* change it to use my UWP module, which is much tidier than the old pseudo-library.

I don't suppose you'd like to collaborate with the map gen stuff? I've wanted to do borders but just don't know the PS to do it. The algorithm seems fairly straightforward, at least to a first approximation -- if a neighbor is of a different allegiance, draw or emphasize the border, right? And map allegience codes to border colors...

Ah, I'm wrong about the update to the CGI script: I added color-coding to the XBoat routes. Very pretty.
 
Back
Top