Skip to content

Instantly share code, notes, and snippets.

@Gooong
Last active April 16, 2018 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gooong/008178a4edfba66fb61ce50b7cf7d39e to your computer and use it in GitHub Desktop.
Save Gooong/008178a4edfba66fb61ce50b7cf7d39e to your computer and use it in GitHub Desktop.
[GSoC] PostGIS project test

Task 1: Write a Python program to construct an array by repeating the values within the original array three times.

We can repeat a list using the operator * in python. The following code defines a function to repeat the original list three times:

>>> def triple_list(l):
...     return l * 3
...
>>> triple_list([1,2,3,4])
[1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]

Task 2: Create a basic web map

I want to introduce one of my personal project last year, which is similar to task 2. The project is to show the real-time weather in China.

I develop a web crawler to get real-time weather data of each region in China, and then display the result in web map using OpenLayers3. The weather data and geojson data are published using Flask API. Users can browse each place by dragging, clicking, scrolling and searching.

Screen shot of the web map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment