Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

derived area is calculated wrong #10360

Closed
qgib opened this issue Sep 23, 2006 · 13 comments
Closed

derived area is calculated wrong #10360

qgib opened this issue Sep 23, 2006 · 13 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Sep 23, 2006

Author Name: Redmine Admin (Redmine Admin)
Original Redmine Issue: 301

Redmine category:vectors
Assignee: Magnus Homann


Please refer to the thread where I'm reporting this in detail:

[http://lists.qgis.org/pipermail/qgis-developer/2006-August/000599.htm]l

Maciek

@qgib
Copy link
Contributor Author

qgib commented Oct 18, 2006

Author Name: Gavin Macaulay - (Gavin Macaulay -)


The link in the above ticket should be:

http://lists.qgis.org/pipermail/qgis-developer/2006-August/000599.html

@qgib
Copy link
Contributor Author

qgib commented Dec 3, 2006

Author Name: Martin Dobias (@wonder-sk)


Calculated area of a feature depends on the ellipsoid set in QGIS options. However also after setting ellipsoid 1866 the calculated area isn't correct. Needs further investigation.

Please could you give some other examples with incorrectly calculated area? Preferably simple features - e.g. rectangle. Does it calculate area correctly for layer with unprojected coordinates?

The code for calculating the area has been borrowed from GRASS, thus teoretically they should give the same results.

Do you know any utility that could help to check whether the area is correct? E.g. how to do it in grass?

@qgib
Copy link
Contributor Author

qgib commented Dec 4, 2006

Author Name: Redmine Admin (Redmine Admin)


Replying to [comment:2 wonder]:

The code for calculating the area has been borrowed from GRASS, thus teoretically they should
give the same results.

Do you know any utility that could help to check whether the area is correct? E.g. how to do it
in grass?

Grab a GRASS location (the database that GRASS works on): [http://grass.itc.it/sampledata/spearfish_grass60data-0.3.tar.gz]

  1. install GRASS; you don't need the latest and gratest - anything above 6.0 will do

  2. run GRASS

  3. for DATABASE, enter the path to the directory where you unpacked the spearfish location; put "spearfish60" for LOCATION and "PERMANENT" for MAPSET

#set the region of interest
4. g.region vect=your_vector_map

  1. spawn a display
  2. d.mon x0
  3. display vector
  4. d.vect your_vector_map
  5. query it
  6. d.what.vect -x ; l-click the polygon

The area of the of polygon is printed to the terminal.

You can create any new vector polygon with v.digit or QGIS GRASS edit.

v.digit:

  1. v.digit -n map_name
  2. (GUI pops up) draw a boundary and a single centroid inside
  3. exit v.digit; the vector is written - display it, query

QGIS GRASS edit:

  1. GRASS plugin > Open mapset
  2. GRASS plugin > Create new GRASS vector
  3. draw a boundary and centroid inside

Make sure the boundary starting and ending nodes are snapped. Remember that GRASS polygon ("area" in GRASS lingo) is made of a boundary and centroid.

Cheers,
Maciek

@qgib
Copy link
Contributor Author

qgib commented Dec 4, 2006

Author Name: Martin Dobias (@wonder-sk)


Thanks for the instructions, I'll try to do some investigation on this.

@qgib
Copy link
Contributor Author

qgib commented Dec 29, 2006

Author Name: Gary Sherman (@g-sherman)


Moved to 0.8.1

@qgib
Copy link
Contributor Author

qgib commented Dec 30, 2006

Author Name: maris-gis-gmail-com - (maris-gis-gmail-com -)


Same applys to lenght measurements in 0.8.0 on Linux.
I loaded Spearfish roads as shapefile (from GRASS export). Projection was set automaticly to one exported from GRASS (looked OK). Measured single road length with "Measure length" tool. Looked OK (~860m), but "Identify" tool shoved only 0.040 km.

@qgib
Copy link
Contributor Author

qgib commented Jan 27, 2007

Author Name: Magnus Homann (@homann)


Measurements have changed a bit in trunk. I don't think it makes any difference, bu it's worth a check. I'm not GRASS-savy myself.

@qgib
Copy link
Contributor Author

qgib commented Feb 5, 2007

Author Name: Magnus Homann (@homann)


Length measurment errror should be fixed in trunk now ().

@qgib
Copy link
Contributor Author

qgib commented Feb 5, 2007

Author Name: Magnus Homann (@homann)


Downloaded the full_circle.shp and tested it in trunk . With projections off, the areas were close enough (> 10 digits). With projections on, the error was as reported (less than 0.1%)

@qgib
Copy link
Contributor Author

qgib commented Feb 5, 2007

Author Name: Magnus Homann (@homann)


OK, I looked a bit at GRASS. You can calculate the area either as planimetric or ellipsoidal. In qgis 0.9, planimetric is selected when projectin is off, else it is ellipsoidal. The ellips is taken from the global Options-> Projections dialog.

If the reported value from GRASS was in fact the planimetric area, it reports the same as qgis does.
I will investigate this further if someone can report the planimetric and ellipsodial areas of the full_circle.shp (given the relevant NAD27 projection). Until then I put it as fixed in 0.9, but I'm glad to reopen it.

(*) Why not from canvas projection ?


  • status_id was changed from Open to In Progress

@qgib
Copy link
Contributor Author

qgib commented Feb 5, 2007

Author Name: Magnus Homann (@homann)


  • status_id was changed from In Progress to Closed
  • resolution was changed from to fixed

@qgib
Copy link
Contributor Author

qgib commented Feb 5, 2007

Author Name: Magnus Homann (@homann)


With df2b8b2 (SVN r6535), planimetric measurements are available as an option (for 0.9)

@qgib
Copy link
Contributor Author

qgib commented Aug 21, 2009

Author Name: Anónimo (Anónimo)


Milestone Version 0.9 deleted

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant