Selecting Coordinate System in Maptiler - google-maps

I have an image which 21810x14872 that project a box of an area with coordinate:
top, left corner latitude longitude : 23.635069763547662 , 58.09107365049769 bottom, right corner latitude longitude : 23.598520470202025 , 58.14957297881731
OR using WGS84 northing, easting:
top, left corner easting, northing : 617289.588, 2610249.342 bottom, right corner easting, northing : 611289.588, 2614249.428
My image use projection of WGS84. I'm not sure which Coordinate System in Maptiler I need to select? Please advice.
Thanking You.

The answer is equal to: Creating world file for maptiler
In MapTiler (http://www.maptiler.com/) you can use the "Bounding Box" georeferencing - to provide the four limiting coordinates (north, south, east, west) you mentioned above to assign location to your image directly. You probably don't need to create a World file then.
Just choose in MapTiler the "Mercator tiles", then drag&drop in your file, select your coordinate system (default is the WGS84 geodetic latitude / longitude) and on assign location click on Bounding box. A dialog opens when you can directly type the four numbers. MapTiler previews the covered area in the small map window in bottom right corner.
See these video tutorials which demonstrate the usage of Bounding Box:
https://www.youtube.com/watch?v=p8rNkaNXDPs&list=PLGHe6Moaz52PiQd1mO-S9QrCjqSn1v-ay
and another which also generates MBTiles and upload these to Amazon S3:
https://www.youtube.com/watch?v=pf8itiTwo6w&list=PLGHe6Moaz52PiQd1mO-S9QrCjqSn1v-ay
BTW WGS84 is a world geodetic system (latitude and longitude) in degrees. It is not a map projection nor projected system. The second coordinates you mentioned look like UTM coordinates or another projected coordinates in meters. To use these you would need to know the exact coordinate system definition (ideally so called EPSG code - see our http://epsg.io/).

Related

Creating world file for maptiler

I have an image which 21810x14872 that project a box of an area with coordinate:
top, left corner latitude longitude : 23.635069763547662 , 58.09107365049769
bottom, right corner latitude longitude : 23.598520470202025 , 58.14957297881731
OR using WGS84 northing, easting:
top, left corner easting, northing : 617289.588, 2610249.342
bottom, right corner easting, northing : 611289.588, 2614249.428
My image use projection of WGS84. How do I create world file for maptiler using above description.
Thanking You.
In MapTiler (http://www.maptiler.com/) you can use the "Bounding Box" georeferencing - to provide the four limiting coordinates (north, south, east, west) you mentioned above to assign location to your image directly. You probably don't need to create a World file then.
Just choose in MapTiler the "Mercator tiles", then drag&drop in your file, select your coordinate system (default is the WGS84 geodetic latitude / longitude) and on assign location click on Bounding box. A dialog opens when you can directly type the four numbers. MapTiler previews the covered area in the small map window in bottom right corner.
See these video tutorials which demonstrate the usage of Bounding Box:
https://www.youtube.com/watch?v=p8rNkaNXDPs&list=PLGHe6Moaz52PiQd1mO-S9QrCjqSn1v-ay
and another which also generates MBTiles and upload these to Amazon S3:
https://www.youtube.com/watch?v=pf8itiTwo6w&list=PLGHe6Moaz52PiQd1mO-S9QrCjqSn1v-ay
BTW WGS84 is a world geodetic system (latitude and longitude) in degrees. It is not a map projection nor projected system. The second coordinates you mentioned look like UTM coordinates or another projected coordinates in meters. To use these you would need to know the exact coordinate system definition (ideally so called EPSG code - see our http://epsg.io/).

GMSCameraPosition: convert kilometers to zoom level

There is a way to convert a distance (in kilometers) into a float zoom level of a GMSCameraPosition?
I have an app where the user specifies a diameter (in kilometers) that he wants to see around the gps checkmark (his position). So, I need to convert that distance (like, 30 km) into a zoom level that fits that distance in kilometers.
I'm very new with Google Maps and didn't find a way to that until now.
Thanks in advance.
For calculating with GPS coordinates have a look here. (Especially the section "Destination point given distance and bearing from start point").
When you have your coordinates you can use the fitBounds-method of the Map-object which does exactly what you want.

How to translate mercator map coordinates to relative screen coordinates?

I have a database with various map locations (latitude, longitude).
I've been using a map api (e.g. google maps) to plot these locations.
I am now experimenting to see if I can totally remove dependency of map apis and simply replace the map control with an image (an .png image).
Question:
How can I translate the map locations to be displayed properly onto this map image?
More details:
Basically, the map will be a rectangular area (i.e. Div element), where the top-left corner of the rectangle is obviously (0, 0). So basically the map locations will be displayed with respect to this top-left corner.
First off, where are you getting your geocodes from? If they are from Bing or Google Maps then you can only use those coordinates with those map controls. Using this coordinates without the map controls is against the terms of use of these API's. Assuming that these coordinates come from somewhere else you can overlay them on an image by first knowing some information about the image. At a minimium you will need to know two coordinates on the image and their relative pixel locations. From that you can then determine the scale and top left coordinate of the image. With this you can then fairly accurately position coordinates on the image using a lot of math. You can find a lot of useful math for this here: http://msdn.microsoft.com/en-us/library/bb259689.aspx I've writing a few blog posts on this a while back which you can find here: http://rbrundritt.wordpress.com/2008/10/25/ve-imagery-service-and-custom-icons/
If these coordinates come from Bing Maps you can easily display them on a map image using the Bing Maps Imagery Service: http://msdn.microsoft.com/en-us/library/ff701724.aspx

KML coordinates are off in a custom Google Map?

EDIT: Turns out it was all because the coordinate translation functions in the javascript were written wrong. The author of the program has apparently fixed it.
I'm trying to use KML files to display placemarks on a custom Google Maps map. The map was generated by a Minecraft mapping program called Unmined.
My problem lies with the positioning of placemarks. They are placed on the map in a position that doesn't seem to correlate with either the pixel or latitude/longitude coordinates of the map itself.
Here is an image showing my problem.
I loaded a KML with five placemarks defined. One in the middle (0,0), one in the top-left corner (-170,80), one in the top-right corner (170,80), one in the bottom-left corner (-170,-80), and one in the bottom-right corner (170,-80). The set of markers seems to be duplicated horizontally but from my experience that's standard with Google Maps. As far as I know, the range of valid coordinates in a KML file are from -180 to 180 longitude and -90 to 90 latitude, which means that any valid placemark would have to fall somewhere inside that rectangle. Except that rectangle barely intersects the map at all.
If you need access to the code I'm using, everything can be found in the source of http://tonyfox.ws/dt/kantomap/ (URL may not exist forever)
So am I just doing something catastrophically wrong or what?
On a related note, how does Google Maps decide where to place the map in the coordinate system when the map isn't an actual Earth map (like this Minecraft world map)? My map seems to range from about 14.5 to 19.5 longitude, and 25.5 to 28 latitude. Why such weird numbers?

calculate longitude and latitude from topleft static google map

I use a static map (image) from google in a mobile phone app. What i have is: the longitude-latitude data from the center (of the image), the size of image, the zoomlevel.
How can i calculate the longitude-latitude data of the top-left (or any other place) of the image?
You need to compute the lat/lon from a range/bearing calculation (see destination point from distance and bearing given here: http://www.movable-type.co.uk/scripts/latlong.html). The zoom level will give you the range part. For the bearing part, is the map north up? If it is, then the bearing for the upper left will be 315 degrees (360 - 45). If you don't know if the map is north up, then you will need another lat/lon point.