简体   繁体   English

如何使用空间数据库检查从地理围栏传出的 AIS 信号?

[英]How to check an AIS signal is outgoing from a geofence with spatial database?

I have tens of thousands of geofences on the AWS Redshift table A.我在 AWS Redshift 表 A 上有数以万计的地理围栏。

And also logging of tens of thousands of AIS signals every 1 hour on table B.并且还在表 B 上每 1 小时记录数万个 AIS 信号。

However, I want to check and log that which AIS is incoming or outgoing for whole geofences.但是,我想检查并记录整个地理围栏的传入或传出 AIS。

How can I achieve that?我怎样才能做到这一点?

From your description of the problem, I would guess that a geofence needs to be transformed into a polygon using ST_Polygon().根据您对问题的描述,我猜测需要使用 ST_Polygon() 将地理围栏转换为多边形。 Once you have your polygons (table A), you will need to take the AIS signals and transform them into geolocation points (table B) using ST_Point().获得多边形(表 A)后,您将需要获取 AIS 信号并使用 ST_Point() 将它们转换为地理定位点(表 B)。

When you have all your data transformed into compatible geolocation format - you will use the ST_Contains().当您将所有数据转换为兼容的地理定位格式时,您将使用 ST_Contains()。

I will add that geolocation data might take sometime in Redshift and you will most likely have to do a cartesian product of all your polygons vs all your geolocation points.我会补充一点,地理定位数据在 Redshift 中可能需要一些时间,您很可能必须对所有多边形与所有地理定位点进行笛卡尔积。

I hope I understood your problem properly.我希望我能正确理解你的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM