Populating area in the attribute table

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Populating area in the attribute table

James Sewell
Hi folks.  I've been evaluating QGIS and lurking on the mailing list.  
I'm a GIS student at Red River College in Winnipeg MB Canada.  I'm
considering starting a business to do digital maps of golf courses
(which is the subject of my thesis project).

I've always been a supporter of FOSS and finding a project such as QGIS
in such an advanced state of development was a welcome surprise and a
breath of fresh air.  It looks like QGIS has all the features I'd need.  
ESRI wants over 16 grand for ArcEditor and the ArcPublisher extension,
which is just nuts.  So I'd clearly _LOVE_ to use QGIS for my business.  
Can't argue with free.  I've got software costs factored into the
business plan, so that could easily go towards sponsoring a developer if
this business turns out to be a going concern.  Not fair to just take
without contributing something back.

My application is not particularly demanding in GIS terms.  Basically
the golf course superintendent wants to have accurate dimensions
(especially the area) of features on the course, like greens, bunkers,
etc.  Looking at your screenshots,
http://qgis.org/images/screenshots/qgis12.png has exactly what I need.  
An attribute table that can be viewed and the area seen.  How did you
get the area into the attribute table?

I also checked the user guide, and section 3.6 and especially 3.6.2
discusses measuring area.  With that, you have to draw out the area you
want to measure.  What I want is to digitize a feature and then
automatically calculate the area based on that.  For your screenshot,
surely you didn't go around using the measurement tool and manually
populate the attribute table???

I'd appreciate any insight you can provide to measuring area in QGIS


-James
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Populating area in the attribute table

Martin Dobias
On 4/9/07, James Sewell <[hidden email]> wrote:

>
> I've always been a supporter of FOSS and finding a project such as QGIS
> in such an advanced state of development was a welcome surprise and a
> breath of fresh air.  It looks like QGIS has all the features I'd need.
> ESRI wants over 16 grand for ArcEditor and the ArcPublisher extension,
> which is just nuts.  So I'd clearly _LOVE_ to use QGIS for my business.
> Can't argue with free.  I've got software costs factored into the
> business plan, so that could easily go towards sponsoring a developer if
> this business turns out to be a going concern.  Not fair to just take
> without contributing something back.

Hi,

glad to hear that you'd like to sponsor QGIS development. It's
possible to support QGIS by sending a donation, sponsoring developers
to develop some new features is another possibility.


> My application is not particularly demanding in GIS terms.  Basically
> the golf course superintendent wants to have accurate dimensions
> (especially the area) of features on the course, like greens, bunkers,
> etc.  Looking at your screenshots,
> http://qgis.org/images/screenshots/qgis12.png has exactly what I need.
> An attribute table that can be viewed and the area seen.  How did you
> get the area into the attribute table?

Actually attribute table shows only columns which are already present
in the database connected with the layer - it doesn't do any
calculations so far. However identify tool shows length / area of a
feature that is calculated by QGIS.


> I also checked the user guide, and section 3.6 and especially 3.6.2
> discusses measuring area.  With that, you have to draw out the area you
> want to measure.  What I want is to digitize a feature and then
> automatically calculate the area based on that.  For your screenshot,
> surely you didn't go around using the measurement tool and manually
> populate the attribute table???

There's possibility to use identify tool to find out length/area
instead of clicking every point of the feature, but it still would
need much manual work. But it should be easy to create a simple QGIS
plugin which would fill in distance/area to a field for every feature
of a layer.


Martin
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Populating area in the attribute table

Gary Sherman-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Apr 9, 2007, at 9:48 AM, Martin Dobias wrote:

>> An attribute table that can be viewed and the area seen.  How did you
>> get the area into the attribute table?

Probably the easiest way to do this is to load your data into  
PostGIS. You can create an area column for the layer, then use the  
area function to calculate areas for each geometry and populate the  
area column.

- -gary
- -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Gary Sherman
Micro Resources: http://mrcc.com
   *Geospatial Hosting
   *Web Site Hosting
