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 8904405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:07:18+00:00 2026-06-15T02:07:18+00:00

I do this on Android with Google Maps. I have an arraylist of GeoPoint’s.

  • 0

I do this on Android with Google Maps.

I have an arraylist of GeoPoint’s.
GeoPoint API is here.

List<GeoPoint> geoPoints;

Now I want to check the frequency of each GeoPoint.
If there is some intersect (because two of them are equal) I want to print out a debug log.

Collections.frequency(geoPoints, geoPoints.get(i)); doesn’t return me the correct result, it doesn’t check if two points intersect…

  • 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-06-15T02:07:20+00:00Added an answer on June 15, 2026 at 2:07 am

    Most likely, while drawing with a finger on the map you will never have two geopoints on exactly same location.

    The simplest approach you can use is to test the distance from one geopoint projection coordinates to the other, and if this distance is less then a thresould value it would be consider the same point.

    Example

    projection.toPixels(geoArrList.get(i), pointToTest);
    
    Point p1 = new Point();
    for(int i=0; i<geoArrList.size(); i++){
        projection.toPixels(geoArrList.get(i), p1);
        int squareDistance = ((pointToTest.x - p1.x) * (pointToTest.x - p1.x) +
            (pointToTest.y - p1.y) * (pointToTest.y - p1.y));
        if(squareDistance  < THRESOULD){
            //same point
        }
    }
    

    Regards.

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

Sidebar

Related Questions

We have this android app that uses the maps api. Now when we run
I am trying to implement this example http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html and i have followed exactly all
I am using the google maps api with overlay items and want to be
I want to use com.google.android.maps.MapView, but can't figure out how to download the library
I have a problem with Google Maps in my Android app. I've switched to
Is it possible not only to have Google Maps on Android show a given
I am developing an android application using google maps. I have to display some
I am doing a Google MAPS application in android. I have installed the 2
I already made a simple android application, which I also have integrated Google Maps
I have a class : class MapItemizedOverlay extends com.google.android.maps.ItemizedOverlay<OverlayItem> { private Context context; private

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.