Jump to content

Wikipedia talk:WikiProject U.S. Roads/Maps task force/Tutorial

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Overview and alternative

[edit]

It needs some work from people who understand the principles better than I do. First glance told me there were two ways to proceed to the desired goal, the SVG method and the KML method, of which the latter had two major parts. No, it seems I got it backwards; the SVG section is about making an outline map on which to show routes, while the KML section is about two different methods for making the list of coordinates of bend points for the road (pipeline, watershed, whatever) that must be added to make it a real route map. Where the choice is, is between two ways of making the track list. This all needs to be made clear in an intro, along with a statement of the goal we are pursuing. And, umm, whether we really need to make a SVG file every time, or can use an existing locator map if an acceptable one is available.

Hmm, maybe I can suggest an opening line. "This tutorial tells how to make maps of roads or other linear features, for presentation in Wikipedia articles. The major parts are (1) make a map of the area which will be an SVG file, and (2) make a routelist of turning points which will be a KML file. Finally, the method to insert the finished map into an article is little different from the method for an image." Almost certainly I have missed a vital point or said something just plain untrue, so I'm not inserting these sentences myself. Jim.henderson (talk) 15:24, 11 February 2012 (UTC)[reply]

Yeah, now that these new methods are coming about the page definitely needs better organization, and/or KML tutorials should be moved to WP:HWY - ʄɭoʏɗiaɲ τ ¢ 19:33, 11 February 2012 (UTC)[reply]


Picking apart KMLs

[edit]
  • The entire file is enclosed within <kml> </kml>
  • Next is a header, calling the implementation of kml (similar to an html header)
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
  • Following the header is the content. Similar to a body tag in html, the document tag encloses the content between <document> and </document>
  • Next is the stylemap, which calls the styles (for setting icons and properties of the lines)
	<StyleMap id="m_ylw-pushpin">
		<Pair>
			<key>normal</key>
			<styleUrl>#s_ylw-pushpin</styleUrl>
		</Pair>
		<Pair>
			<key>highlight</key>
			<styleUrl>#s_ylw-pushpin_hl</styleUrl>
		</Pair>
	</StyleMap>
	<Style id="s_ylw-pushpin_hl">
		<IconStyle>
			<scale>1.3</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
			</Icon>
			<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
		</IconStyle>
		<LineStyle>
			<color>ff0000ff</color>
			<width>5</width>
		</LineStyle>
	</Style>
	<Style id="s_ylw-pushpin">
		<IconStyle>
			<scale>1.1</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
			</Icon>
			<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
		</IconStyle>
		<LineStyle>
			<color>ff0000ff</color>
			<width>5</width>
		</LineStyle>
	</Style>
  • Each path is enclosed within <Placemark> and </Placemark>
  • Within the placemark, the styleid for the path and the name (which appears in the left pane) are declared
		<name>Highway 85</name>
		<styleUrl>#m_ylw-pushpin</styleUrl>
  • Then are the <LineString> and </LineString> tags, which enclose the content of the line
  • Before the coordinates, you can set some properties. <tessellate>1</tessellate> is one such example (breaks the line into segments)
  • Finally, nested in it all, are the <coordinates></coordinates> tags. Inside those tags are coordinate pairs, separated by a space (there are no spaces in the pairings themselves; commas separate values). The third value, following the coords, is the elevation. Since online map services are 2D (at this point), this should generally be 0.
-- ʄɭoʏɗiaɲ τ ¢ 19:34, 11 February 2012 (UTC)[reply]

Tutorial for ArcGIS, and other notations...

[edit]

Howdy,

Have created a tutorial for how I create KML files for WP using ArcGIS. [1]. I point you towards a couple examples I put together, Interstate 20 in Texas and Interstate 27. ArcGIS is not as friendly as qGIS, from what I've read in the instructions. If it could make KMLs based on selections and didn't create KMZ files only, it would be quicker. 25or6to4 (talk) 01:49, 23 March 2012 (UTC)[reply]

