I'm wondering how to make it so that each individual map will have a uniquely colored centerline? This would be very helpful for differentiating between different surveys at a glance. In the following example, I would like to to have clay_splay and clay_center be drawn in different colors. The map that I am selecting in thconfig is clay_main, by the way. <code> map clay_splay -proj plan splay.trip2 splay.trip3 endmap map clay_center -proj plan center.trip2 center.trip3 endmap map clay_main clay_splay clay_center endmap clay_main </code> I've attached a PDF that shows roughly what I have in mind, although the alternating blue and green is not necessary. They can both be the same color, as long as that color isn't the same as the centerline :-). Does there happen to be a metapost wizard out there who might have an idea? Thanks in advance! -- -Jonny ^v^
I've made some progress in my attempt at having splay legs be colored differently from regular survey legs, but I'm afraid I've hit a wall. I've added "-attr splay on" to all surveys that consist of nothing but splay legs. This makes it necessary that I record splay legs and regular legs in different surveys within therion. This is a bit of a pain, but it will work for now. In order to take advantage of the "splay" custom attribute, I've also redefined the metapost macro responsible for drawing centerlines: def l_survey_cave(expr p) = pickup PenD; if known ATTR_splay: draw p withcolor green; else: draw p withcolor red; fi; enddef; The macro works as it should. If a survey has the "splay" custom attribute (value doesn't matter), the survey will be colored green. Unfortunately, ALL survey lines are colored green, not just the ones with the "splay" attribute. I think this is because internally, therion combines all surveys into a single object to draw them. Therefore, if any survey has the "splay" attribute, "if known ATTR_splay:" will return true for the entire thing. If this is the case, is there any way to limit the scope of the "splay" custom attribute? I think using this splay attribute is a nasty hack, considering therion already maintains meta data that determines whether a given survey leg is a splay shot or not. Is there a way to check what flags a station/leg has set from within metapost? Something similar to the following: def l_survey_cave(expr p) = pickup PenD; if splay_flag_set: draw p withcolor green; else: draw p withcolor red; fi; enddef; -- -Jonny ^v^
This is exactly the problem: currently therion is not able to handle attributes individually for shots. But this item is already in the TODO list, I will try to implement is ASAP. Regards, S. On Sun, Apr 13, 2008 at 9:05 PM, Jonathan Prouty <dormat@gmail.com> wrote:
I've made some progress in my attempt at having splay legs be colored differently from regular survey legs, but I'm afraid I've hit a wall.
I've added "-attr splay on" to all surveys that consist of nothing but splay legs. This makes it necessary that I record splay legs and regular legs in different surveys within therion. This is a bit of a pain, but it will work for now.
In order to take advantage of the "splay" custom attribute, I've also redefined the metapost macro responsible for drawing centerlines:
def l_survey_cave(expr p) = pickup PenD; if known ATTR_splay: draw p withcolor green; else: draw p withcolor red; fi; enddef;
The macro works as it should. If a survey has the "splay" custom attribute (value doesn't matter), the survey will be colored green. Unfortunately, ALL survey lines are colored green, not just the ones with the "splay" attribute.
I think this is because internally, therion combines all surveys into a single object to draw them. Therefore, if any survey has the "splay" attribute, "if known ATTR_splay:" will return true for the entire thing. If this is the case, is there any way to limit the scope of the "splay" custom attribute?
I think using this splay attribute is a nasty hack, considering therion already maintains meta data that determines whether a given survey leg is a splay shot or not. Is there a way to check what flags a station/leg has set from within metapost? Something similar to the following:
def l_survey_cave(expr p) = pickup PenD; if splay_flag_set: draw p withcolor green; else: draw p withcolor red; fi; enddef;
-- -Jonny ^v^ _______________________________________________ Therion mailing list Therion@speleo.sk http://www.speleo.sk/mailman/listinfo/therion
participants (2)
-
Jonathan Prouty -
Stacho Mudrak