"We work virtually everywhere"
- -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFGGn501zKuzV6goTgRAslPAKCqFrJ/YfBYJBeFAAMAtX0L3QGQDwCfeugq
G17QjyhKyqLM/7/F7kuMdvs=
=W21v
-----END PGP SIGNATURE-----
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Populating area in the attribute table

Lubos Balazovic-2
In reply to this post by James Sewell
Hi James,
the only way (that I know) how to fill column in attribute table with area of
linked polygons in QGIS is use GRASS modules.

1. At first you need to define mapset and then import layer into GRASS vecor
format (see User's Guide section about GRASS plugin).

2. Then create a new column in attribute table where the areas will be
populated (Plugins->GRASS->Edit GRASS vector layer->Tab Table-> Button Add
column).

3. The last step is to run module "v.to.db" from GRASS shell (use
v.to.db --help for details). This module fills selected column with
area/perimeter/etc.
That's all (now if you wish it is possible to export the layer to Shapefile
format).

This worked for me (tested on Linux with QGIS 0.8.1svn, GRASS 6.2.2cvs).


Lubos



Dňa Po 9. Apríl 2007 13:00 [hidden email] napísal:

> Message: 1
> Date: Mon, 09 Apr 2007 00:44:19 -0500
> From: James Sewell <[hidden email]>
> Subject: [Qgis-user] Populating area in the attribute table
> To: [hidden email]
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> ...
> ...
> ...
> How did you get the area into the attribute table?
>
> I also checked the user guide, and section 3.6 and especially 3.6.2
> discusses measuring area.  With that, you have to draw out the area you
> want to measure.  What I want is to digitize a feature and then
> automatically calculate the area based on that.  For your screenshot,
> surely you didn't go around using the measurement tool and manually
> populate the attribute table???
>
> I'd appreciate any insight you can provide to measuring area in QGIS
>
>
> -James
>
>
> ------------------------------
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
>
>
> End of Qgis-user Digest, Vol 14, Issue 5
> ****************************************
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Populating area in the attribute table

Matthew Perry-2
In reply to this post by James Sewell


On 4/8/07, James Sewell <[hidden email]> wrote:
How did you
get the area into the attribute table?

In addition to the other 2 suggestions, GRASS and postgis, you can also accomplish this with OGR. I have an example script in python that I created a while back:

http://perrygeo.googlecode.com/svn/trunk/gis-bin/calculate_area_field.py


--
Matthew T. Perry
http://www.perrygeo.net

"You never change things by fighting the existing reality.
To change something, build a new model that makes
the existing model obsolete" - R. Buckminster Fuller
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Populating area in the attribute table

James Sewell
In reply to this post by Gary Sherman-2
Gary Sherman wrote:
> Probably the easiest way to do this is to load your data into PostGIS.
> You can create an area column for the layer, then use the area
> function to calculate areas for each geometry and populate the area
> column.
Hi Gary, thanks for the response.

I think I can handle getting the data into PostGIS (never done it but
I've seen it in the docs).

My question is about the "area function".  Is this a PostGIS function or
QGIS?  Is the function documented somewhere?


-James
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Populating area in the attribute table

Gary Sherman-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Apr 9, 2007, at 1:10 PM, James Sewell wrote:

> Gary Sherman wrote:
>> Probably the easiest way to do this is to load your data into  
>> PostGIS. You can create an area column for the layer, then use the  
>> area function to calculate areas for each geometry and populate  
>> the area column.
> Hi Gary, thanks for the response.
>
> I think I can handle getting the data into PostGIS (never done it  
> but I've seen it in the docs).
>
> My question is about the "area function".  Is this a PostGIS  
> function or QGIS?  Is the function documented somewhere?
>
Its a PostGIS function. See "4.6.2. Examples of Spatial SQL" in the  
PostGIS manual (http://postgis.refractions.net/docs/)


>
> -James

- -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Gary Sherman
Micro Resources: http://mrcc.com
   *Geospatial Hosting
   *Web Site Hosting
"We work virtually everywhere"
- -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFGGq731zKuzV6goTgRAg6xAJ9fgioSUSSQUFlisWrDESfI6aO0LACdFSay
W6bECOblLUnQXNlZPqhc9YY=
=k9fv
-----END PGP SIGNATURE-----
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user