<div dir="ltr">Hi, <div><br></div><div>A bit late on the reply, but this solution had solved the task. Thank-you Micha.</div><div><br></div><div>One change was required for the ALTER TABLE statements. No comma needed after the table name.</div>
<div><br></div><div>Cheers!</div><div><br>~Neil B.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 28, 2013 at 12:16 PM, Micha Silver <span dir="ltr"><<a href="mailto:micha@arava.co.il" target="_blank">micha@arava.co.il</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="direction:ltr" bgcolor="#FFFFFF" text="#000000">
<div>If you bring your shapefile into a
Spatialite DB, you can use the MbrMinX(), MbrMaxX(), etc functions
to find the min and max X and Y coordinates of the feature's
bounding box.<br>
For example, if you have a Spatialite table called 'polys', you
would do:<br>
<br>
ALTER TABLE polys, ADD COLUMN minx DOUBLE PRECISION;<br>
ALTER TABLE polys, ADD COLUMN miny DOUBLE PRECISION;<br>
ALTER TABLE polys, ADD COLUMN maxx DOUBLE PRECISION;<br>
ALTER TABLE polys, ADD COLUMN maxy DOUBLE PRECISION;<br>
<br>
UPDATE polys SET minx = MbrMinX(geometry);<br>
UPDATE polys SET maxx = MbrMaxX(geometry);<br>
etc...<div><div class="h5"><br>
<br>
<br>
On 11/28/2013 06:13 PM, Neil B wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">Hi,</span>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
I am trying to find a way to populate an attribute table with
the min/max XYs of individual features within a shapefile
(polyline or polygon).</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Is
there a way to do this in the base QGIS application or with an
available plugin?</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Unfortunately
I have not been successful in any searches on the internet.</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Using
QGIS v2.0.1 (both the linux and windows installer versions)</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Thanks!</div>
</div>
<br></div></div>
This mail was received via Mail-SeCure System.<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Qgis-user mailing list
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
This mail was received via Mail-SeCure System.
</pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
<pre cols="72">--
Micha Silver
GIS Consultant, Arava Development Co.
<a href="http://www.surfaces.co.il" target="_blank">http://www.surfaces.co.il</a></pre>
</font></span></div>
</blockquote></div><br></div></div></div>