I am working on Tableau Maps. Need your help to mark boundary on Tableau Maps with help of given latitude and longitude. I have list of latitude and longitude for garden area, from that I want to show garden boundary with some heatmap.
How to achieve it ? Do we need some mathematical calculation for finding it ?
Related
I am trying to build a portfolio project where I want to use the “Parking Regulation Locations and Signs” dataset from NYC Open Data. I am looking at using the latitude and longitude to place a marker on the map using Google Maps API. However, values of lat and long are not within the accepted range(-90 degrees to 90 degrees for lat and -180 degrees to 180 degrees for long).
Does anyone know how to convert the given values to usable lat and long values?
Link to dataset: dataset
Columns I am looking at:
sign_x_coord
sign_y_coord
I tried looking into an x and y coordinate of a sign in the dataset and looking at the actual location given by the on_street column but I wasn’t able to find any similarities. I was thinking maybe I could parse or format these values but no luck there. I haven't started coding yet because I want to make it work with the google maps app itself before attempting any code
I'm using redis geosearch function to look for coordinates that were introduced in the database from differents points from my API, the problem is, because of some misunderstanding, some services used geoadd key fromlonlat latitude longitude and others used geoadd key fromlonlat longitude latitude and now my geosearch doesn't return the correct results, always parcially correct results. I would like to know why this happens, since when using redis geoadd function, the longitude and latitude are transformed into 1 geohashed string, shouldn't it work even with inverted types of coordinates? Why does it have to be in this exact same order as the documentation.
Also considering most of the coordinates saved were using geoadd key fromlonlat latitude longitude, should I implement the rest incorrectly to continue the pattern or start using it correctly and deal with the older coordinates?
From the inception of the Geo data structure, the order has always been lon,lat. This is a pain point that many have encountered (including myself). Unfortunately, no you cannot just reverse all of the coordinates and expect the geo data structure to work properly, the command expects the longitude and latitude in the correct order, if they're out of order it won't know how to compile the geo hashes correctly, and there are wide ranges of valid longitudes that are illegal as latitudes (see the geoadd page you linked to)
I have a list of longitudes and latitudes (each refers to a postcode),
as an example in the form of {"1111" : [-37.01, 144.8], ...} (A)
I have another location B [-48.432, 124.432]
I want to find if there are any longitude and latitude within a certain distance from the location b (5000 meters, 10000 meters, ...) that has an associated postcode.
Any thoughts?
Geodesy package can help a little in finding long and lat, but could not figure out the way for searching A
You are looking for geo-query. You can use firebase firestore or realtime database to accommodate this need without the requirement of many efforts. Geoflutterfire and flutter_geofire are the two libraries which come with the support of what you're looking for.
Say I have a latitude of 38.802610 and a longitude of -116.419389 and I want to be able to add a distance to that, 20 miles for example.
So far I have came up with a rough idea on how I would do this
Firstly, work out how many miles are in 1° of latitude, say for example it was 30
Then, divide one by it:
1 / 30 = 0.033333
Add it to my original latitude to get my maximum ° of latitude:
38.802610 + 0.033333 = 38.8355943
Subtract it to my original latitude to get my minimum ° of latitude:
38.802610 - 0.033333 = 38.769277
But this is flawed because there seems to be no direct conversion for longitude as from what I've read the calculation varies.
Ultimately, I need to be able to find out the:
maximum latitude (my current latitude + given distance e.g 20 miles)
minimum latitude (my current latitude - given distance e.g 20 miles)
maximum longitude (my current longitude + given distance e.g 20 miles)
minimum longitude (my current longitude - given distance e.g 20 miles)
Any help would be greatly appreciated, thank you.
Linear distances (e.g. 20 miles or 32186.88 m) cannot directly be converted to distances in degrees of latitude or longitude, since the Earth is not flat. However, there are two direct conversion you can try to project one point given a linear distance and azimuth to another point.
Method 1 is to assume a spherical Earth, using Movable Type's "destination point given distance and bearing from start point". The underling equations are described on the website. The difference of latitude is the same in North and South directions, and the difference of longitude is the same in East and West directions, so you can do a minimum of two calculations to determine all four min/max and lat/long combinations.
Method 2 is to assumes a spheroid Earth (also called an ellipsoid of revolution), and calculate a direct geodesic with GeographicLib, which has bindings to several programming languages. The difference of latitude is slightly different in North and South directions, but the same in East and West directions, so you can do a minimum of three calculations. Or just assume the difference in North or South directions is approximately the same and just do two calculations. This method has sub-millimetre accuracy.
This question already has an answer here:
Closed 11 years ago.
How do i convert a given distance (in metres) into geographic coordinates.
What I need is to draw a polygon on the map (a regular polygon, like a circle), however, it's radius is given in meters, how do I calculate the radius in degrees or radians?
I'll probally code it in c
Oh man, geographic coordinates can be a pain in the behind. First of all, I'm assuming that by geographic coordinates, you're talking about geodetic coordinates (lat/lon).
Second of all, you can't find a "radius" in radians or degrees. Why, you ask? Well, one degree of longitude at the equator is WAY longer than one degree of longitude close to the north or south pole. The arc of one degree latitude also changes based on your location on the earth since the earth is not a perfect sphere. It's usually modeled as an ellipsoid.
That being said, here are two ways to map the coordinates of a polygon onto lat-lon coordinates:
1) If you're feeling like a complete badass, you can do the math in lat-lon. Lots of trig, easy to make mistakes... DON'T DO IT. I'm just including this option here to let you know that it is possible.
2) Convert your geodetic coordinates to UTM. Then, you can do whatever you need to do in meters (i.e. find the vertices of a polygon), and then convert the resulting UTM back to geodetic. Personally, I think this is the way to go.
Well, consider that at the equator (0 degrees latitude) one degree of longitude is equal to appximately 60 nautical miles. At either pole (90 degrees latitude) a single degree of longitude equals 0 nautical miles. As I remember the cosine of the latitude times 60 will give you the approximate distance in nautical miles at that latitude of a single degree of longitude.
However, how accurate you would be would have to account for the map projection you're using. For aeronautical maps, they use the Lambert Conformal Conic projection, which means distances are only exactly accurate along the two latitudes that the cone cuts the sphere of the earth. But if an approximation is good enough, you may not need the accuracy.
For conversion, one nautical mile equals 1.852 km. If I did the arithmetic properly (no guarantee, I'm in my 70s), that means that a meter equals (except as you get really close to the poles) 0.0000009 degrees latitude. It also equals 0.0000009 degrees longitude on the equator. If you're not at the equator, divide the 0.0000009 by the cosine of the latitude to get the degrees of longitude.
So, a 1000 meter radius circle at 45 degrees latitude would mean a radius of 0.0009 degrees latitude and 0.0009/0.707 degrees longitude. Approximately of course.
All this is from memory, so take it with a grain of salt. If you really want to get involved, Google geographic equations or some such.
Check out http://trac.osgeo.org/proj/wiki/GeodesicCalculations. Depending on the accuracy you need, this can get pretty complicated, so you're probably best off starting from some existing code.