5

Eg: [360590, 555610] - [lng, lat] in meters from google map api - GeoJson data

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "MultiPolygon",
        "coordinates": [
          [
            [
              [
                360590,
                555610
              ],
              [
                360590,
                555555.0128
              ],
              [
                360590,
                555540
              ],
              [
                360592.4439,
                555540
              ],
              [
                360600,
                555540
              ],
              [
                360600,
                555518.8277
              ]
            ]
          ]
        ]
      }
    }
  ]
}

here, [360590, 555610] - [X, Y] coordinates is in meters, Now we need to display this coordinates on google map, Is there any solution for this?

also we must have to use addGeoJson or loadGeoJson method because we have 200MB data in GeoJson file. Now we need to display this coordinates on google map, Is there have any solution for this?

Shivam
  • 161
  • 9
  • 1
    Hi, welcome to stack overflow. What did you [investigate](https://www.researchgate.net/post/Can_any_one_help_me_to_covert_the_Coordinates_from_Meter_to_degree_minute_second_format)? – Jeroen Heier Dec 28 '19 at 07:40
  • 1
    Welcome to SO! What did you try or research? Show some effort. – David García Bodego Dec 28 '19 at 08:10
  • possible duplicate of [How to display geojson data with meters on javascript google map API](https://stackoverflow.com/questions/59489210/how-to-display-geojson-data-with-meters-on-javascript-google-map-api) – geocodezip Dec 28 '19 at 11:06
  • Where are those points supposed to be? Sounds like the data is in a different projection (perhaps EPSG:3857). If that is true you need to reproject the points into EPSG:4326 (if it isn't true, you still need to get the equivalent WGS84/ESPG:4326 points). If I reproject those points ESPG:3857 => ESPG:4326 they are in the Gulf of Guinea off the coast of Africa, which doesn't seem right, but I don't know if that is real data or not. – geocodezip Dec 28 '19 at 15:18

2 Answers2

1

Mapbox has a Utility class that can perform the conversion of meters to latitude/longitude for you:

public static Vector2d MetersToLatLon(Vector2d m)

Converts Spherical Mercator EPSG:900913 in xy meters to WGS84 lat/lon.

public static Vector2d LatLonToMeters(Vector2d v)

Converts Vector2d struct, WGS84 lat/lon to Spherical Mercator EPSG:900913 xy meters.

If you're looking to do the conversion yourself, then a simple approach is the following:

  • Assume the earth is a sphere with a circumference of 40,075km.
  • Length in meters of 1° of latitude is always 111.32km
  • Length in meters of 1° of longitude = 40,075 km * cos(latitude) / 360
Alexander van Oostenrijk
  • 4,644
  • 3
  • 23
  • 37
1

Are you sure that these coordinates are in a meter?

It may be EPSG: 27700 or EPSG:4326 so you can try with it.

and you this link QGIS for convert coordinates and It might be useful for you.