Template talk:Cyclone map

Proposal for map for cyclone tracks
Hello. I want to propose a blanket change to WikiProject Tropical cyclones on how cyclone track maps are made, stored, and used. But before I do so, I want to clarify if this is in fact possible based on available features.

Looking at this Wikidata sandbox (consider this a Wikidata item for a given storm within the IMD region), you will notice that there are 6 coordinates with set for each tracking interval. are also set for each of those coordinates, which corresponds to the IMD tropical cyclone scales at each point (a more appropriate property could be decided later).

Based on this data, is it possible to use the Qid (Q15397819 in this case) to generate an image that shows:
 * 1) The path of the storm from point 1 through 6
 * 2) The intensity of the storm at each point (with different point icons/colours rendered based on P31)
 * 3) While being able to use other features of Mapframe, such as zoom, geomask, etc.

And considering we can currently enter multiple QIDs for one mapframe (example), this would also allow us to plot multiple storms in one image. Is such an arrangement possible with currently available features? Or is something similar possible with Mapframe, without having to manually create these raster images of tracks? Reh man  09:05, 19 May 2020 (UTC)
 * Interesting idea. I think right now we lack the ability to automatically create lines that link points, and we're limited to a small set of icons. Perhaps consider OSM Location map? You can create overlay lines, like in the Leicester Castle example there. ɱ  (talk) 16:29, 19 May 2020 (UTC)
 * Do you think this is a Lua limitation? Or something the site cannot support yet? I wouldn't mind cross-posting at VPT to see if anyone is willing to code... Reh  man  17:13, 19 May 2020 (UTC)
 * No idea, I only use maplink and know its current limitations. ɱ  (talk) 17:24, 19 May 2020 (UTC)
 * Kartographer only supports getting polygons from Wikidata, not points or lines. It is possible to do what you want with Lua though, but that's outside by abilities. --AntiCompositeNumber (talk) 04:38, 20 May 2020 (UTC)

 { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {"stroke": "#0000ff","stroke-width": 3}, "geometry": { "type": "LineString", "coordinates": [ [ 80.298889, 6.331667],  [ 80.263889, 6.664444]   ] } }, { "type": "Feature", "properties": {"stroke": "#00ff00","stroke-width": 3}, "geometry": { "type": "LineString", "coordinates": [ [ 80.263889, 6.664444],  [ 80.434444, 7.188333]      ] } }, { "type": "Feature", "properties": {"stroke": "#ff0000","stroke-width": 3}, "geometry": { "type": "LineString", "coordinates": [ [ 80.434444, 7.188333],  [ 80.656111, 8.108611]    ] } }, { "type": "Feature", "properties": {"stroke": "#ff00ff","stroke-width": 3}, "geometry": { "type": "LineString", "coordinates": [ [ 80.656111, 8.108611],  [ 80.9025, 8.296111]      ] } }, { "type": "Feature", "properties": { "marker-symbol": "-letter", "marker-color": "208020", "description": "Date, windspeed, other info"}, "geometry": { "type": "Point", "coordinates": [ 80.9025, 8.296111] } }, { "type": "Feature", "properties": {"stroke": "#0000ff","stroke-width": 10, "description": "Date, windspeed, other info"}, "geometry": { "type": "LineString", "coordinates":  80.298889, 6.331667], [ 80.2988890001, 6.331667 } }, { "type": "Feature", "properties": {"stroke": "#00ff00","stroke-width": 10, "description": "Date, windspeed, other info"}, "geometry": { "type": "LineString", "coordinates":  80.263889, 6.664444], [ 80.2638890001, 6.664444 } }, { "type": "Feature", "properties": {"stroke": "#ff0000","stroke-width": 10, "description": "Date, windspeed, other info"}, "geometry": { "type": "LineString", "coordinates":  80.434444, 7.188333], [ 80.4344440001, 7.188333 } }, { "type": "Feature", "properties": {"stroke": "#ff00ff","stroke-width": 10, "description": "Date, windspeed, other info"}, "geometry": { "type": "LineString", "coordinates":  80.656111, 8.108611], [ 80.6561110001, 8.108611 } } ] }
 * The example here uses  to draw lines between the set of coordinates, which are inserted manually. I've drawn lines between all five coordinates and added a symbol to the last for illustration.
 * So what is wanted is to get the collection of coordinates from Wikidata and generate the map with  automatically. This can be done with Lua.
 * What would be wanted? Lines, symbols, or both? —  Jts1882 &#124; talk 07:39, 20 May 2020 (UTC)


 * I already have a module that creates maps for a list of football stadium names using template football map. Fortunately it can't tell the difference between a football stadium and a hurricane and can be used to demo what might be possible. The example uses the following code for Hurricane Patricia:




 * The point coordinates, a single set in this case, are retrieved from Wikidata and  used to generate map. Note also that clicking the symbol produces a popup with the an image of the cyclone, which also comes from Wikidata.
 * A cyclone map could be created along the same lines. Given a list of cyclone names or wikidata ids it could retrieve the coordinate data from wikidata and plot the path for each cyclone. The series ordinal (P1545) and storm type can also be retrieved. The latter can be used to set the colour of the line or symbol. Additional information such as date and wind speed could also be added to the popup. —  Jts1882 &#124; talk 08:27, 20 May 2020 (UTC)


 * Thanks for the detailed reply, Jts1882. Do you think it is possible to match the design of the current cyclone track maps? If so, I'm sure this would be widely used, especially with the added features (such as clicking points for further data). Would you be able to create the module as a start? I'd start it myself, but my Lua skills are next to none. Reh  man  14:30, 20 May 2020 (UTC)
 * I think something with similar could be generated. There is a limit on what can be used for marker symbols, but circles can be added as zero-length lines (see modification above). There is also the limit of only having the street map, so the geographical maps are not an option.
 * I've being reacquainting myself with my code (yikes!!) and I think I have all the elements. I have code to get the wikidata information and to create the json for mapframe, so I think can put something together as a demo. —  Jts1882 &#124; talk 15:10, 20 May 2020 (UTC)
 * Brilliant! I think the street maps wont be an issue, as most/all the time, the maps are well zoomed out. Once we get the demo, I'll post at the cyclone wikiproject, and get some comments from there. Hopefully this will stop all those manually made and manually updated raster images. Looking forward to the demo :) Btw, not too sure if it's some caching issue from my end, but I can only see the modification you made in preview. I don't see the circles in normal reading mode. Reh  man  16:27, 20 May 2020 (UTC)
 * No, not just you. I hadn't noticed that the large circles disappeared in the static map. This is unfortunate, as the markers give a different look. Anyway, I'll put something to together and we can get some feedback. —  Jts1882 &#124; talk 17:25, 20 May 2020 (UTC)

 {"type": "FeatureCollection", "features": [ {"type": "Feature","properties": {"marker-color": "#bbccff", "marker-symbol": "-number"}, "geometry": { "type": "Point", "coordinates": [80.298888888889,6.3316666666667]}}, {"type": "Feature","properties": {"marker-color": "#bbccff", "marker-symbol": "-number"}, "geometry": { "type": "Point", "coordinates": [80.263888888889,6.6644444444444]}}, {"type": "Feature","properties": {"marker-color": "#bbccff", "marker-symbol": "-number"}, "geometry": { "type": "Point", "coordinates": [80.434444444444,7.1883333333333]}}, {"type": "Feature","properties": {"marker-color": "#bbccff", "marker-symbol": "-number"}, "geometry": { "type": "Point", "coordinates": [80.656111111111,8.1086111111111]}}, {"type": "Feature","properties": {"marker-color": "#bbccff", "marker-symbol": "-number"}, "geometry": { "type": "Point", "coordinates": [80.9025,8.2961111111111]}}, {"type":"Feature", "properties": { "stroke":"#D3D3D3", "stroke-opacity":0.7, "stroke-width":50}, "geometry": {"type":"LineString", "coordinates": 80.298888888889,6.3316666666667],[80.263888888889,6.6644444444444],[80.434444444444,7.1883333333333],[80.656111111111,8.1086111111111],[80.9025,8.2961111111111}} ]}
 * This is an interesting subject and I started looking at it a few days ago. (Day late and a dollar short) I thought maybe something like the map I created as a sample using information from wikidata using Lua. More information can be added by adding descriptions etc.
 * The Point information was created by going through the P265 claims arrays containing the latitude and longitude. The LineString was created using the same latitude and longitude info. Markers could be used with or without icons. Different colors could be used based on instance P31? The LineString can be any color, width etc.
 * Instead of markers circular polygons/other shapes/zero length lines (with large stroke-width etc. can also be used. Again different colors can be used.
 * Basically you all have this well in hand so best wishes -- Matroc (talk) 03:19, 21 May 2020 (UTC)
 * I like the broad opaque lines to show the path. There are lots of options on how to show these cyclone maps. —  Jts1882 &#124; talk 07:14, 21 May 2020 (UTC)

Template Cyclone map
I have created a Cyclone map template that uses a modified version of Module:Football map. Here is an example:


 * The width, height and align parameters determine the size and position of the map.
 * The latitude, longitude and zoom parameters set the centre coordinates for the map and its zoom level.
 * :* The name and id parameters indicate the cyclones to show using data from Wikidata.
 * name must be an exact Wikipedia article title with a corresponding Wikidata entity. The example Hurricane Patricia is outside the boundaries of the map, but can be seen you zoom out.
 * id is a Wikidata entity, in this case Wikidata sandbox 3, an example with coordinates for the path of a cyclone.
 * The map can show dozens of storms. If mixing names and Wikidata ids use separate indices.
 * The coordinates and other properties are retrieved from Wikidata with Lua. The colours are determined by the type of storm (depression, Cyclone storm, etc).
 * There are a number of other parameters inherited from and described in football map, including a properties of the marker symbols (icon, colour, size) and a geoshape parameter for adding shapes and masks.
 * This example is meant to demonstrate how the map could appear. The colours for both symbol and lines are clearly over the top. The broad opaque path in 's example is a nice alternative. Suggestions welcome. —  Jts1882 &#124; talk 07:14, 21 May 2020 (UTC)
 * Pretty much things that I had thought of were mentioned... Not sure if mapshapes of countries or markers of major cities in the area of the cyclonic activity would be useful or readily accessible. Description field of course can be used for any image and or added information. I also agree that other storms can be plotted on the same mapframe (time frame limited); however, 1 thing at a time maybe. For now "Well done" and "Best wishes" -- Cheers! -- Matroc (talk) 02:57, 22 May 2020 (UTC)


 * Here is the template version of Matroc's map (with reduced canvas).


 * -number sets the marker symbol to an incrementing number (this should match the series ordinal on Wikidata)
 * #bbccff sets the color of the marker symbol to a pale blue. The default is to let the storm type set the colour (e.g. severe cyclone storm = red)
 * stroke1, stroke-width1 and stroke-opacity1 set the properties of the line between each point in the storm path, respectively the line colour, line width and line opacity. The default is to let the storm type set the line colour.
 * In general, an index at the end of the parameter name sets the properties for the storm with that index. Without an index number the property is set for all storms listed, unless overridden with a indexed parameter. In the examples, with a single storm, there is not difference.
 * Both the lua coded map (the template version, right) and the map coded with the  tag look different in preview mode. The line gets a rounded margin in preview, but the line ends are straight on the saved page. —  Jts1882 &#124; talk 12:05, 22 May 2020 (UTC)


 * Thank you, Jts1882. This is great start! There are some known bugs with Kartographer; the different behaviour in preview vs live is one of them. Some feedback:
 * I've changed the coords to be more far apart (more realistic) so we could assess the output better.
 * While the thick-transparent lines are nice, the behaviour at different zoom levels could be problematic. For instance, a zoomed out version with the current thick borders, just show a bunch of polygons bunched up together. This would be a particular issue with cyclones with shorter tracks. I think lines on the thinner range would be ideal for wider scenarios, but that being said, Matroc's "Test Map" seems to be handling the polygons in a smoother way. Maybe we could base on that, and simply halve the thickness? Worst case, we can simply stick to a 1px solid black line.
 * It seems like whatever icon we choose, it will still be placed within the 3D placemark symbol. Would anyone know if there is a way to override this? It would be nice if we can simply have a colour-coded 2D circle/spot for each placemark.
 * Can we have defaults set for the icon colour based on this? See the P31 values for the old Wikidata example, for instance. I will go through the Wikidata QIDs for the other types and make sure all is in order, so that we can work on this.
 * Also defaults set for the shape. "Circle" to be the default, triangle if there is another P31 qualifier with value, and "square" for . If is set, it should show the default "circle".
 * On a separate note, while this isn't important, would anyone know if it is be possible to change the colour theme used in the map itself? To match to something close to current maps? Or maybe at least select another OSM layer?
 * Maybe it is time we move Module:Football map/cyclone to Module:Cyclones tracks, and start on the live version? Thank you! Reh  man  12:25, 23 May 2020 (UTC)
 * A few brief answers.
 * I've modified the examples above for the new data. Have you thought of adding the times to each coordinate item?
 * The different static/dynamic map appearances are a real nuisance. Unfortunately its a performance issue and unlikely to change. However, Matroc's map uses one polyline to draw the path, whereas I used lines for each pair so I could change the line colour. This can be changed so that it uses the single line when the path is all one colour.
 * Yes, the icons are very limited and all have the markers. I've been experimenting with circles and polygons, which work nicely in preview but not on the page (see the third example at cyclone map in preview or expanded mode).
 * I've just chose the colours for the storm types on wikidata to make them obviously different. There is a separate function handling these colours so it's easy to edit them to whatever colour code desired.
 * The symbols should be straightforward too.
 * As far as I know Kartographer only supports the one background map. Is that layer a new thing on OSM? That would be a big step forward if it could be incorporated, but is seems development of Kartographer is low on the WMF agenda.
 * Yes, it might be a good time to move the module and possibly copy this discussion over to the template or module talk page. Do you prefer Cyclone tracks to Cyclone map? —  Jts1882 &#124; talk 13:17, 23 May 2020 (UTC)


 * Thanks Jts1882. By adding times, you mean as part of this maps function? If not, I guess the cyclone project members could decide what else to include. It would probably be a separate ontology project at Wikidata. I look forward to the updated code. I don't have a naming preference, though maps do sound better. Feel free to move the discussion as well. Will update regarding the QIDs on the new talkpage. Cheers, Reh  man  13:38, 23 May 2020 (UTC)
 * I was think of adding the times to the wikidata for each coordinate item, so we have date/time, series ordinal and storm type (via P31). Then the popup can have time, coordinates and storm type (the latter is currently included). —  Jts1882 &#124; talk 16:39, 23 May 2020 (UTC)
 * Yes, that would make sense. Actually, this way we could scrap the series ordinal. The sequence could be determined based on the date/time. What do you think? Reh  man  03:25, 24 May 2020 (UTC)
 * Agree, that is probably the best approach. The series ordinal is necessary for the code at the moment, but that should be changed. I added  (P585) qualifiers to the wikidata sandbox, but for some reason it only allows the date (with 00:00 for the time). While this will do for testing, a precise time stamp for the measurement would be better.
 * The storm colours now should match the colours in Tropical_cyclone_scales. That Typhoon colour is out of place. All the names in the table are included. "Tropical Disturbance" uses the MF Indian ocean column colour rather than the Australian one. —  Jts1882 &#124; talk 14:44, 24 May 2020 (UTC)

Break
Hi Jts1882. Sorry for the delay in replying. Got stuck with some other work, and was also preparing these Wikidata items - to be used as for individual storms. Would you be able to integrate those QIDs, such that if they are used as P31, the line colour would change accordingly (to the respective table cell colour)?

Since current cyclone track maps have placemarks very close to each other, and considering how "bulky" the Kartographer markers are currently (and the inability to switch the 3D marker off), I think the most practical/least messy approach at the moment would be to use lines (and no placemarks). But that would mean giving up on the shape information (triangle for, square for ); which is not a good way to go, and editors would probably not accept this.

What do you think of manually overlaying those shapes at the start of each line segment (not as placemarks, but as overlay shapes)? Does that make sense, or is it too complex? Do you think there's a better way around this problem? Matroc? Reh man  13:23, 6 June 2020 (UTC)


 * The colours for different storm descriptions should already map the template colours (see last comment before the break). It checks the names rather than the wikidata ids. If you change the storm type on Wikidata, the colours of the lines should change in the test version (i.e. with test) of the map.
 * One option is to use the lines and place the marker only on the first point. The example to the right uses wikidata to determine line colour and shows the marker sympbol with a square (this can be automated to storm type). The circles currently show on each point of the path in edit preview and when the map is expanded, but that can be removed. —  Jts1882 &#124; talk 13:58, 6 June 2020 (UTC)

 {"type": "FeatureCollection", "features": [ {"type":"Feature", "properties": { "stroke":"#D3D3D3", "stroke-opacity":0.7, "stroke-width":50,}, "geometry": {"type":"LineString", "coordinates": 80.298888888889,6.3316666666667],[80.263888888889,6.6644444444444],[80.434444444444,7.1883333333333],[80.656111111111,8.1086111111111],[80.9025,8.2961111111111}}, {"type": "Feature","geometry": { "type":"Polygon", "coordinates": [80.328278,6.371869], [80.441547,6.377734], [80.346442,6.316310], [80.387057,6.211040], [80.298889,6.281969], [80.210721,6.211040], [80.251336,6.316310], [80.156230,6.377734], [80.269500,6.371869], [80.298889,6.480730], [80.328278,6.371869]}, "properties":{ "title": "Serial 1", "description": "", "fill": "#000000", "stroke":"#0000ff", "stroke-width":1 }} , {"type": "Feature","geometry": { "type":"Polygon", "coordinates": [80.263889,6.763759],[80.350491,6.614780],[80.177286,6.614780],[80.263889,6.763759]}, "properties":{ "title": "Serial 2", "description": "", "fill": "#000000", "stroke":"#0000ff", "stroke-width":1 }}, {"type": "Feature","geometry": { "type":"Polygon", "coordinates": [80.505155,7.258483],[80.505155,7.118173],[80.363734,7.118173],[80.363734,7.258483],[80.505155,7.258483]}, "properties":{ "title": "Serial 3", "description": " \n\n* Locator \n* Back to Position 2\n* Go to Position 4\n ", "fill": "#000000", "stroke":"#0000ff", "stroke-width":1 }}, {"type": "Feature","geometry": { "type":"Polygon", "coordinates": [[[80.657856,8.208596],[80.659601,8.208550],[80.661345,8.208474],[80.663087,8.208367],[80.664827,8.208230], [80.666564,8.208063],[80.668298,8.207866],[80.670028,8.207638],[80.671754,8.207380],[80.673476,8.207092], [80.675192,8.206774],[80.676902,8.206426],[80.678606,8.206048],[80.680303,8.205641],[80.681993,8.205204], [80.683675,8.204737],[80.685348,8.204241],[80.687013,8.203717],[80.688668,8.203163],[80.690313,8.202580], [80.691948,8.201969],[80.693572,8.201329],[80.695184,8.200661],[80.696785,8.199966],[80.698373,8.199242], [80.699948,8.198490],[80.701510,8.197712],[80.703058,8.196906],[80.704592,8.196073],[80.706111,8.195214], [80.707615,8.194328],[80.709103,8.193416],[80.710575,8.192478],[80.712030,8.191515],[80.713469,8.190526], [80.714890,8.189513],[80.716293,8.188475],[80.717677,8.187412],[80.719043,8.186326],[80.720390,8.185215], [80.721717,8.184082],[80.723024,8.182925],[80.724311,8.181746],[80.725577,8.180545],[80.726822,8.179322], [80.728045,8.178077],[80.729246,8.176811],[80.730425,8.175524],[80.731582,8.174217],[80.732715,8.172890], [80.733826,8.171543],[80.734912,8.170177],[80.735975,8.168793],[80.737013,8.167390],[80.738026,8.165969], [80.739015,8.164530],[80.739978,8.163075],[80.740916,8.161603],[80.741828,8.160115],[80.742714,8.158611], [80.743573,8.157092],[80.744406,8.155558],[80.745212,8.154010],[80.745990,8.152448],[80.746742,8.150873], [80.747466,8.149285],[80.748161,8.147684],[80.748829,8.146072],[80.749469,8.144448],[80.750080,8.142813], [80.750663,8.141168],[80.751217,8.139513],[80.751741,8.137848],[80.752237,8.136175],[80.752704,8.134493], [80.753141,8.132803],[80.753548,8.131106],[80.753926,8.129402],[80.754274,8.127692],[80.754592,8.125976], [80.754880,8.124254],[80.755138,8.122528],[80.755366,8.120798],[80.755563,8.119064],[80.755730,8.117327], [80.755867,8.115587],[80.755974,8.113845],[80.756050,8.112101],[80.756096,8.110356],[80.756111,8.108611], [80.756096,8.106866],[80.756050,8.105121],[80.755974,8.103377],[80.755867,8.101635],[80.755730,8.099895], [80.755563,8.098158],[80.755366,8.096424],[80.755138,8.094694],[80.754880,8.092968],[80.754592,8.091246], [80.754274,8.089530],[80.753926,8.087820],[80.753548,8.086116],[80.753141,8.084419],[80.752704,8.082729], [80.752237,8.081047],[80.751741,8.079374],[80.751217,8.077709],[80.750663,8.076054],[80.750080,8.074409], [80.749469,8.072774],[80.748829,8.071150],[80.748161,8.069538],[80.747466,8.067937],[80.746742,8.066349], [80.745990,8.064774],[80.745212,8.063212],[80.744406,8.061664],[80.743573,8.060130],[80.742714,8.058611], [80.741828,8.057107],[80.740916,8.055619],[80.739978,8.054147],[80.739015,8.052692],[80.738026,8.051253], [80.737013,8.049832],[80.735975,8.048429],[80.734912,8.047045],[80.733826,8.045679],[80.732715,8.044332], [80.731582,8.043005],[80.730425,8.041698],[80.729246,8.040411],[80.728045,8.039145],[80.726822,8.037900], [80.725577,8.036677],[80.724311,8.035476],[80.723024,8.034297],[80.721717,8.033140],[80.720390,8.032007], [80.719043,8.030896],[80.717677,8.029810],[80.716293,8.028747],[80.714890,8.027709],[80.713469,8.026696], [80.712030,8.025707],[80.710575,8.024744],[80.709103,8.023806],[80.707615,8.022894],[80.706111,8.022008], [80.704592,8.021149],[80.703058,8.020316],[80.701510,8.019510],[80.699948,8.018732],[80.698373,8.017980], [80.696785,8.017256],[80.695184,8.016561],[80.693572,8.015893],[80.691948,8.015253],[80.690313,8.014642], [80.688668,8.014059],[80.687013,8.013505],[80.685348,8.012981],[80.683675,8.012485],[80.681993,8.012018], [80.680303,8.011581],[80.678606,8.011174],[80.676902,8.010796],[80.675192,8.010448],[80.673476,8.010130], [80.671754,8.009842],[80.670028,8.009584],[80.668298,8.009356],[80.666564,8.009159],[80.664827,8.008992], [80.663087,8.008855],[80.661345,8.008748],[80.659601,8.008672],[80.657856,8.008626],[80.656111,8.008611], [80.654366,8.008626],[80.652621,8.008672],[80.650877,8.008748],[80.649135,8.008855],[80.647395,8.008992], [80.645658,8.009159],[80.643924,8.009356],[80.642194,8.009584],[80.640468,8.009842],[80.638746,8.010130], [80.637030,8.010448],[80.635320,8.010796],[80.633616,8.011174],[80.631919,8.011581],[80.630229,8.012018], [80.628547,8.012485],[80.626874,8.012981],[80.625209,8.013505],[80.623554,8.014059],[80.621909,8.014642], [80.620274,8.015253],[80.618650,8.015893],[80.617038,8.016561],[80.615437,8.017256],[80.613849,8.017980], [80.612274,8.018732],[80.610712,8.019510],[80.609164,8.020316],[80.607630,8.021149],[80.606111,8.022008], [80.604607,8.022894],[80.603119,8.023806],[80.601647,8.024744],[80.600192,8.025707],[80.598753,8.026696], [80.597332,8.027709],[80.595929,8.028747],[80.594545,8.029810],[80.593179,8.030896],[80.591832,8.032007], [80.590505,8.033140],[80.589198,8.034297],[80.587911,8.035476],[80.586645,8.036677],[80.585400,8.037900], [80.584177,8.039145],[80.582976,8.040411],[80.581797,8.041698],[80.580640,8.043005],[80.579507,8.044332], [80.578396,8.045679],[80.577310,8.047045],[80.576247,8.048429],[80.575209,8.049832],[80.574196,8.051253], [80.573207,8.052692],[80.572244,8.054147],[80.571306,8.055619],[80.570394,8.057107],[80.569508,8.058611], [80.568649,8.060130],[80.567816,8.061664],[80.567010,8.063212],[80.566232,8.064774],[80.565480,8.066349], [80.564756,8.067937],[80.564061,8.069538],[80.563393,8.071150],[80.562753,8.072774],[80.562142,8.074409], [80.561559,8.076054],[80.561005,8.077709],[80.560481,8.079374],[80.559985,8.081047],[80.559518,8.082729], [80.559081,8.084419],[80.558674,8.086116],[80.558296,8.087820],[80.557948,8.089530],[80.557630,8.091246], [80.557342,8.092968],[80.557084,8.094694],[80.556856,8.096424],[80.556659,8.098158],[80.556492,8.099895], [80.556355,8.101635],[80.556248,8.103377],[80.556172,8.105121],[80.556126,8.106866],[80.556111,8.108611], [80.556126,8.110356],[80.556172,8.112101],[80.556248,8.113845],[80.556355,8.115587],[80.556492,8.117327], [80.556659,8.119064],[80.556856,8.120798],[80.557084,8.122528],[80.557342,8.124254],[80.557630,8.125976], [80.557948,8.127692],[80.558296,8.129402],[80.558674,8.131106],[80.559081,8.132803],[80.559518,8.134493], [80.559985,8.136175],[80.560481,8.137848],[80.561005,8.139513],[80.561559,8.141168],[80.562142,8.142813], [80.562753,8.144448],[80.563393,8.146072],[80.564061,8.147684],[80.564756,8.149285],[80.565480,8.150873], [80.566232,8.152448],[80.567010,8.154010],[80.567816,8.155558],[80.568649,8.157092],[80.569508,8.158611], [80.570394,8.160115],[80.571306,8.161603],[80.572244,8.163075],[80.573207,8.164530],[80.574196,8.165969], [80.575209,8.167390],[80.576247,8.168793],[80.577310,8.170177],[80.578396,8.171543],[80.579507,8.172890], [80.580640,8.174217],[80.581797,8.175524],[80.582976,8.176811],[80.584177,8.178077],[80.585400,8.179322], [80.586645,8.180545],[80.587911,8.181746],[80.589198,8.182925],[80.590505,8.184082],[80.591832,8.185215], [80.593179,8.186326],[80.594545,8.187412],[80.595929,8.188475],[80.597332,8.189513],[80.598753,8.190526], [80.600192,8.191515],[80.601647,8.192478],[80.603119,8.193416],[80.604607,8.194328],[80.606111,8.195214], [80.607630,8.196073],[80.609164,8.196906],[80.610712,8.197712],[80.612274,8.198490],[80.613849,8.199242], [80.615437,8.199966],[80.617038,8.200661],[80.618650,8.201329],[80.620274,8.201969],[80.621909,8.202580], [80.623554,8.203163],[80.625209,8.203717],[80.626874,8.204241],[80.628547,8.204737],[80.630229,8.205204], [80.631919,8.205641],[80.633616,8.206048],[80.635320,8.206426],[80.637030,8.206774],[80.638746,8.207092], [80.640468,8.207380],[80.642194,8.207638],[80.643924,8.207866],[80.645658,8.208063],[80.647395,8.208230], [80.649135,8.208367],[80.650877,8.208474],[80.652621,8.208550],[80.654366,8.208596],[80.656111,8.208611],[80.657856,8.208596]]]}, "properties":{ "title": "Serial 4", "description": "", "fill": "#000000", "stroke":"#0000ff", "stroke-width":1 }}, {"type": "Feature","geometry": { "type":"Polygon", "coordinates": [80.902500,8.395052],[80.989103,8.345585],[80.902500,8.197145],[80.815897,8.345585],[80.902500,8.395052]},  "properties":{ "title": "Serial 5", "description": "", "fill": "#000000", "stroke":"#0000ff", "stroke-width":1 }}, {"type": "Feature","geometry": { "type":"Polygon", "coordinates": [83.894199,9.626458],[83.676393,9.538216],[83.828810,9.715179],[83.600000,9.770000],[83.828810,9.824812],[83.676393,10.001623],[83.894199,9.913480],[83.876393,10.144691],[84.000000,9.947342],[84.123607,10.144691],[84.105801,9.913480],[84.323607,10.001623],[84.171190,9.824812],[84.400000,9.770000],[84.171190,9.715179],[84.323607,9.538216],[84.105801,9.626458],[84.123607,9.394886],[84.000000,9.592564],[83.876393,9.394886],[83.894199,9.626458]}, "properties":{ "title": "Position Locator", "description": " \n\n*Position 1\n*Position 2\n*Position 3\n*Position 4\n*Position 5\n ", "fill": "#fff933", "stroke":"#0000ff", "stroke-width":1 }}, ]}
 * Bulky pointer (markers on map) - There are 3 sizes of markers - "small, medium and large" - Even with use of small there isn't much difference - They may still overlap each other depending on zoom level.
 * Line colour change is fine as is one marker to start the track if so desired.
 * I added a mapframe test with various shapes that act like pointers (can add pictures, descriptions, colors etc.). These were created using a Module I wrote circa 2017. I thought this is what was meant as an overlay shape???
 * Hope this is of some help! -- Matroc (talk) 04:46, 10 June 2020 (UTC)


 * Yes, that is very helpful. I had played with the polygon in one of my test options, but I didn't like the behaviour. Now I see the reason. I was using a larger stroke-width which stays the same regardless of zoom and gives rounded edges to the shapes. You used a stroke-width of 1 which gives cleaner shapes that change size with the zoom. That is much better.
 * The map to the right (below yours) is an example using a square. I don't like the circle shape (not clean at all zooms), but the square, triangle, and star give crisp shapes and inverse triangle and diamond should as well. I will add an overlaid symbol feature with shape, color and size properties.
 * The circle I used is a multisided figure with a limited number of sides (40 which accounts for the zoom effect for the circle not being cleaner - probably can attain a better shape using 100 or so more) I am going to replace that with a circle shape which is large [360] positions and would appear better though probably at a higher processing cost. -- Matroc (talk) 19:04, 10 June 2020 (UTC)
 * As an extra (not for the fainthearted) - I put a sunburst shape on the map that has links to various positions on my map - One can also add such links to markers or shapes in order to traverse the map (I will illustrate that on Position 3 (square). This was an idea I came up with on wikivoyage while conversing with Yurik several years ago. There are several caveats (gotchas) in order to accomplish this type of thing... I came back and corrected a few issues but you can get the picture. This may be useful in another project. Cheers! -- Matroc (talk) 21:42, 10 June 2020 (UTC)
 * There is one difference with the popups on these overlaid shape symbols in that the popups don't close properly like they do with the marker symbols. —  Jts1882 &#124; talk 14:14, 10 June 2020 (UTC)
 * Added a new set of parameters to handle the overlay symbols.
 * symbol-size – the size of the symbol (default: 0.4). The size is the radius of the symbol in degrees of latitude/longitude. It might be better use sizes 1, 2, ... N and scale it appropriately.
 * symbol-shape – the shape of the symbol (default: TBA). Current options are square, triangle, inverted triangle, diamond and star. I've not added the circle for performance reasons (see above), but this is not a final decision.
 * symbol-stroke – the colour of the border of the symbol (default: dark blue, but perhaps should be auto for storm colour)
 * symbol-stroke-width – the width of the border of the symbol (default: 1)
 * symbol-stroke-opacity – the opacity of the border colour of the symbol (default: 1)
 * symbol-fill – the fill colour of the symbol (default: auto for storm colour)
 * symbol-fill-opacity – the opacity of the fill colour of the symbol (default: 1)
 * As with all other appearance paramters, these parameters can be indexed (just affect one storm) or global.
 * Any suggestions/comments/etc? —  Jts1882 &#124; talk 17:08, 11 June 2020 (UTC)
 * For the cyclone map I would think a limited number of sizes scaled accordingly with a default size would be easier for users to implement... Limited because I wouldn't want a shape to cover a continent (exaggeration) on the cyclone map. (though unlimited size of shapes would be for appropriate for another module) -- 20:01, 11 June 2020 (UTC)
 * Star symbol is slightly different from mine but nice looking. If not a full circle, I think a multi-sided shape (100 positions or so) would work. -- Matroc (talk) 20:01, 11 June 2020 (UTC)
 * When I make shapes in my modules, I use another option which may be useful - type - values are: poly, or line. (poly as default). poly is for a filled polygon shape and line which is an outline (LineSring) of a shape. Use of these types can produce some interesting results. -- Matroc (talk) 20:01, 11 June 2020 (UTC)
 * Another parameter I have implemented is direction for certain shapes - My triangle shape for example uses this option - (1-8) to make it inverted or point towards a different direction. Overlay a triangle and an inverted triangle and you have six pointed star. (Also used for making wedges, arrows etc. point in different directions). -- Matroc (talk) 20:01, 11 June 2020 (UTC)
 * Colors and widths proposed are fine. -- Matroc (talk) 20:01, 11 June 2020 (UTC)
 * I also have a tendency to format my latitudes and longitudes to 6 numbers right of the decimal point when drawing the shape coordinates. (my quirky thing) -- Matroc (talk) 20:01, 11 June 2020 (UTC)
 * Be aware that larger shapes such as circles higher above and lower than the equator become distorted as they progress further North or South because of the Mercator map projection. I overcame this problem and can provide solution if you ever need it. Also, I can provide any of my non-professional iterative code snippets of shapes etc. (mostly from 2016) if wanted. Note: on wikivoyage we have a different version of Kartographer that implements group and show allowing for multiple maplinks and other options (If interested I can provide a page link or two). I am not used to putting everything in a single mapframe - Just to let you know where I am coming from. I apologize for my wordiness ramblings and only hope to contribute in this endeavor. Cheers and best wishes! -- Matroc (talk) 20:01, 11 June 2020 (UTC)
 * Please continue as wordily as you want. These explanations are very useful and hlped me get the shapes are now working. I think my initial attempt was unsuccessful because I was switching between polygon and linestring and not optimising the parameters properly. The circle works best without a stroke-width.
 * My wonky star was done purely by eye. Now I've added maths functions for the circle I can create a more symmetrical version.
 * I think rounding the numbers is a good idea, especially if using large polygons to draw circles. The math functions can leave very high precision numbers which can add up if using a lot of shapes.
 * I would be interested in having a look at your code and pages. Hopefully a Mercator correction isn't needed here, but its always interesting to know how to solve such problems. — <span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;"> Jts1882 &#124; talk 16:02, 12 June 2020 (UTC)
 * Recalculate latitude if >10.5 or <-10.5 (distortion of circles near equator is minimal and recalculation not needed)   -- Matroc (talk) 01:48, 15 June 2020 (UTC)
 * Thanks. — <span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;"> Jts1882 &#124; talk 06:38, 15 June 2020 (UTC)
 * I forgot to give any page examples, wikivoyage uses on most article pages a single mapframe and multiple maplinks created by hand or using templates - You can check out some pages at your leisure. One of my test pages also illustrates this type of thing eg. American Civil War battles, naval battles and prisoner of war camps (data garnered from wikipedia pages). -- Have a great day! -- Matroc (talk) 04:51, 16 June 2020 (UTC)

Break 2
. Great steps forward, thank you for the hard work guys. A few non-technical comments (some of which I mentioned earlier): Thoughts welcome. Cheers, Reh  man  12:25, 12 June 2020 (UTC)
 * Priority should be given to make the default output look as close as to the current theme. Otherwise there is a high tendency that this may not be implemented as norm.
 * While the default connecting line can support different widths/colours, can we have the default as a 1px black line?
 * The default shape to also be a circle
 * The default shape outline to be none
 * And some notes for the points of the cyclone's track (taking as an example):
 * Coordinates to be considered as part of the track if is present as a qualifier
 * The order to be determined based on the qualifier (I have removed the obsolete, so some examples above now shows an error)
 * The colour of the object to be based on the qualifier as outlined on this QID table
 * The default shape to be changed to "triangle" if there is another P31 qualifier with value, and "square" for
 * The module should fetch the articles's QID by default. In instances the track is to be displayed on another page, a  parameter should be implemented to manually assign a QID.
 * The QID parameter should be able to support csv with multiple QIDs, in order to display more than one cyclone track within the mapframe


 * I've added a new example with values set to what I understand you want as the defaults. Once we have this working correctly I can set them as defaults.
 * I've used a diamond as the circle isn't implemented yet. [TODO: implement circle. ✅ as 120 sided polygon]
 * I've fixed the error for missing series ordinal. It currently uses the order they are listed. [TODO: sort on point in time. ✅ checked with new first point added to end of list of coordinates]
 * The popup currently has latitude and longitude. What should it display: time, storm intensity, coordinates?
 * Symbol colours should already follow this QID table (the check is on the name, e.g. "severe tropical cyclone" rather than the QID).
 * For the non-tropical cyclones, I assume the P31 would be one of the main statements, rather than an identifier on the coordinates. I've added Q1063457 to the sandbox example. If this is not what you intend, can you set up a test example with a P31 qualifier set to or  so I can have something to test?
 * Further thoughts? — <span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;"> Jts1882 &#124; talk 13:19, 12 June 2020 (UTC)


 * Thanks for the speedy reply, Jts1882.
 * For the popup, it would be nice if the timestamp, storm type (the QID label), and full coordinates are displayed for now.
 * For the symbol colours, would it be possible to change the check to the QID, since the labels could change (example: )?
 * Regarding P31 for triangle/square, I'm trying to figure out how to map situations like these. I think the most practical way would be to include the P31 value as a qualifier. What do you think?
 * -- Reh man  13:41, 12 June 2020 (UTC)
 * OK, with you now on the storm types. They can change from subtropical to tropical as they move. So this means that some coordinate values would have two different P31 values, one for subtropical/tropical/extratropical cyclone and one for intensity (depression/severe tropical cyclone/etc). — <span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;"> Jts1882 &#124; talk 14:16, 12 June 2020 (UTC)
 * Correct. I'm not a fan of having two P31 qualifiers either. But I'm not too sure how else to map this data. Reh  man  14:19, 12 June 2020 (UTC)
 * I've added an extra point with a second instance of qualifier for subtropical storm. The symbol now changes. — <span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;"> Jts1882 &#124; talk 14:45, 12 June 2020 (UTC)
 * Nice, thank you. I've also spot a sort-of-bug on the rendered map to the right. The shapes' orientation seems to be in relation to the path. So depending on the path's angle, a square could even look like a diamond. Would it be possible to align all the shapes to the latitude like this? Reh  man  15:15, 12 June 2020 (UTC)
 * Ok that's strange. I though I saw the square on the map tilted, but it seems to be fine now. Reh  man  15:17, 12 June 2020 (UTC)
 * I think you probably caught an intermediate change I made. It was showing diamonds briefly. I've now put a 120-sided polygon in for the circle. Resolution can be increased, if needed. — <span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;"> Jts1882 &#124; talk 15:25, 12 June 2020 (UTC)
 * Oh ok. Thank you, Jts1882. I'm calling it a night here. I'll do a more thorough test over the weekend, and update here again. Cheers, Reh  man  15:42, 12 June 2020 (UTC)
 * All appears to be coming together quite well... I don't have anything else to add at this time... Cheers! -- Matroc (talk) 19:10, 12 June 2020 (UTC)

Jts1882, thanks for the above. I did more tests, and it seems like we're almost there. To reduce the code used in articles (and errors when one or more parameters are omitted), can I suggest some more defaults? Thoughts welcome. Reh man  13:51, 25 June 2020 (UTC)
 * Default width to be 220px
 * Default height to be based on 4:3 aspect ratio (based on width), or 165px.
 * Default alignment to be right
 * Default shape to be circle ("cyclone" is very cool, but more points closer (which happens often) would make it look cluttered)
 * Default stroke width to be 1
 * Default stroke colour to be #000000 (black)
 * Is it possible to automate the zoom function as Mapframe does? So that it basically shows a zoomed out version of all points.
 * And as the zoom, can we forgo the latitude and longitude parameters?
 * And finally, can we make the  as the default, so that we don't have to state that parameter for the more common uses.


 * The option test2 was intended as the version for working out the defaults. I've kept it as an option while working through the details as I don't want to break the discussion above. When it becomes the default, some of the maps above will change and the discussion won't make sense. But I agree it's almost time.
 * I've removed the defaults from my football map template as they were chosen for London football stadia rather than tropical cyclones.
 * Default sizes are as you suggest. Both need to be set at present, but the aspect ratio option if only width is added is on my TODO list.
 * The example to the right allows mapframe to automatically set the zoom, longitude and latitude parameters. I'm surprised this is working with the static maps, as I thought this was a bug and only worked in preview. As it seems to be fixed, the mapframe documentation needs updating.
 * The stroke-width, color and symbol shape will become the defaults when test2 options are implemented.
 * There are a few other things I haven't done yet, like using the Wikidata ids for the storm colours rather than the storm type names.
 * I suppose one additional thing is get the cyclone Wikidata item from the article page if the parameter isn't set. Then a map on a cyclone page will work using cyclone map with no parameters. — <span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;"> Jts1882 &#124; talk 15:05, 25 June 2020 (UTC)


 * Fantastic. Once the final bits are done, I think we are ready to propose this for live use. Thanks for all the hard work! Cheers, Reh  man  15:34, 25 June 2020 (UTC)
 * I have changed the defaults to match the maps using test2 and edited the maps above so they still match the discussion (at least approximately).
 * The map size can now be set either using width and height or only one of them with a 4:3 aspect ratio or using the defaults you suggested.
 * The template now allows  to automatically set zoom, latitude and longitude if the parameters are not set.
 * So the map above can be generated with a minimal call of.
 * Any other changes to the defaults and appearance needed? Maybe slightly bigger symbols? — <span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;"> Jts1882 &#124; talk 10:31, 27 June 2020 (UTC)