Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6701677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:57:46+00:00 2026-05-26T06:57:46+00:00

Project Background: I am writing a map tile overlay class for java that can

  • 0

Project Background:
I am writing a map tile overlay class for java that can use gdal2tile.py tiles. Basically I will end up with thousands of jpg files that are in a file structure like
“Zoom Level/X coordinate/Y coordinate”
The coordinates are ints but will not necessarily start at 0 or 1.
I will have to search for tiles that are within a certain range to find out which ones I need to render.

My Problem:
I tried iterating using the file structure itself but it is wicked slow (not surprising).
I tried iterating using an ArrayList of strings of the file structure and .contains() but it seems to be even slower (not too surprising).
Optimally I would like to use a data structure that would let me choose a range on multiple dimensions so that I can call something like.

Tiles.getWhere(Zoom Level,min X,max X,min Y,maxY);

I assume that some sort of Collection or TreeMap would be the right choice but I’m not experienced enough with Java to know for sure and I’d prefer not to have to benchmark a lot of different approaches.

I could use SQLite to do it but that seems like overkill.

My Question:
What is the most efficient way to check for the existence of datasets given multiple dimensional constraints?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:57:46+00:00Added an answer on May 26, 2026 at 6:57 am

    May be you are looking for a map with multiple keys.

    Commons-collections provides a map with multiple lookup keys:

    http://commons.apache.org/collections/apidocs/org/apache/commons/collections/map/MultiKeyMap.html

    a map guarantees a O(1) insertion and O(1) selection timings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background A project installs some files that contain all the elements to define a
Background : I have a asp.net webapplication project that should contain a public and
Background I'm adding some features to a project that uses subversion - I'm using
Background I have an Android project that has a database with two tables: tbl_question
Background: In our project, we have a bunch of xml files that define tests
How can i access my project sessions in background thread in my c#.net webapplication?
My project requires a background thread to initiate the creation of a WPF control
Background: I am developing a largish project using at Atmel AVR atmega2560. This project
Background: Trevor was working on a test project solely for the purpose of trying
The Background A Cocoa Non Document Core Data project with two Managed Object Models.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.