Esempio n. 1
0
        private CellPassesV2Result GetRaptorResult(CellPassesRequest request)
        {
            bool   isGridCoord  = request.probePositionGrid != null;
            bool   isLatLgCoord = request.probePositionLL != null;
            double probeX       = isGridCoord ? request.probePositionGrid.x : (isLatLgCoord ? request.probePositionLL.Lon : 0);
            double probeY       = isGridCoord ? request.probePositionGrid.y : (isLatLgCoord ? request.probePositionLL.Lat : 0);

            var raptorFilter = RaptorConverters.ConvertFilter(request.filter, request.ProjectId, raptorClient, overrideAssetIds: new List <long>());

            int code = raptorClient.RequestCellProfile
                           (request.ProjectId ?? VelociraptorConstants.NO_PROJECT_ID,
                           RaptorConverters.convertCellAddress(request.cellAddress ?? new CellAddress()),
                           probeX, probeY,
                           isGridCoord,
                           RaptorConverters.ConvertLift(request.liftBuildSettings, raptorFilter.LayerMethod),
                           request.gridDataType,
                           raptorFilter,
                           out var profile);


            if (code == 1)//TICServerRequestResult.icsrrNoError
            {
                return(ConvertRaptorResult(profile));
            }

            return(null);
        }
Esempio n. 2
0
        protected override async Task <ContractExecutionResult> ProcessAsyncEx <T>(T item)
        {
            var request = CastRequestObjectTo <CellPassesRequest>(item);

#if RAPTOR
            if (UseTRexGateway("ENABLE_TREX_GATEWAY_CELL_PASSES"))
            {
#endif

            await PairUpAssetIdentifiers(request.ProjectUid.Value, request.filter);
            await PairUpImportedFileIdentifiers(request.ProjectUid.Value, filter1 : request.filter);

            return(await GetTRexCellPasses(request));

#if RAPTOR
        }

        bool isGridCoord  = request.probePositionGrid != null;
        bool isLatLgCoord = request.probePositionLL != null;
        double probeX     = isGridCoord ? request.probePositionGrid.x : (isLatLgCoord ? request.probePositionLL.Lon : 0);
        double probeY     = isGridCoord ? request.probePositionGrid.y : (isLatLgCoord ? request.probePositionLL.Lat : 0);

        var raptorFilter = RaptorConverters.ConvertFilter(request.filter, request.ProjectId, raptorClient, overrideAssetIds: new List <long>());

        int code = raptorClient.RequestCellProfile
                       (request.ProjectId ?? VelociraptorConstants.NO_PROJECT_ID,
                       RaptorConverters.convertCellAddress(request.cellAddress ?? new CellAddress()),
                       probeX, probeY,
                       isGridCoord,
                       RaptorConverters.ConvertLift(request.liftBuildSettings, raptorFilter.LayerMethod),
                       request.gridDataType,
                       raptorFilter,
                       out var profile);

        if (code == 1)//TICServerRequestResult.icsrrNoError
        {
            return(ConvertResult(profile));
        }

        return(null);
#endif
        }