logo separator

[mkgmap-dev] [PATCH v2] - support for extended type attributes

From Mark Burton markb at ordern.com on Sun Aug 23 01:02:19 BST 2009

v2 - moving swiftly on.

Added support for lights and reworked a few things.

mkgmap:xt-foundation-colour is now just mkgmap:xt-colour

mkgmap:xt-light-colour has been replaced with mkgmap:xt-light (more on
this below)

mkgmap:xt-light-type is now just mkgmap:xt-type

Light colour, range (in nm) and angle is now specified with the
mkgmap:xt-light tag - the values are just separated with commas, and
only the colour is required for simple lights. All angles are in
degrees. So, for example:

mkgmap:xt-light=red (a red light)
mkgmap:xt-light=red,5 (... visible at up to 5 nm)
mkgmap:xt-light=red,5,172 (... sector starts at 172 degrees)

The sector start angle only makes sense if you have multiple lights
defined (separate light defs with one of /;:) - for example:

mkgmap:xt-light=red,5,172/green,5,230/unlit,,300

you can add a text note, international designator or local designator
to a buoy or light with:

mkgmap:xt-note=hello world
mkgmap:xt-int-desig=ABC
mkgmap:xt-local-desig=XYZ

These show up in the POI properties window in mapsource.

There is also:

mkgmap:xt-height-above-foundation (a height)
mkgmap:xt-height-above-datum (a height)
mkgmap:xt-leading-angle (an angle)

you can now specify multiple period values to give a flash sequence
but, unfortunately, it only encodes 2 values at the moment, the
encoding for more than 2 values is yet to be discovered.

The full range of light colours is now supported:

	"unlit",
	"red",
	"green",
	"white",
	"blue",
	"yellow",
	"violet",
	"amber"

So, lights, buoys, obstructions are now fairly well catered for so it's
probably time to look at lines and areas.

------------------------------------------------


Yo Landlubbers,

Here's the first cut at encoding support for extended type attributes.

This is mostly concerned with marine entities like (wreck depths, buoy
types, light types, colours, etc.) As there is quite a lot of it and I
haven't sussed it all out yet, I thought it would make sense to post
patches as I go along so that people can try it out and find the
bugs sooner rather than later.

The attribute values are supplied as special tags with a mkgmap:xt-
prefix. So, for example, mkgmap:xt-depth=40.6m specifies the depth of
something (in metres).

This first tranche supports:

Point types 0x0102xx (buoys/beacons) can have:
  mkgmap:xt-foundation-colour (a colour name from list FC below)
  mkgmap:xt-light-colour (a colour name from list LC below)
  mkgmap:xt-light-type (a type name from list LT below)
  mkgmap:xt-period (optional period in secs (not limited to integer)

Point types 0x0103xx (entities with depth/height) and 0x0104xx
(obstructions) mkgmap:xt-depth (a depth with optional units (ft or m)
default is m) mkgmap:xt-height (alias for, and mutually exclusive to,
xt-depth) mkgmap:xt-position (an optional position from list P below)

These attributes are turned into a sequence of bytes that are embodied
in the map object. For testing purposes you can also specify those bytes
explicitly as a sequence of hex digits using the mkgmap:xt-extra-bytes
tag but you won't want to use that unless you are working on attribute
value encoding (like me!)

Next up will be lights which I understand how to encode except for
multiple lights and angles - still working on that.

Then will come lines and areas.

All feedback welcome.

BTW a good source of info is the cgpsmapper manual which is readily
available on the net. It has a chapter on marine types.

---------------------------------

List FC
			"red",
			"green",
			"yellow",
			"white",
			"black",
			"black-yellow",
			"white-red",
			"black-red",
			"white-green",
			"red-yellow",
			"red-green",
			"orange",
			"black-yellow-black",
			"yellow-black",
			"yellow-black-yellow",
			"red-white",
			"green-red-green",
			"red-green-red",
			"black-red-black",
			"yellow-red-yellow",
			"green-red",
			"black-white",
			"white-orange",
			"orange-white",
			"green-white"

List LC
			"unlit",
			"red",
			"green",
			"white",

There is possibly some more light colours but I don't yet know how to
encode them so we should stick with these for the moment.

List LT
			"fixed",
			"isophase",
			"flashing",
			"group flashing",
			"composite group flashing",
			"occulting",
			"group occulting",
			"composite group occulting",
			"long flashing",
			"group long flashing",
			"morse",
			"quick",
			"group quick",
			"group quick and long flashing",
			"interrupted quick",
			"very quick",
			"group very quick",
			"group very quick and long flashing",
			"interrupted very quick",
			"ultra quick",
			"interrupted ultra quick",
			"fixed and occulting",
			"fixed and group occulting",
			"fixed and isophase",
			"fixed and flashing",
			"fixed and group flashing",
			"fixed and long flashing",
			"alternating",
			"alternating occulting",
			"alternating flashing",
			"alternating group flashing"

The morse type takes a letter argument but I don't know how to encode
that yet.

 List P
			"unknown",
			"doubtful",
			"existence doubtful",
			"approximate",
			"reported"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mb-xtype-attributes-v2.patch
Type: text/x-patch
Size: 24121 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090823/7ffe8f56/attachment.bin 


More information about the mkgmap-dev mailing list