I was wondering how to best represent the inside of any given polygon (GeoJSON coordinates) with some sort of indexing, like a grid or quadtree? See image below for an approximation of what I have in mind.

enter image description here

Is there any library in Python or Java that can help me with this?

  • If you have a single polygon, how would you define the varied tile resolution that are inside? tile angle?
    – klewis
    Commented Mar 29, 2019 at 20:48
  • What's the use case? How about rtree? toblerity.org/rtree
    – mikewatt
    Commented Mar 29, 2019 at 23:02
  • How is this image created from the QuadTree? I need to do something similar
    – Tom McLean
    Commented Mar 31, 2023 at 21:33

1 Answer 1


Java JTS has a Quadtree implementation built in.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.