• 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.

Traveller Map Database with map coordinate information

sudnadja

SOC-12
I looked through the API documentation but didn't see a way to extract the entire traveller map world database including their x,y "world space" coordinates. The API does provide a mechanism for converting coordinates between the various systems, but I was hoping to not have to go through those kinds of gymnastics.
 
I looked through the API documentation but didn't see a way to extract the entire traveller map world database including their x,y "world space" coordinates. The API does provide a mechanism for converting coordinates between the various systems, but I was hoping to not have to go through those kinds of gymnastics.

The "world space" coordinate is that their "global hex number" (for lack of a better term).

And that is based on the Sector offset (which is an aspect of the Sector meta data).

There's, what, 32x40 hexes per sector?

Some Sector may have an offset of -4, -3, so that's -4 * 32 + sector_column, -3 * 40 + sector_row.

Something close to that.
 
The "world space" coordinate is that their "global hex number" (for lack of a better term).

And that is based on the Sector offset (which is an aspect of the Sector meta data).

There's, what, 32x40 hexes per sector?

Some Sector may have an offset of -4, -3, so that's -4 * 32 + sector_column, -3 * 40 + sector_row.

Something close to that.

Yes, the API document discusses that, I don't think it's a global hex number, is it? But the coordinate system I'm concerned with is the one by which is actually probably "map space". They do provide code for the different coodrinate space conversions, but there would still be assembly associated with pulling down all of the sectors then converting the worlds in those sector coordinates into worldspace. I was hoping that this had already been done somewhere, or there was some API path that would result in that.

Thanks though
 
There's no API to get the full data set at all (you'd need to iterate, or just grab the source and parse). And there's no API to do bulk coordinate transforms.

As you note, the coordinate transforms are all documented. "world space" is indeed like global hex coords with Reference (Core 0140) at 0,0. "map space" accounts for jagged and packed hexes giving simple Cartesian coordinates.
 
There's no API to get the full data set at all (you'd need to iterate, or just grab the source and parse). And there's no API to do bulk coordinate transforms.

As you note, the coordinate transforms are all documented. "world space" is indeed like global hex coords with Reference (Core 0140) at 0,0. "map space" accounts for jagged and packed hexes giving simple Cartesian coordinates.

I notice that
http://travellermap.com/data – list of all sectors
is delivered in an easy-to-digest json structure, you don't happen to do that for the systems in the sector or subsectors, do you? The returns seem to all come in varying forms of delimited format.
 
Nope. But parsing TSV in JS is about 10 lines of code, see the source to any of the “make” tools for an example.

And thanks for the help. I have the data successfully extracted and in a unified dataset (the point being so that I can do regular math across all of the data). There are a few missing sectors, I see now, but the data is there. Something needs a little work in the data formatting, perhaps. Anyway -



There's probably something a bit off, though. The vector magnitude (Norm) between Terra and Deneb comes out to be 129.863 parsec:



If I use the circle API and draw a circle centered on deneb the radius has to be something like 170 to overlap the earth.

I would think that there is a math error, except my coordinates for Regina in map space matches the API test vector:

Code:
In[372]:= Select[ almosteverything, #Name=="Regina" & ][All, {"Sector", "Name", "UWP", "Map"} ]

Out[372]= Sector	Name	UWP	Map
Spin	Regina	A788899-C	{-95.6958,70.5}

From the API doc:
Example: Regina is (x=-95.914, y=70.5)

Edit: never mind, my mistake. It's all good!
Thanks again.

And with Imperial Allegiance plotted, along with amber and red zones:
 
Last edited:
Back
Top