Template talk:GeoPolygon

From Wikimedia Commons, the free media repository
Jump to: navigation, search

A little test[edit]

Geocoded outline Irregular octagon.svg Google Maps 

Add wikimapia[edit]

Shall we also try to add link to wikimapia. They often have objects outlines. --Jarekt (talk) 17:10, 1 December 2011 (UTC)

Order is now truly lat-long for poly[edit]

There was a bug in the script that switched the order to long-lat for teh coordinates in the poly statement. This is fixed now. The handful of existing geopoly instances will have to be corrected (due to caching they will still look correct though!). --Dschwen (talk) 19:43, 6 December 2011 (UTC)

Thanks. The best tool I have found so far to get a polygon is [1]. It produces KML text, which has a few differences with this template: it is longiture-latitude order, and it seems to better tolerate new lines / spaces. I just copy the coordinates to Excel and convert it to the template's format using a macro. I copy the code here in case anyone is interested:
Sub convertpoly()

Dim poly As String
Dim fulltext As String

Columns("A").Select

Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
        Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
        :=Array(Array(1, 1), Array(2, 1), Array(3, 1)), TrailingMinusNumbers:=True

Dim i As Integer
For i = 0 To Range("A1").End(xlDown).Row - 1
poly = poly & " " & ActiveCell.Offset(i, 1).Value & "," & ActiveCell.Offset(i).Value & "," & ActiveCell.Offset(i, 2).Value
Next i

fulltext = "{{GeoPolygon|title={{subst:PAGENAME}}|OSM=|poly=" & poly & "}}"
ActiveCell.Offset(i).Value = poly
ActiveCell.Offset(i + 1).Select
ActiveCell.Value = fulltext

End Sub

There may be neater solutions, but it work, at least when the numbers of points is not too high. --Zolo (talk) 09:52, 10 December 2011 (UTC)

Path[edit]

This is a useful tool. Is there anyway to make this more useful for showing routes, like hiking paths, rivers or roads? For example when going to googlemap it is zoomed in to a large scale which is what you want when it is show the outline of a place but for a route between two place it is not desirable. Also any chance of linking to googleearth and creating a path object? Being able to display an elevation profile of a route would be useful. --Traveler100 (talk) 20:19, 25 January 2012 (UTC)

URI Too Large[edit]

What is the limit on number of points and length of the poly parameter string?--Traveler100 (talk) 18:07, 26 January 2012 (UTC)

OpenStreetMap[edit]

Could we change the link of OpenStreetMap : http://www.openstreetmap.org/?way=13859706 is more interesting than http://www.openstreetmap.org/browse/way/13859706 for most of us. ~Pyb (talk) 01:52, 14 November 2012 (UTC)

Yes, I like the new link better as well. ✓ Done --Dschwen (talk) 03:46, 14 November 2012 (UTC)