{
  "id": 239402,
  "title": "coordinate system",
  "url": "/competitions/indoor-location-navigation/discussion/239402",
  "author_name": "",
  "post_date": "2021-05-16T07:36:55.051126500Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Dear all,<br>\nI would like to understand the coordinates used for the floor plans. (I am a bit surprised that the data description does not mention this important detail at all)<br>\nIs there a  projection algorithm that relates them to lat/lon ?<br>\nAny help would be greatly appreciated.</p>\n<p>Thanks!<br>\nMarkus</p>",
  "messages": [
    {
      "id": "1309663",
      "postDate": "05/16/2021 07:36:55",
      "content": "<p>Dear all,<br>\nI would like to understand the coordinates used for the floor plans. (I am a bit surprised that the data description does not mention this important detail at all)<br>\nIs there a  projection algorithm that relates them to lat/lon ?<br>\nAny help would be greatly appreciated.</p>\n<p>Thanks!<br>\nMarkus</p>",
      "rawMarkdown": "Dear all,\nI would like to understand the coordinates used for the floor plans. (I am a bit surprised that the data description does not mention this important detail at all)\nIs there a  projection algorithm that relates them to lat/lon ?\nAny help would be greatly appreciated.\n\nThanks!\nMarkus",
      "votes": null
    },
    {
      "id": "1309685",
      "postDate": "05/16/2021 07:57:10",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/rapidminer\" target=\"_blank\">@rapidminer</a>, the coordinates can be converted to lat long using pyproj library. The following function was taken from <a href=\"https://www.kaggle.com/tomwarrens\" target=\"_blank\">@tomwarrens</a>'s wonderful <a href=\"https://www.kaggle.com/tomwarrens/indoor-location-and-navigation-start\" target=\"_blank\">notebook</a>. In the notebook, he mentions that the values are in coordinates. For more information, kindly refer to his notebook.</p>\n<pre><code>import pyproj\n\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>",
      "rawMarkdown": "Hi @rapidminer, the coordinates can be converted to lat long using pyproj library. The following function was taken from @tomwarrens's wonderful [notebook](https://www.kaggle.com/tomwarrens/indoor-location-and-navigation-start). In the notebook, he mentions that the values are in coordinates. For more information, kindly refer to his notebook.\n\n```\nimport pyproj\n\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```",
      "votes": null
    },
    {
      "id": "1310037",
      "postDate": "05/16/2021 13:03:59",
      "content": "<p>In addition, don't forget to check <a href=\"https://www.kaggle.com/c/indoor-location-navigation/discussion/230558\" target=\"_blank\">https://www.kaggle.com/c/indoor-location-navigation/discussion/230558</a>. Some maps are wrong. </p>",
      "rawMarkdown": "In addition, don't forget to check https://www.kaggle.com/c/indoor-location-navigation/discussion/230558. Some maps are wrong.",
      "votes": null
    },
    {
      "id": "1311183",
      "postDate": "05/17/2021 07:58:49",
      "content": "<p>Thanks so much, this is VERY helpful and exactly what I was looking for.</p>",
      "rawMarkdown": "Thanks so much, this is VERY helpful and exactly what I was looking for.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1309685,
      "author_name": "suryajrrafl",
      "author_url": "",
      "post_date": "05/16/2021 07:57:10",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/rapidminer\" target=\"_blank\">@rapidminer</a>, the coordinates can be converted to lat long using pyproj library. The following function was taken from <a href=\"https://www.kaggle.com/tomwarrens\" target=\"_blank\">@tomwarrens</a>'s wonderful <a href=\"https://www.kaggle.com/tomwarrens/indoor-location-and-navigation-start\" target=\"_blank\">notebook</a>. In the notebook, he mentions that the values are in coordinates. For more information, kindly refer to his notebook.</p>\n<pre><code>import pyproj\n\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>",
      "votes": null,
      "replies": [
        {
          "id": 1310037,
          "author_name": "mamasinkgs",
          "author_url": "",
          "post_date": "05/16/2021 13:03:59",
          "content": "<p>In addition, don't forget to check <a href=\"https://www.kaggle.com/c/indoor-location-navigation/discussion/230558\" target=\"_blank\">https://www.kaggle.com/c/indoor-location-navigation/discussion/230558</a>. Some maps are wrong. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1311183,
      "author_name": "rapidminer",
      "author_url": "",
      "post_date": "05/17/2021 07:58:49",
      "content": "<p>Thanks so much, this is VERY helpful and exactly what I was looking for.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1309663": "Dear all,\nI would like to understand the coordinates used for the floor plans. (I am a bit surprised that the data description does not mention this important detail at all)\nIs there a  projection algorithm that relates them to lat/lon ?\nAny help would be greatly appreciated.\n\nThanks!\nMarkus",
    "1309685": "Hi @rapidminer, the coordinates can be converted to lat long using pyproj library. The following function was taken from @tomwarrens's wonderful [notebook](https://www.kaggle.com/tomwarrens/indoor-location-and-navigation-start). In the notebook, he mentions that the values are in coordinates. For more information, kindly refer to his notebook.\n\n```\nimport pyproj\n\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```",
    "1310037": "In addition, don't forget to check https://www.kaggle.com/c/indoor-location-navigation/discussion/230558. Some maps are wrong.",
    "1311183": "Thanks so much, this is VERY helpful and exactly what I was looking for."
  },
  "source": "meta"
}