Files
documentdb/pg_helio_api
Deepak Bisht bf9ef6e59e Merged PR 1247537: [Pgmong][Geospatial] - 2d segmentize takes a huge time for large query boxes.
So in the earlier PR to segmentize the given geography query with 500km of segment length we were deriving the segment length for 2d using this strategy:

1- 2d distance of (0,0 to 1,1) => 1.41
2- 2dsphere distance of (0, 0 to 1, 1) =>156.9Km

So the segment length for 2d becomes => ( 500 ) / (157/1.41) -> ~4.41

But this is only true if the 2d bounds are similar to earth coordinates and will start taking time when query boxes are bigger than earth bounds.

So in this PR I approximately scale up the segment length based on the size of the 2d region. So that segmentize should work relative to the given size

Related work items: #2894618
2024-02-14 11:28:20 +03:00
..
2024-02-14 11:28:20 +03:00
2024-01-12 19:10:20 +00:00