コード例 #1
0
ファイル: boundaries.c プロジェクト: nutellarlz/Navination
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
ファイル: coastline.c プロジェクト: justinzane/navit
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;
}