package com.xiaopeng.map.mangodb.service;
|
|
import com.xiaopeng.api.model.map.XpGeoFencingPolygon;
|
import com.xiaopeng.common.core.web.service.BaseService;
|
import com.xiaopeng.map.mangodb.model.GeoPoint;
|
import org.bson.Document;
|
import org.springframework.stereotype.Repository;
|
|
import java.util.List;
|
|
/**
|
* MongoDB Repository for XpGeoFencingPolygon
|
* @author zhibing.pu
|
* @date 2023/4/29 23:53
|
*/
|
@Repository
|
public interface XpGeoFencingPolygonService extends BaseService<XpGeoFencingPolygon> {
|
|
/**
|
* 查找包含指定点的所有围栏
|
* @param point
|
* @param collectionName
|
* @param geoFieldName
|
* @return
|
*/
|
List<String> findFencesContainingPoint(GeoPoint point, String collectionName, String geoFieldName);
|
|
/**
|
* 判断点是否在围栏内
|
* @param longitude
|
* @param latitude
|
* @param fenceId
|
* @param collectionName
|
* @return
|
*/
|
boolean isInFence(double longitude, double latitude, String fenceId, String collectionName);
|
|
/**
|
* 查找指定父围栏ID的禁行区域点位
|
* @param parentId
|
* @param parentIdField
|
* @param collectionName
|
* @return
|
*/
|
List<Document> findPointsByParentId(String parentId, String parentIdField, String collectionName);
|
}
|