75 lines
2.4 KiB
Text
75 lines
2.4 KiB
Text
![]() |
|
||
|
|
||
|
GIOChannel* g_io_channel_unix_new (int fd);
|
||
|
g_io_channel_set_encoding() function with NULL
|
||
|
GIOStatus g_io_channel_set_encoding (GIOChannel *channel,
|
||
|
const gchar *encoding,
|
||
|
GError **error);
|
||
|
guint g_io_add_watch (GIOChannel *channel,
|
||
|
GIOCondition condition,
|
||
|
GIOFunc func,
|
||
|
gpointer user_data);
|
||
|
gboolean (*GIOFunc) (GIOChannel *source,
|
||
|
GIOCondition condition,
|
||
|
gpointer data);
|
||
|
FALSE for end watch
|
||
|
|
||
|
|
||
|
Distance Point To Line:
|
||
|
(for Peuker)
|
||
|
|
||
|
d = |v^^.r| = (|(x_2-x_1)(y_1-y_0)-(x_1-x_0)(y_2-y_1)|)
|
||
|
/
|
||
|
(sqrt((x_2-x_1)^2+(y_2-y_1)^2))
|
||
|
|
||
|
- Ausgleichskurve
|
||
|
Ausgleichsrechnung
|
||
|
Interpolation
|
||
|
|
||
|
* Peuker line simplification
|
||
|
* auto-split tracks
|
||
|
if track has "gaps" then split track into two tracks.
|
||
|
A gap is when in a group of four points A, B, C, D the distance
|
||
|
from A to B and C to D is about the same but B to C is "a lot" more.
|
||
|
* spike filter
|
||
|
calculate mean deviation of all points of one track, then
|
||
|
delete all points that have deviation > delta,
|
||
|
recalculate mean deviation and redo
|
||
|
* mean of two tracks A, B
|
||
|
for each point of track A calculate distance to
|
||
|
track B and create a new point on a new track in the middle of the
|
||
|
distance. Next do the same process for all point of track B.
|
||
|
The new track lies in the middle between A and B.
|
||
|
Requires component-wise distance function with direction, i.e. e.g.
|
||
|
distance of point is x=-5 and y=3 to track.
|
||
|
* merge of two tracks
|
||
|
for each point of track A find nearest corresponding point on
|
||
|
track B, then calculate the average between both points and record
|
||
|
this as new track point
|
||
|
Repeat this for each point of track B.
|
||
|
Limit the averaging to a maximum distance.
|
||
|
|
||
|
|
||
|
SQLite tables
|
||
|
-------------
|
||
|
tracks track headers (streets, boundaries, rivers, ...)
|
||
|
idx pkey index
|
||
|
tid track id, id common to all data points of one track
|
||
|
name track-/streetname
|
||
|
ttype track-/streettype
|
||
|
latmin bbox latitude min
|
||
|
lonmin
|
||
|
latmax
|
||
|
lonmax
|
||
|
trackpts the actual track (all tracks combined in one table?)
|
||
|
lat
|
||
|
lon
|
||
|
ele
|
||
|
dtim
|
||
|
nrsat
|
||
|
hdop
|
||
|
vdop
|
||
|
pdop
|
||
|
points POIs
|
||
|
cities name, center location, "size"
|