49 if(
locid == -1)
return;
94 return count < 0 ? 0 : count;
103 gchar *path1, *path2;
131 t->count =
tc->count;
162 for(
int i = 0;
i <
ld->data.plg_pts;
i++,
p++)
176 ld->data.plg_pts = 0;
182 gboolean inside =
FALSE;
185 float lon1 =
plp->lon;
187 for(
int i = 0;
i < plg_pts;
i++)
200 if(!(((lat1 >
pt->lat) && (lat2 >
pt->lat)) ||
203 const float sl = lon1 + (lon2 - lon1) * (
pt->lat - lat1) / (lat2 - lat1);
222 if(result && *result)
268 if(
locid == -1)
return;
283 gboolean inside =
TRUE;
405 (((
g->lon -
lon) * (
g->lon -
lon) / (
g->delta1 *
g->delta1) +
406 (
g->lat -
lat) * (
g->lat -
lat) / (
g->delta2 *
g->delta2)) <= 1.0))
GList * dt_location_repository_get_in_bbox(const dt_map_box_t *const bbox)
Locations whose extent overlaps bbox.
gboolean dt_location_repository_get_polygon(const guint locid, void **blob, gint *bytes)
The raw polygon blob of locid.
GList * dt_location_repository_find_images_for_location(const guint locid, const int shape)
Images whose coordinates fall inside location locid.
GList * dt_location_repository_get_image_locations(const int32_t imgid)
Location (tag) ids currently attached to imgid. GINT_TO_POINTER list.
void dt_location_repository_set_data(const guint locid, const dt_map_location_data_t *g)
Insert or replace the geometry of locid, polygon blob included.
void dt_location_repository_delete(const guint locid)
Drop the geometry row of locid. The tag itself is the tag repository's.
GList * dt_location_repository_find_locations_for_image(const int32_t imgid)
Locations whose shape contains imgid's coordinates.
dt_map_location_data_t * dt_location_repository_get_data(const guint locid, const char *name_prefix)
The geometry of locid, if it is a real location.
data.locations: the geometry of a geotagging location.
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
@ MAP_LOCATION_SHAPE_POLYGONS
@ MAP_LOCATION_SHAPE_RECTANGLE
@ MAP_LOCATION_SHAPE_ELLIPSE
One row of a geo query: an id with the position that matched.
int dt_tag_repository_count_attachments(const guint tagid)
How many attachment ROWS tagid has, or -1 if the count could not be read. See dt_tag_repository_count...
GList * dt_tag_repository_get_by_path_with_counts(const char *path, const char *path_prefix)
Tags at path or below it, each with the number of distinct images carrying it.
void dt_tag_count_free(gpointer data)
Release one dt_tag_count_t, name included. Suits g_list_free_full().
data.tags and main.tagged_images.