예제 #1
0
static void process_boundaries_member(void *func_priv, void *relation_priv, struct item_bin *member, void *member_priv)
{
	//fprintf(stderr,"process_boundaries_member:001\n");

	struct boundary *b = relation_priv;
	enum geom_poly_segment_type role = (long) member_priv;



	int *dup;
	dup=item_bin_get_attr(member,attr_duplicate_way,NULL);

	// only add way to boundary if this way is not already added
	if(!dup || *dup == 0)
	{
		b->segments = g_list_prepend(b->segments, item_bin_to_poly_segment(member, role));
		// fprintf(stderr, "process_boundaries_member: dupdup wayid=%lld %p\n", item_bin_get_wayid(member), dup);
	}
	else
	{
		// fprintf(stderr, "process_boundaries_member: dup=true wayid=%lld\n", item_bin_get_wayid(member));
	}

	//fprintf(stderr,"process_boundaries_member:099\n");
}
예제 #2
0
파일: boundaries.c 프로젝트: greg42/navit
static void
process_boundaries_member(void *func_priv, void *relation_priv, struct item_bin *member, void *member_priv)
{
	struct boundary *b=relation_priv;
	enum geom_poly_segment_type role=(long)member_priv;
	int *dup;
	dup=item_bin_get_attr(member,attr_duplicate,NULL);
	if(!dup || *dup==0)
		b->segments=g_list_prepend(b->segments,item_bin_to_poly_segment(member, role));
}
예제 #3
0
static GList *
tile_data_to_segments(int *tile_data)
{
	int *end=tile_data+tile_data[0];
	int *curr=tile_data+1;
	GList *segments=NULL;
	int count=0;

	while (curr < end) {
		struct item_bin *ib=(struct item_bin *)curr;
		segments=g_list_prepend(segments,item_bin_to_poly_segment(ib, geom_poly_segment_type_way_right_side));
		curr+=ib->len+1;
		count++;
	}
#if 0
	fprintf(stderr,"%d segments\n",count);
#endif
	return segments;
}