Oddly enough I'm learning ArcGIS 10 as part of my Civil Engineering course. I've actually found it friendlier than qGIS (except on the wallet). - ʄɭoʏɗiaɲ τ ¢ 04:54, 23 March 2012 (UTC)[reply]

Creating KMLs with GIS data

[edit]

Recently I've been uploading KML files to various road articles and so far, I have gotten a lot of the FA-class articles on short roads done. I have been manually creating these KML files by just drawing on the Google Earth map, but for the longer and curvier roads, this is obviously not ideal. I am looking to create some KML files using GIS data based off the Tutorial, but the problem with a lot of GIS datasets is that you have to select multiple segments of lines in order to save one route. This is fine for creating maps since the multiple segments are converted to one path during .svg creation. But if these multiple segments are saved as a KML file, when loaded into GE or theoretically any of the maps, there will be multiple placemarks for one route.

(KML text example: <Placemark><LineString><coordinates>blah blah blah</coordinates></LineString></Placemark> <Placemark><LineString><coordinates>yadda yadda yadda</coordinates></LineString></Placemark> <Placemark><LineString><coordinates>veni vidi vici</coordinates></LineString></Placemark>...)

Does anyone have any ideas on how to get these multiple segments into one continuous path? I am using QGIS v. 1.8.0 . —Mr. Matté (Talk/Contrib) 18:42, 30 September 2012 (UTC)[reply]

Interstate 8 is a good example of this problem. You might want to cross-post at WT:USRD; not sure everyone's watching this page. --Rschen7754 20:29, 30 September 2012 (UTC)[reply]

I figured out a way to solve my problem, although it involves a great use of Notepad and manual editing to accomplish the goal. User:Mr. Matté/Create KMLs from line dataMr. Matté (Talk/Contrib) 01:31, 11 October 2012 (UTC)[reply]

Never saw either discussion pop up. Here is my description of how I accomplished this. Also had some notepad/wordpad manual steps. 25or6to4 (talk) 08:06, 12 October 2012 (UTC)[reply]
Yeah, we both have essentially the same instructions, but mine has the warning about segments that progress from north-->south or east-->west. If you merge a segment that goes N-S with a S-N segment, you'll end up with a lot of criss-crossing lines and end up having to delete all the points in the S-N segment and redraw manually. —Mr. Matté (Talk/Contrib) 14:34, 12 October 2012 (UTC)[reply]
KML is a pain in that regard, but once you become familiar with the structure of them you can do a lot with the file in notepad. http://sortmylist.com/ is a very good tool for reversing a line segment. C&P your raw coords, set the delimiter as a space and go to sort->reverse list. - Floydian τ ¢ 15:14, 12 October 2012 (UTC)[reply]

OSM relation and KML

[edit]

How to create KML files from OSM relations ? Many KML files can be created there is easy way export osm relations. [2] --naveenpf (talk) 05:24, 19 June 2014 (UTC)[reply]

After getting gpx http://kml2gpx.com/ use this ? --naveenpf (talk) 05:32, 19 June 2014 (UTC)[reply]

Old Symbology Tab

[edit]

Where is the "Old Symbology" tab? Was it removed in a later version of QGIS? Vcap36 (talk) 14:57, 14 March 2016 (UTC)[reply]

Symbology?

[edit]

As the post above me said, there is no symbology tab anymore in qGis.

The qGis properties interface looks like this.

[3]

How does one enter the equilavent for this? — Preceding unsigned comment added by EggOfReason (talkcontribs) 23:14, 16 December 2017 (UTC)[reply]

@EggOfReason and Vcap36: Where it says "Single Symbol", click and choose "Categorized". Then you can choose SIGNT1 as your column and go from there. You can also select "Rules Based", which allows for greater customization. I will update the tutorial later this evening. –Fredddie 01:04, 17 December 2017 (UTC)[reply]