Database Reference
In-Depth Information
MAX(run_time) as end_time
INTO chp03.tracks
FROM (
SELECT the_geom,
"time"::date as run_date,
"time" as run_time
FROM chp03.rk_track_points
ORDER BY run_time
) AS foo GROUP BY run_date;
6. Beforequeryingthecreatedtables,don'tforgettoaddspatialindexestoboth
of the tables to improve their performance, as follows:
postgis_cookbook=# CREATE INDEX
rk_track_points_geom_idx ON
chp03.rk_track_points USING
gist(the_geom);
postgis_cookbook=# CREATE INDEX
tracks_geom_idx ON chp03.tracks USING
gist(the_geom);
7. IfyoutrytoopenboththespatialtablesonaDesktopGISonanygivenday,
youshouldseethatthepointsfromthe rk_track_points tablecompose
a single polyline geometry record in the tracks table, as shown in the fol-
lowing screenshot:
Search WWH ::




Custom Search