我有几条相同路线的视频轨道,全年在不同的场合拍摄。所有的视频轨道都带有GPS标签,带有1Hz的GPS,所以我有所有镜头的秒针。PostGIS:通过GPS同步时间码点
我想完成的是将所有这些视频轨道放入例如After Effects后,通过GPS位置重新映射时间。我无法按时间同步轨道,因为路线包括红绿灯和其他障碍物。
我已经开始创建两个表格:一个叫夏天,这是主要的视频轨道,另一个叫镜头,它包含所有其他的镜头。
夏天表看起来像这样:
Column | Type | Modifiers | Storage | Description
-----------+------------------------+--------------------------------------------------------------------+---------+-------------
id | integer | not null default nextval('summer_id_seq'::regclass) | plain |
timecode | time without time zone | not null | plain |
spring_id | integer | | plain |
autumn_id | integer | | plain |
winter_id | integer | | plain |
point | geometry(Point,4326) | not null | main |
Indexes:
"summer_pkey" PRIMARY KEY, btree (id)
"summer_autumn_id" btree (autumn_id)
"summer_point_id" gist (point)
"summer_spring_id" btree (spring_id)
"summer_winter_id" btree (winter_id)
Foreign-key constraints:
"summer_autumn_id_fkey" FOREIGN KEY (autumn_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
"summer_spring_id_fkey" FOREIGN KEY (spring_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
"summer_winter_id_fkey" FOREIGN KEY (winter_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
Has OIDs: no
虽然出手表看起来像这样:
Column | Type | Modifiers | Storage | Description
----------+------------------------+-------------------------------------------------------------------+----------+-------------
id | integer | not null default nextval('shot_id_seq'::regclass) | plain |
season | character varying(255) | not null | extended |
timecode | time without time zone | not null | plain |
point | geometry(Point,4326) | not null | main |
Indexes:
"shot_pkey" PRIMARY KEY, btree (id)
"shot_point_id" gist (point)
Referenced by:
TABLE "summer" CONSTRAINT "summer_autumn_id_fkey" FOREIGN KEY (autumn_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
TABLE "summer" CONSTRAINT "summer_spring_id_fkey" FOREIGN KEY (spring_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
TABLE "summer" CONSTRAINT "summer_winter_id_fkey" FOREIGN KEY (winter_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
Has OIDs: no
所以,基本上我想要做的,是通过所有的行运行在夏季表中,查找每个不同拍摄的最接近每一行的点,并使用此信息更新夏季表。
我已经把一个查询,我个人不明白为什么不工作,但输出是怪异,并且不随时间重映射在After Effects在所有的工作:
SELECT DISTINCT ON (summer.id)
summer.id AS summer_id, shot.id AS autumn_id,
ST_Distance_Sphere(summer.point, shot.point) AS distance
FROM shot.summer summer
LEFT JOIN shot.shot.track
ON ST_DFullyWithin (summer.point, shot.point, 0.001)
AND shot.season='autumn'
ORDER BY summer.id ASC;
有人能指引我走向正确的方向吗?
谢谢!