{
  "id": 216076,
  "title": "What is units of the GeoJSON coordinates?",
  "url": "/competitions/indoor-location-navigation/discussion/216076",
  "author_name": "",
  "post_date": "2021-02-01T13:29:20.646582400Z",
  "votes": 7,
  "comment_count": 5,
  "views": 0,
  "content": "<p>I am looking into the GeoJSON files, and their coordinate fields were not latitude-longitude pairs.</p>\n<p>The coordinate fields (such as [\"root\"][\"features\"][0][\"geometry\"][\"coordinates\"] of a geojson_map.json)in this competition are something like [13366831.3394, 3541393.3621999994] etc.<br>\nI thought they would be latitude-longitude pairs just like <a href=\"https://github.com/location-competition/indoor-location-competition-20/blob/master/data/site1/B1/geojson_map.json\" target=\"_blank\">their example repo</a>, which has [ 120.07651399999799, 30.29392699999949 ] etc.</p>\n<p>Does anyone have any idea to understand these coordinates in these JSON files?</p>",
  "messages": [
    {
      "id": "1180795",
      "postDate": "02/01/2021 13:29:20",
      "content": "<p>I am looking into the GeoJSON files, and their coordinate fields were not latitude-longitude pairs.</p>\n<p>The coordinate fields (such as [\"root\"][\"features\"][0][\"geometry\"][\"coordinates\"] of a geojson_map.json)in this competition are something like [13366831.3394, 3541393.3621999994] etc.<br>\nI thought they would be latitude-longitude pairs just like <a href=\"https://github.com/location-competition/indoor-location-competition-20/blob/master/data/site1/B1/geojson_map.json\" target=\"_blank\">their example repo</a>, which has [ 120.07651399999799, 30.29392699999949 ] etc.</p>\n<p>Does anyone have any idea to understand these coordinates in these JSON files?</p>",
      "rawMarkdown": "I am looking into the GeoJSON files, and their coordinate fields were not latitude-longitude pairs.\n\nThe coordinate fields (such as [\"root\"][\"features\"][0][\"geometry\"][\"coordinates\"] of a geojson_map.json)in this competition are something like [13366831.3394, 3541393.3621999994] etc.\nI thought they would be latitude-longitude pairs just like [their example repo](https://github.com/location-competition/indoor-location-competition-20/blob/master/data/site1/B1/geojson_map.json), which has [ 120.07651399999799, 30.29392699999949 ] etc.\n\nDoes anyone have any idea to understand these coordinates in these JSON files?",
      "votes": null
    },
    {
      "id": "1181914",
      "postDate": "02/02/2021 07:47:23",
      "content": "<p>I'm trying to do the same! Looking <a href=\"https://xserver2-dashboard.cloud.ptvgroup.com/dashboard/Content/TechnicalConcepts/Basics/DSC_About_CoordinateSystems.htm\" target=\"_blank\">here</a>, it seems they are ESG:3857 coordinates, but when I reproject them I don't seem to get the correct place. </p>\n<p>I think I just managed to convert them, I won't link my notebook here since I don't think it is proper to do so, as soon as I'll publish my analysis I'll include code here (in a few hours)</p>",
      "rawMarkdown": "I'm trying to do the same! Looking [here](https://xserver2-dashboard.cloud.ptvgroup.com/dashboard/Content/TechnicalConcepts/Basics/DSC_About_CoordinateSystems.htm), it seems they are ESG:3857 coordinates, but when I reproject them I don't seem to get the correct place. \n\nI think I just managed to convert them, I won't link my notebook here since I don't think it is proper to do so, as soon as I'll publish my analysis I'll include code here (in a few hours)",
      "votes": null
    },
    {
      "id": "1181984",
      "postDate": "02/02/2021 08:33:12",
      "content": "<p>Thank you for the very helpful info! Now it makes sense with the ESG:3857 coordinates. Also, thank you for the code example. I'll wait to upvote it:)</p>",
      "rawMarkdown": "Thank you for the very helpful info! Now it makes sense with the ESG:3857 coordinates. Also, thank you for the code example. I'll wait to upvote it:)",
      "votes": null
    },
    {
      "id": "1182283",
      "postDate": "02/02/2021 11:54:45",
      "content": "<p>This function reprojects the 'point' column from esg3857 to esg4326 using pyproj.</p>\n<pre><code>import pyproj\nfrom pyproj import Proj, transform\ndef get_lat_lon(point, proj = pyproj.Transformer.from_crs(3857, 4326, always_xy=True)):\n    try:\n        x1, y1 = point[0], point[1]\n        lon, lat = proj.transform(x1, y1)\n        return lat, lon\n    except:\n        return np.nan\n</code></pre>\n<pre><code>def get_point(x, i=0):\n    try:\n        return x[i]\n    except:\n        return np.nan\n</code></pre>\n<p>Here I just extract latitude and longitude. </p>\n<p>I hope it's enough, there's a little more at my notebook (just saying :D ) </p>",
      "rawMarkdown": "This function reprojects the 'point' column from esg3857 to esg4326 using pyproj.\n\n```\nimport pyproj\nfrom pyproj import Proj, transform\ndef get_lat_lon(point, proj = pyproj.Transformer.from_crs(3857, 4326, always_xy=True)):\n    try:\n        x1, y1 = point[0], point[1]\n        lon, lat = proj.transform(x1, y1)\n        return lat, lon\n    except:\n        return np.nan\n```\n\n```\ndef get_point(x, i=0):\n    try:\n        return x[i]\n    except:\n        return np.nan\n```\n    \nHere I just extract latitude and longitude. \n\nI hope it's enough, there's a little more at my notebook (just saying :D )",
      "votes": null
    },
    {
      "id": "1182330",
      "postDate": "02/02/2021 12:18:22",
      "content": "<p>Thank you for these utility functions, they're quite helpful! </p>",
      "rawMarkdown": "Thank you for these utility functions, they're quite helpful!",
      "votes": null
    },
    {
      "id": "1254537",
      "postDate": "03/27/2021 19:04:23",
      "content": "<p>Thank you for this little code snippet :)</p>",
      "rawMarkdown": "Thank you for this little code snippet :)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1181914,
      "author_name": "tomwarrens",
      "author_url": "",
      "post_date": "02/02/2021 07:47:23",
      "content": "<p>I'm trying to do the same! Looking <a href=\"https://xserver2-dashboard.cloud.ptvgroup.com/dashboard/Content/TechnicalConcepts/Basics/DSC_About_CoordinateSystems.htm\" target=\"_blank\">here</a>, it seems they are ESG:3857 coordinates, but when I reproject them I don't seem to get the correct place. </p>\n<p>I think I just managed to convert them, I won't link my notebook here since I don't think it is proper to do so, as soon as I'll publish my analysis I'll include code here (in a few hours)</p>",
      "votes": null,
      "replies": [
        {
          "id": 1181984,
          "author_name": "satokiogiso",
          "author_url": "",
          "post_date": "02/02/2021 08:33:12",
          "content": "<p>Thank you for the very helpful info! Now it makes sense with the ESG:3857 coordinates. Also, thank you for the code example. I'll wait to upvote it:)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1182283,
          "author_name": "tomwarrens",
          "author_url": "",
          "post_date": "02/02/2021 11:54:45",
          "content": "<p>This function reprojects the 'point' column from esg3857 to esg4326 using pyproj.</p>\n<pre><code>import pyproj\nfrom pyproj import Proj, transform\ndef get_lat_lon(point, proj = pyproj.Transformer.from_crs(3857, 4326, always_xy=True)):\n    try:\n        x1, y1 = point[0], point[1]\n        lon, lat = proj.transform(x1, y1)\n        return lat, lon\n    except:\n        return np.nan\n</code></pre>\n<pre><code>def get_point(x, i=0):\n    try:\n        return x[i]\n    except:\n        return np.nan\n</code></pre>\n<p>Here I just extract latitude and longitude. </p>\n<p>I hope it's enough, there's a little more at my notebook (just saying :D ) </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1182330,
          "author_name": "satokiogiso",
          "author_url": "",
          "post_date": "02/02/2021 12:18:22",
          "content": "<p>Thank you for these utility functions, they're quite helpful! </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1254537,
          "author_name": "forbu1411",
          "author_url": "",
          "post_date": "03/27/2021 19:04:23",
          "content": "<p>Thank you for this little code snippet :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1180795": "I am looking into the GeoJSON files, and their coordinate fields were not latitude-longitude pairs.\n\nThe coordinate fields (such as [\"root\"][\"features\"][0][\"geometry\"][\"coordinates\"] of a geojson_map.json)in this competition are something like [13366831.3394, 3541393.3621999994] etc.\nI thought they would be latitude-longitude pairs just like [their example repo](https://github.com/location-competition/indoor-location-competition-20/blob/master/data/site1/B1/geojson_map.json), which has [ 120.07651399999799, 30.29392699999949 ] etc.\n\nDoes anyone have any idea to understand these coordinates in these JSON files?",
    "1181914": "I'm trying to do the same! Looking [here](https://xserver2-dashboard.cloud.ptvgroup.com/dashboard/Content/TechnicalConcepts/Basics/DSC_About_CoordinateSystems.htm), it seems they are ESG:3857 coordinates, but when I reproject them I don't seem to get the correct place. \n\nI think I just managed to convert them, I won't link my notebook here since I don't think it is proper to do so, as soon as I'll publish my analysis I'll include code here (in a few hours)",
    "1181984": "Thank you for the very helpful info! Now it makes sense with the ESG:3857 coordinates. Also, thank you for the code example. I'll wait to upvote it:)",
    "1182283": "This function reprojects the 'point' column from esg3857 to esg4326 using pyproj.\n\n```\nimport pyproj\nfrom pyproj import Proj, transform\ndef get_lat_lon(point, proj = pyproj.Transformer.from_crs(3857, 4326, always_xy=True)):\n    try:\n        x1, y1 = point[0], point[1]\n        lon, lat = proj.transform(x1, y1)\n        return lat, lon\n    except:\n        return np.nan\n```\n\n```\ndef get_point(x, i=0):\n    try:\n        return x[i]\n    except:\n        return np.nan\n```\n    \nHere I just extract latitude and longitude. \n\nI hope it's enough, there's a little more at my notebook (just saying :D )",
    "1182330": "Thank you for these utility functions, they're quite helpful!",
    "1254537": "Thank you for this little code snippet :)"
  },
  "source": "meta"
}