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

correctCoordGPS error message : GPS and relative coordinates are not of the same dimension #34

Open
billy34 opened this issue Mar 24, 2023 · 7 comments

Comments

@billy34
Copy link
Collaborator

billy34 commented Mar 24, 2023

          when correcting the GPS coordinates I get this: 

Error in correctCoordGPS(longlat = coorde.[, c("Long", "Lat")], coordRel = datos[, :
GPS and relative coordinates are not of the same dimension

how can I fix it?

Originally posted by @christianangulo450 in #13 (comment)

@billy34 billy34 mentioned this issue Mar 24, 2023
@billy34
Copy link
Collaborator Author

billy34 commented Mar 24, 2023

Hello Christian
It will help a lot if you provide a minimum reproducible example that generate this error. You can use for example reprex package for that.

@billy34
Copy link
Collaborator Author

billy34 commented Mar 24, 2023

It's likely that your coorde. and your datos dataframes do not have the same number of rows (or columns). Can you check that ?

@christianangulo450
Copy link

thank billy, it helped me.

@christianangulo450
Copy link

I have another doubt, for the graph of AGB by subplot with the code:
AGB <- summaryByPlot(dbtrnd$AGB, dbtrnd$subplot, drawPlot = TRUE, subplot = subplot)

I get the graph with the AGB [["polygon"]] data and not with the AGB [["AGB"]] data.

how can I fix that?

@MaximeRM
Copy link
Collaborator

Hi Christian,
without a reproducible example it is really difficult to understand your problem. Can you please give us a code that reproduce the error?

@christianangulo450
Copy link

christianangulo450 commented Apr 1, 2023

hello dear Maxime,
the code I entered is
AGB <- summaryByPlot(dbtrnd$AGB, dbtrnd$subplot, drawPlot = TRUE, subplot = subplot)

y me sale como resultado:

print(AGB)
$AGB
plot AGB
1 TRD_0_0 142.18022
2 TRD_0_1 146.48893
3 TRD_1_0 77.91943
4 TRD_1_1 168.27872
5 TRD_2_0 201.50547
6 TRD_2_1 236.28042
7 TRD_3_0 13.91974
8 TRD_3_1 62.36976
9 TRD_0_3 184.82701
10 TRD_1_3 338.63208
11 TRD_3_2 148.09897
12 TRD_3_3 209.29813
13 TRD_2_2 201.05035
14 TRD_2_3 156.03339
15 TRD_1_2 110.43377
16 TRD_0_2 145.61937

$polygon
Simple feature collection with 16 features and 2 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: 672757.4 ymin: 9558864 xmax: 672857.4 ymax: 9558964
CRS: NA
First 10 features:
plot AGB polygon
1 TRD_0_0 2274.8835 POLYGON ((672757.4 9558964,...
2 TRD_1_0 1246.7108 POLYGON ((672782.4 9558964,...
3 TRD_2_0 3224.0875 POLYGON ((672807.4 9558964,...
4 TRD_3_0 222.7159 POLYGON ((672832.4 9558964,...
5 TRD_0_1 2343.8229 POLYGON ((672757.4 9558939,...
6 TRD_1_1 2692.4594 POLYGON ((672782.4 9558939,...
7 TRD_2_1 3780.4867 POLYGON ((672807.4 9558939,...
8 TRD_3_1 997.9162 POLYGON ((672832.4 9558939,...
9 TRD_0_2 2329.9099 POLYGON ((672757.4 9558914,...
10 TRD_1_2 1766.9403 POLYGON ((672782.4 9558914,...

and in the subplots graph it gives me the biomass with the data from:
AGB$polygon
o because it is that in the lower part of the plot it looks like a legend indicating the biomass of AGB$polygon. To be able to explain it a little bit, I can't understand that.

@ArthurBailly
Copy link
Collaborator

The problem was that Christiana didn't understand that :

  • the output data frame ($AGB) was the AGB per hectare in each subplot
  • the output polygons ($polygon) was just the total AGB per polygon (not per hectare)
    In her defense, the documentation doesn't give any details about that !
    In a future summaryByPlot version, the documentation will be clear, I promise :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants