<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 2012-03-18, at 6:46 PM, Stephen Woodbridge wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Does this get you any closer to what you need:<br><br>SELECT OGR_GEOM_WKT, * FROM data;<br><br>-Steve</span></blockquote></div><br><div>That's some nice ogr-foo to learn :)</div><div><br></div><div>Simon, it sounds like you could wrap this up pretty quickly in a python script too.</div><div>A rough approach example:</div><div><br></div><div><div>from osgeo import ogr</div><div>ds = ogr.Open("/tmp/on_geoname.shp")</div><div>l1 = ds.GetLayerByIndex(0)</div><div>for f in range(l1.GetFeatureCount()):</div><div> printme = []</div><div> g1 = l1.GetFeature(f)</div><div> for fld in range(g1.GetFieldCount()):</div><div>  printme.append(g1.GetFieldAsString(fld))</div><div> gr1 = g1.GetGeometryRef()</div><div> printme.append(str(gr1.GetX()) + "-" + str(gr1.GetY()))</div><div> print printme</div></div><div><br></div><div>For what it's worth,</div><div>Tyler</div><div><br></div></body></html>