Mapping objects on the map by distance #1821
Replies: 6 comments 4 replies
-
I have already thought about this feature, I think it can be very useful. You can already draw a circle ou rectangle in the Map, but it is not easy to specify an exact distance from some point. I think I updated code to index geo points properly in Lucece since version 4, preparing for this. It may be possible to specify a rectangle distance using the search box, not sure, a circle may be more difficult. What do you think @patrickdalla to offer this easily in Map tab? |
Beta Was this translation helpful? Give feedback.
-
The radius selection can help the selection and creation o a bookmark with
the result selection. But it does not allow to specify a exact distance.
Maybe we can capture the keybord somehow when the user starts drawing the
circle in a way that if he starts pressing digits a dialog popsup to him
finish the distance digit. A suggestion, maybe not so intuitive.
Em sex., 18 de ago. de 2023 12:45, Luis Filipe Nassif <
***@***.***> escreveu:
… I have already thought about this feature, I think it can be very useful.
You can already draw a circle ou rectangle in the Map, but it is not easy
to specify an exact distance from some point. I think we already index geo
points properly in Lucece since version 4. It may be possible to specify a
rectangle distance using the search box, not sure, a circle may be more
difficult. What do you think @patrickdalla
<https://github.com/patrickdalla> to offer it easily in Map tab?
—
Reply to this email directly, view it on GitHub
<#1821 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG247S3GLVZPXNDCCAPFBI3XV6LZBANCNFSM6AAAAAA3VXKSTY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
distanca calculation is already done on radius selection.
What can be improved is method of input of this distance parameter for
selecyion, that today is via mouse, but could evolve to exact number input
somehow.
Another feature could be using lucene latlonpoint fields so we can create
lucene queries. This can improve performance (we should test)
We can also create filters (based on new filtermanager interface). This
filters could be based on distance from a point, bounding box, or even
based on administrative boundaries (this boundaries should be queried from
a nominatim server).
Its seems sorl have some implementations of this type o queries, including
sort by distance from a point.
It seems all new features. But for this thread, a simple input method to
specify the exact distance of radius selection could be enough.
Have you tested this option on map tab Paulo?
Em dom., 20 de ago. de 2023 21:32, Paulo Cesar Breim (PCB) <
***@***.***> escreveu:
… I am not a java developer, I like C, but now I am using Dart (very good),
and same language used in Flutter.
Can you test it:
import java.lang.Math;
public class DistanceCalculator {
public static final double EARTH_RADIUS_KM = 6371.0;
public static double calculateDistance(double lat1, double lon1, double lat2, double lon2) {
double dLat = Math.toRadians(lat2 - lat1);
double dLon = Math.toRadians(lon2 - lon1);
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) *
Math.sin(dLon / 2) * Math.sin(dLon / 2);
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
double distance = EARTH_RADIUS_KM * c;
return distance;
}
public static void main(String[] args) {
double lat1 = -22.9068; // Latitude do ponto 1
double lon1 = -43.1729; // Longitude do ponto 1
double lat2 = -23.5505; // Latitude do ponto 2
double lon2 = -46.6333; // Longitude do ponto 2
double distance = calculateDistance(lat1, lon1, lat2, lon2);
System.out.println("Distância entre os pontos: " + distance + " km");
}
}
—
Reply to this email directly, view it on GitHub
<#1821 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG247S5ZMVIYYWUHOKDOT3DXWK3DVANCNFSM6AAAAAA3VXKSTY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The click and drag on map is already used to pan the map.
Maybe with ctrl or shift pressed the radius selection could start instead
of pan.
I am away from computer too. Paulo, look at the tool bar on right side of
map panel
Em seg., 21 de ago. de 2023 10:28, Luis Filipe Nassif <
***@***.***> escreveu:
… Hi @patrickdalla <https://github.com/patrickdalla>, I'm away from my
computer right now, maybe a screenshot of the distance button selection
would help @paulobreim <https://github.com/paulobreim>. By the way, I
don't think its current behavior is intuitive (click to start selection and
a second click to finish) maybe a mouse drag with button down would be more
intuitive for users, for both the circle and rectangle selection.
—
Reply to this email directly, view it on GitHub
<#1821 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG247SZPUAUCS4NY46MWTYTXWNWA7ANCNFSM6AAAAAA3VXKSTY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Right. So I think I prefer the current behavior, some users don't know about ctrl or shift modifiers in the timeline chart and they miss some features. Maybe we should display a quick help about them in UI, maybe a tooltip... |
Beta Was this translation helpful? Give feedback.
-
I've already tried using the circle, it works well, but in my case it's not very useful. The first thing we have is a latitude/longitude, or address (street number) of a given occurrence. In the IPED maps, there would need to be a way to inform this location, preferably by latitude/longitude. On the map below, where the red arrow is, it's the GPS position above, but I did it manually, which isn't as accurate. A little above to the right, we have a 2, indicating 2 photos and we want to know how far this location is. Google maps has a function to calculate this. In fact, not even a map would be needed, this could also be in the metadata area, when the user chooses image:gps and typing a gps reference and distance, the data could have the distance information. Another option would be to enter something specific in the search line similar to. ps: are there a away to list all files with gps like: |
Beta Was this translation helpful? Give feedback.
-
In many cases we need to check the location of photos or messages in a certain region. For example where a particular photo was taken.
My suggestion is to implement a function, where provided a latitude/longitude and a distance in km, the IPED puts on the map, all the items that satisfy this condition. This allows you to eliminate GPS accuracy differences.
So if I reference a house, for example, I can quickly see if within a certain radius, a photo appears, which is much easier to check photo by photo.
As IPED already has all geographic positions registered in metadata, it is easy to implement a function that calculates the distance from a given point. Havesine's formula solves easily, and there are ready-made routines in Java that already provide the data.
Beta Was this translation helpful? Give feedback.
All reactions