-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High memory usage in getting s2 cell covering #79
Comments
On observing the length of the Priority queue for around 100K polygons, I found that its max value for a polygon was less than 1000 for almost all the polygons, except the ones which were having memory issues. For polygons that were having issues, the maximum length of the Priority queue went up to 1,5000,000 and higher, thus causing memory issues. |
Sample Code snippet for the idea(not working): // divide all merged cells to minCellLevel // convert []cellID to []unit64 func getCellUnionForPolygon(polygon [][][]float64, minCellLevel int, maxCellLevel int, maxNumCells int) (s2.CellUnion) {
} """ |
Found same problem |
Hello there!!
I have a use case, where I need to convert 2D polygons to S2 cells.
For some polygons, I am observing very high memory usage(~20GB) or so.
I am fetching cells with levels between 10 to 15 for a small region(<1Km^2 or so).
After creating RegionCoverer for a polygon, I am using CellUnion function call to get the cell covering of the given polygon.
On checking the issue, I found that the length of RegionCoverer PriorityQueue containing intersecting or concerning cells keeps increasing.
High memory usage leads to the docker container getting killed in my application.
Can someone please help me with this?
Example geoJSON of one of the polygons:
"""{
"type": "Polygon",
"coordinates": [
[
[
55.491351226746794,
25.421007109833486
],
[
55.493892523236426,
25.42236515986828
],
[
55.493006607451655,
25.421891733268737
],
[
55.49234900420578,
25.421906989899732
],
[
55.491351226746794,
25.421007109833486
]
]
]
}"""
The text was updated successfully, but these errors were encountered: