thekingofkings / embedding

Dynamic graph embedding
MIT License
11 stars 7 forks source link

Mapping trips into communities takes a long time #2

Closed thekingofkings closed 7 years ago

thekingofkings commented 7 years ago

Mapping a sequences of Point into n MultiPolygon takes a long time

Mapping 828,677 trips into 77 regions takes 51 seconds.

Currently solution iterates through all Polygons for each Point. This O(nk) solution is too slow.

Use some spatial index tree to improve.

thekingofkings commented 7 years ago

Possible solution STRtree.

Polygon and Point are wrapped into a Envelope and inserted into the tree.

thekingofkings commented 7 years ago

Processing 1,199,056 trips takes 80 seconds.

thekingofkings commented 7 years ago

This is addressed by Java Serialize and Deserialize methods