Name

coord_compile - Compile MapMap coordinate list to binary database

Synopsis

coord_compile [--size=<X>x<Y>] <coord_file> [-o <xy_file>]

Description

Compile coordinate list in CSV (comma-separated values) format to binary database suitable for direct use by MapMap. Coordinate lists can be in two formats: with relative and absolute coordinates. Using relative coordinates allows to utilize the same coordinate list to produce binary databases for different resolutions of the same map.

Format of coordinate list is:

object_name,x,y
I.e., object name (string) followed by its X and Y coordinates. For relative list, the coordinates are fractional numbers in range [0,1) (from zero including it to one not including it). All relative coordinates must start with "0." . Absolute coordinates are simply non-negative integer numbers. If name contains comma, it must be enclosed with double-quoutes ("). It is safe to enclose any string to double-quotes either. The whole list must be sorted in alphabetical order, case-insensetively.

Options:

--size=<X>x<Y>
Specify map image size for relative coordinate list. This option must be given if coordinates are given in relative form. Absolute coordinate which is written to binary database is calculated by multiplying relative coordinate by the cooresponding dimension specified by this option. Syntax of right-hand side is two positive integer numbers separated by literal 'x'.
-o <xy_file>
Name if the binary database to create (must have .xy extension).

Examples

Relative coordinate list

Addis,0.572151,0.466407
Adelaide,0.834587,0.719010
AFGHANISTAN,0.634326,0.335547
Ahmadabad,0.669028,0.396744
Al Basrah,0.589141,0.350521
Al Jizah,0.547210,0.358985
"Alaska, US",0.547210,0.358985

Absolute coordinate list

Addis,572,466
Adelaide,834,719
AFGHANISTAN,634,336

Compiling relative coordinate list

	coord-compile --size=2759x1537 World.coord -o World.xy