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
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to