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

  • SEARCH
  • Home
  • 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 8664009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:08:11+00:00 2026-06-12T17:08:11+00:00

From Google Earth I got a Box with coordinates for a picture, like following:

  • 0

From Google Earth I got a Box with coordinates for a picture, like following:

    <LatLonBox>
        <north>53.10685</north>
        <south>53.10637222222223</south>
        <east>8.853144444444444</east>
        <west>8.851858333333333</west>
        <rotation>-26.3448</rotation>
    </LatLonBox>

Now I want to test weather a point intersect with this LatLonBox.
My base idea to check, whether a point intersect with the LatLonBox was, to rotate the point back by the given angle, and then to test whether the point intersect with a regular (not rotated) rectangle.

I tried to calculate the rotation manually:

public static MyGeoPoint rotatePoint(MyGeoPoint point, MyGeoPoint origion, double degree)
{
double x = origion.getLatitude() + (Math.cos(Math.toRadians(degree)) * (point.getLatitude() - origion.getLatitude()) - Math.sin(Math.toRadians(degree)) * (point.getLongitude() - origion.getLongitude()));
double y =  origion.getLongitude()  + (Math.sin(Math.toRadians(degree)) * (point.getLatitude() - origion.getLatitude()) + Math.cos(Math.toRadians(degree))  * (point.getLongitude() - origion.getLongitude()));

return new MyGeoPoint(x, y);

}

public boolean intersect(MyGeoPoint geoPoint)
{   
    geoPoint = MyGeoPoint.rotatePoint(geoPoint, this.getCenter(), - this.getRotation());
    
    return (geoPoint.getLatitude() < getTopLeftLatitude()
            && geoPoint.getLatitude() > getBottomRightLatitude()
                && geoPoint.getLongitude() > getTopLeftLongitude()
                    && geoPoint.getLongitude() < getBottomRightLongitude());
}

And it seems that the results are wrong.

    LatLonBox box = new LatLonBox(53.10685, 8.851858333333333, 53.10637222222223, 8.853144444444444, -26.3448);
    
    MyGeoPoint point1 = new MyGeoPoint(53.106872, 8.852311);
    MyGeoPoint point2 = new MyGeoPoint(53.10670378322918, 8.852967186822669);   
    MyGeoPoint point3 = new MyGeoPoint(53.10652664993972, 8.851994565566875);
    MyGeoPoint point4 = new MyGeoPoint(53.10631650700605, 8.85270995172055);
    
    System.out.println(box.intersect(point1));
    System.out.println(box.intersect(point2));
    System.out.println(box.intersect(point3));
    System.out.println(box.intersect(point4));

The result is true, false, false, true. But it should be 4x true.
Probably I´, making some kind of error in reasoning.
Maybe because the latitude values are getting bigger upwards. But I don´t knwo how to change the formular.

I need some help …


EDIT:
I think my basic idea and formular is right. Also I found similar solutions eg. link and couldn´t find any difference.

So I think the only possible error source is, that the axis are not proportional. So the problem is how to take account of this.

I hope someone has got an idea.

  • 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-12T17:08:12+00:00Added an answer on June 12, 2026 at 5:08 pm

    The problem was indeed that the axis were not proportional.

    The following method takes care of it.

    public static MyGeoPoint rotatePoint(MyGeoPoint point, MyGeoPoint origion, double degree)
    {
    double x =  origion.longitude   + (Math.cos(Math.toRadians(degree)) * (point.longitude - origion.longitude) - Math.sin(Math.toRadians(degree))  * (point.latitude - origion.latitude) / Math.abs(Math.cos(Math.toRadians(origion.latitude)));
    double y = origion.latitude + (Math.sin(Math.toRadians(degree)) * (point.longitude - origion.longitude) * Math.abs(Math.cos(Math.toRadians(origion.latitude))) + Math.cos(Math.toRadians(degree))   * (point.latitude - origion.latitude));
    return new MyGeoPoint(x, y);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Searching from google.com, like www.abc.com Search Result Rank the pages like Title..... Description... www.abc.com
I'm using MultiMap from Google Guava 12 like this: Multimap<Integer, OccupancyType> pkgPOP = HashMultimap.create();
I'm trying to get mail(imap) from google by oauth authorization . I have got
Im having issue to extracting the Google Earth coordinates, because I need it to
I would like to get a pair of coordinates (longitude, latitude) from a postal
I'm trying to grab the coordinates from .kml files that look something like this:
I've got a web application that uses google maps to display data from a
I get some GPS coordinates from Google Maps and I need to find the
1.i just wanted to know that from where google and bing got the complete
Is there any way to implement the same bounce functionality from Google Earth when

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.