@@ -4,7 +4,7 @@ Geolife dataset
44===============
55
66Download the dataset from the
7- `project website <https://www.microsoft.com/en-us/research/publication/geolife-gps-trajectory-dataset-user-guide/ >`_
7+ `Geolife <https://www.microsoft.com/en-us/research/publication/geolife-gps-trajectory-dataset-user-guide/ >`_ project website
88
99Extract the zip file and observe the following directory structure.
1010
@@ -224,15 +224,25 @@ Visualize and color each point based on its altitude.
224224 .. image :: images/geolife_latlon_default.png
225225 :align: center
226226 :width: 900px
227-
227+
228+ .. rst-class :: caption
229+
230+ +-----------------------------------------------------------------------------+
231+ | Full view of `Geolife `_ dataset in lat-lon with points colored by altitude. |
232+ +-----------------------------------------------------------------------------+
233+
228234Since we are interested only in the spatial arrangements of points on the x-y plane,
229- Press 5 to toggle to an orthographic view, and press 7 to go to a top-down view.
230- Pan the viewpoint by pressing the left mouse button while holding the shift key.
231- Double click on a point to recenter the view on the point.
235+ Press :kbd: ` 5 ` to toggle to an orthographic view, and press :kbd: ` 7 ` to go to a top-down view.
236+ Pan the viewpoint by pressing the :kbd: ` LMB ` while holding the :kbd: ` Shift ` key.
237+ Double click with the :kbd: ` LMB ` on a point to recenter the view on that point.
232238And use the mouse wheel to zoom in/out.
233239To inspect the attribute of a point, which here is altitude,
234- left click the point while holding the Ctrl key.
240+ left click the point while holding the :kbd: ` Ctrl ` key.
235241Deselect by right clicking anywhere.
242+ See the :doc: `viewer page <../../viewer >` for the full instructions on using the viewer.
243+
244+ .. note ::
245+ On Mac, use :kbd: `⌘ ` instead of :kbd: `Ctrl `
236246
237247The mapping from per-point attribute value to per-point color is determined automatically based on the range of attribute values.
238248But the presence of bad attribute values (e.g. unreasonably large or small altitude values) may result in a poor color mapping,
@@ -255,17 +265,43 @@ Improve the color map by manually setting the mapping domain using :py:meth:`vie
255265 :align: center
256266 :width: 900px
257267
268+ .. rst-class :: caption
269+
270+ +----------------------------------------------------------------------------------------------------+
271+ | Full view of `Geolife `_ dataset in lat-lon with an improved color map |
272+ | (i.e. the greater range of colors allows one to better see the changes in altitude across points). |
273+ +----------------------------------------------------------------------------------------------------+
274+
258275Observe that point coverage is world wide,
259276as there are points not just in Beijing but also in faraway cities such as Rome and Seattle.
260277Observe also the high altitude points (i.e. airplane trajectories) that connect some of these cities.
261278A future release of the pptk viewer may include support for overlaying points on map tiles
262279(e.g. `HERE Map Tile <https://developer.here.com/documentation/map-tile/topics/introduction.html >`__)
263280for better supporting such visualizations.
264281
282+ .. note ::
283+ You may notice that you cannot zoom in as close as you would like.
284+ This is because there is currently a hardcoded limit on zooming in,
285+ which a future release of pptk will fix.
286+ This is not an issue when viewing data such as Lidar point clouds that are typically specified in meters,
287+ but becomes a limitation when viewing lat-lon points
288+ (i.e. two points 1m apart translates to a very small difference in lat/lon).
289+ Meanwhile, to zoom in further, consider scaling up the lat-lon values,
290+ or converting the points to UTM coordinates, as described in the next section.
291+
265292Visualize using UTM coordinates
266293-------------------------------
267294
268- Remove points that are outside the UTM zone 50 (Beijing's UTM zone).
295+ Directly mapping lon-lat to x-y (i.e. x <- lon, y <- lat),
296+ as in the previous section,
297+ causes points to appear stretched apart near the north and south poles.
298+ Alternatively, the `UTM projection <https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system >`__
299+ is able to convert lat-lon coordinates into units of meters
300+ while only introducing a relatively small amount of stretching/shrinking between points in the same UTM zone.
301+ In this section, we show how to apply the UTM projection on GPS points in UTM zone 50 (Beijing's UTM zone),
302+ which we then visualize using :py:meth: `pptk.viewer `.
303+
304+ First remove points that are outside the UTM zone 50.
269305This is to remove any invalid points that may later convert to unreasonably large UTM coordinates
270306(the dataset contains a point with invalid latitude of 400.17)
271307
@@ -296,7 +332,7 @@ Optionally, one may use :py:meth:`viewer.color_map <pptk.viewer.color_map>` to m
296332 >>> v = pptk.viewer(p[mask_labelled])
297333 >>> v.attributes(df_50[mask_labelled][' label' ])
298334
299- Again Ctrl + left click on a point to examine its mode of transportation attribute.
335+ Again :kbd: ` Ctrl ` + left click on a point to examine its mode of transportation attribute.
300336
301337.. |geolife_utm | image :: images/geolife_utm.png
302338 :width: 390px
@@ -310,10 +346,18 @@ Again Ctrl + left click on a point to examine its mode of transportation attribu
310346 :width: 110px
311347 :align: middle
312348
349+ .. rst-class :: image-grid
313350.. table ::
314351 :widths: 400 400 120
315352 :align: center
316353
317354 ============= ==================== ================
318355 |geolife_utm | |geolife_utm_zoomed | |geolife_legend |
319356 ============= ==================== ================
357+
358+ .. rst-class :: caption
359+
360+ +------------------------------------------------------------------------------------+
361+ | `Geolife `_ GPS points in UTM coordinates visualized using :py:meth: `pptk.viewer `. |
362+ | Points are from around the Beijing area and are colored by mode of transportation. |
363+ +------------------------------------------------------------------------------------+
0 commit comments