I am using tmap library to make a plot of vector dataset. I am unable to add the latitude and longitude in degrees - tmap

I am trying to spatial plot from the attribute table of a vector file.
I am unable to add latitude and longitude in degree minutes.
Here is the code.
Now kindly help me to add the latitude and longitude to the map with regular interval.

Related

Django POSTGIS multipolygon

Why PostGIS does not validate the longitude and latitude for a GEOMETRY field when we try to save values with latitude greater than 90 (latitude > 90)?
Take a look at this picture:
You can see that the latitude value ranges between [-90, 90].
Theoretically you can have latitude > 90 or < -90 but that will correspond to an equivalent coordinate with an inverse longitude.
That would possibly lead to the creation of 2 or more different entries with the same coordinates, thus PostGIS does not validate latitude outside of the [-90, 90] range.

Plot points by Latitude and Longitude in Highmaps

I am trying to plot missing countries on the Highmaps world high resolution map. However it is difficult to get the correct co-ordinates.
It appears this may be difficult because the charts do not correspond with latitude and longitude. For example world high-resolution has 1750 points on the X axis, so half is 875, but GMT is at about 839.
Ideally I am looking for a formula that can be used to convert latitude and longitude to x/y, but do not know how to do this.

Plot lat and lon grid on a world map using Matlab

Can anyone help me how to plot latitude and longitude on a world map using matlab. I have the mapping toolbox and have been trying to use the function geoshow, however I can´t get it right. I plot the world map using plot_google_map:
plot(lon,lat,'.k','MarkerSize',6)
hold on
plot_google_map('maptype','roadmap')
This is the figure I get:
However I am not able to get the latitude and longitude grid on this picture.
I'm not sure is this going to help, but try reversing the order of your plot statements - its possibly that the map plot may be overwriting all the data of the lon and lat data.
Alternatively, if the function allows for it, plot the map as the back layer.

Finding distance between two points using latitude and longitude in Degree Minutes Seconds format

I am working on a tool to find the distance between two points whose latitude and longitude are given. Its ok when the latitude and longitude is given in Signed Degree Format. But I couldn't find a way to calculate the distance when latitude and longitude is given in Degree Minutes Seconds Format (ex: N 11° 14' 52').Can anybody suggest me a way to find the distance ?
So first convert the DMS coordinates to your degree format.
e.g. 11°14'52" = 11 + 14/60 + 52/3600 = 11.24777778 degrees
and then continue as you did with your destance calculation that you say already works.
Edit:
Note that latitudes in the southern hemisphere and longitudes in the western hemisphere are negative. So the above formula really should be:
sign(degrees) * (abs(degrees) + minutes/60 + seconds/3600)

Convert WGS84 into Latitude and Longitude

I need to convert wgs84 values into latitude and longitude values. I need to convert values into latitude and longitude and drop a pin on mapview. For example in plist i have got values SDO_X1= 39616.4535 and SDO_Y1=37472.9078, How do i convert these values into degree,radians or latitude and longitude, please help me. All locations are for Singapore
Re "values SDO_X1= 39616.4535 and SDO_Y1=37472.9078".
Knowing that these are based on "WGS-84" is not enough information to answer the question. They are not "WGS84 values", because "WGS84 values", in decimal form, would be degrees decimal, e.g. -180 to +180 in X, -90 to +90 in Y.
Judging by the size of the values, they are probably measurements in meters, relative to some reference point.
Googling, I see that the official projection for Singapore is known as "SVY21".
CAVEAT: Unless these are from a land survey prior to 2004, in which case you need to ask a local land surveyor or appropriate government official to help you convert these. Or any reference source that provides the table or formula for these older surveys.
Assuming these are SVY21 values, then see the answer to Easting northing to latitude longitude