Cheers, and thanks for pointing out the typo.

On 04/12/2013 10:37, Neil B wrote:
Hi, 

A bit late on the reply, but this solution had solved the task. Thank-you Micha.

One change was required for the ALTER TABLE statements. No comma needed after the table name.

Cheers!

~Neil B.


On Thu, Nov 28, 2013 at 12:16 PM, Micha Silver <[email protected]> wrote:
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.
For example, if you have a Spatialite table called 'polys', you would do:

ALTER TABLE polys, ADD COLUMN minx DOUBLE PRECISION;
ALTER TABLE polys, ADD COLUMN miny DOUBLE PRECISION;
ALTER TABLE polys, ADD COLUMN maxx DOUBLE PRECISION;
ALTER TABLE polys, ADD COLUMN maxy DOUBLE PRECISION;

UPDATE polys SET minx = MbrMinX(geometry);
UPDATE polys SET maxx = MbrMaxX(geometry);
etc...



On 11/28/2013 06:13 PM, Neil B wrote:
Hi,

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).

Is there a way to do this in the base QGIS application or with an available plugin?

Unfortunately I have not been successful in any searches on the internet.

Using QGIS v2.0.1 (both the linux and windows installer versions)

Thanks!

This mail was received via Mail-SeCure System.


_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user
This mail was received via Mail-SeCure System.




-- 
Micha Silver
GIS Consultant, Arava Development Co.
http://www.surfaces.co.il


This mail was received via Mail-SeCure System.


_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user
This mail was received via Mail-SeCure System.




-- 
Micha Silver
GIS Consulting
052-3665918
http://www.surfaces.co.il
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to