Posted: Wed Sep 30, 2009 10:35 am
Correct interpretation. But I'll do it in perl, as I've done similar jobs before.PhantorGorth wrote:Having read you annoucement, it sounds like you are trying to create each wiki page using a script. If you are I suggest you use XSLT, that's how I did the Galaxy 6 and it is designed for the job.
The code is alredy implemented in my module, and, yes, I'm aware of the rounding problem and had already solved this during the weekend based on Ian Bells TXTELITE.C algorithms.PhantorGorth wrote:Well I have the code already in XSLT. It wouldn't be that hard to modify for your purposes. If you decided to do it yourself read this thread first regarding the distance calculation as it isn't what you expect mathematically.
I was not going for names, either. All my references are numbers, so the trading routes will be done with numbers, too.PhantorGorth wrote:If you are putting new stuff back into the community it's not really leeching. If you want to do that if you really are worrying about taking too much then feel free to do so as it that would speed things up a little for me but I would want it as a list of system numbers, not names, as well as the trade route title. If you could do it as used in my Map Data file all the better.
Currently, as a test, I've got a simple text file. A line starting with text indicates a new trade route. Lines with numbers indicate the planets, the first line being the main route, subsequent lines indicating forks:
---- 8< ----
Spaceway L2
7 129 227 73 89 222 29 93 42 131
---- 8< ----
This describes the Spaceway L2 in G1, starting in Lave (7), ending in Zadies (131)
If it had a fork in Zaonce (129) via Tionisla to Zaalela (201), it would look like this:
---- 8< ----
Spaceway L2a
7 129 227 73 89 222 29 93 42 131
129 124 201
---- 8< ----
This way, I could even do loops or alternative routes. If a system has one link, its a start/endpoint, if it has two, it is a passthrough, and anything greater is a fork.
I use a simple verifyer on this by checking the distances between systems in the list to catch typos.
You're right, I'll do it similar to the routes: one line with text as the title, and a line of numbers for the systems involved. This leaves identifying the best shape for a new map to you, except when you can do something like overlapping circles and take their outlines, or something like that...PhantorGorth wrote:By turn into a list I assume you want to find what systems are in what regions. That is not going to be that simple, I'm afraid. For a start they are not all ellipses. When you look at the PDF, or the file you convert it to, as text you can't guarantee that the name of the region is going to be easily associable to the region outline graphics and also each format will have different way to describe the outline. Having a good ideas of what it would involve I would say that it would take quite a bit of work to find a way to get the information you are after programatically by which time you might as well have done it manually as it would be quicker.
Ah, graphics - not my world, though. But if you send me the stuff I'll give it a try...PhantorGorth wrote:You can get these easily by just opening one of the PDFs in Inkscape, ungroup everything and pull the graphics apart to get at them. It's all drawings not images so you can scale them as much as you want. If I was doing what you are trying to do I would instead modify my second XSLT script to create an SVG document that consisting of a single system icon and then write another script to call that modified script 256 times changing which system is rendered each time and outputing each to a separate file. Then you could create all 2048 system icons as SVG files for embedding in the wikipage. For your information my script creates each system icon by building it up from component parts based on the system details.
PhantorGorth wrote:I will send you the stuff I have if you PM me your email address.
My system runs OpenSuse. Sadly, I have to turn to my wifes PC (running XP) for the game, as I can't gat oolite compiled on my machine.PhantorGorth wrote:If you want it in its current state PM me your email address. It will involve installing some unix tools or their ports for your OS.
Yours, Christian Treczoks