]> gitweb.michael.orlitzky.com - dead/census-tools.git/commitdiff
Added a space between the road name and its tlid.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 21 Oct 2009 05:42:16 +0000 (01:42 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 21 Oct 2009 05:42:16 +0000 (01:42 -0400)
Fixed the query to actually return KML.

bin/lines2kml

index 9a4b6d384264886186cd559a08b8dfda6b535264..bba63b2f59df68e25e71826b502a29fd900bab50 100755 (executable)
@@ -72,7 +72,7 @@ if (options.state != None):
     statefp = "'%s'" % options.state
 
 lines_query = """
-SELECT gid, tlid, fullname, the_geom
+SELECT gid, tlid, fullname, ST_AsKml(the_geom)
 FROM tiger_lines
 WHERE statefp=%s
 """ % statefp
@@ -91,7 +91,7 @@ for row in rows:
         # Some streets don't have a fullname.
         fullname = 'Unknown'
         
-    name = KML.Name(fullname + '(' + str(row[1]) + ')')
+    name = KML.Name(fullname + ' (' + str(row[1]) + ')')
     
     placemark.children.append(name)
     geometry = KML.RawText(row[3])