From: Michael Orlitzky Date: Sun, 27 Sep 2009 20:26:43 +0000 (-0400) Subject: Converted the SRID argument to type="int". X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=5bb33fa7a3c9af7acee24d7e51cccbb668c93ab6;p=dead%2Fcensus-tools.git Converted the SRID argument to type="int". --- diff --git a/bin/wkt2pop b/bin/wkt2pop index af35595..24e4a1f 100755 --- a/bin/wkt2pop +++ b/bin/wkt2pop @@ -51,6 +51,7 @@ parser.add_option('-U', parser.add_option('-s', '--srid', + type="int", help="SRID of the input geometry. Defaults to %s." % Configuration.Defaults.SRID, default=Configuration.Defaults.SRID) @@ -73,7 +74,7 @@ cursor = conn.cursor() # We're ready to build our query, one step at a time. Firsy, we store # the Text->Geom conversion in a variable; this just makes the query a # little easier to read. -geometric_object = "ST_GeomFromText('%s', %s)" % (args[0], options.srid) +geometric_object = "ST_GeomFromText('%s', %d)" % (args[0], options.srid) # We want to compute the population "under" the geometric object. We # can compute the percentage of a block that is covered by taking the