OpenDroneMap / FIELDimageR

FIELDimageR: A R package to analyze orthomosaic images from agricultural field trials. This package is a compilation of functions to analyze pos-mosaicking images from research fields, and allows to: crop the image; remove soil effect; build vegetation indices; rotate the image; build the plot shapefile; extract information for each plot; and evaluate stand count, canopy percentage, and plant height.
GNU General Public License v2.0
237 stars 89 forks source link

Maintenance ways between plots #4

Closed hanauer48 closed 3 years ago

hanauer48 commented 4 years ago

Hello, the solution is the best an this time and very user-friendly. I have a question about how to deal with maintenance ways between the plots. We have such fields with plots and ways for our tractors. The ways are regulary but smaller than a plot. Is it possible to exclude ways from calculation ?

Thanks in advance for an answer

filipematias23 commented 4 years ago

Hi, Thank you for asking. You can combine different shapefiles. Basically, you should make one shapefile for each part in the field that you have similarity (plots between the ways). Then, you can combine the shapefiles with rbind().

For example:

Shapefile1<- column 1 to 5 (after column 5 you have the way1) Shapefile2<- column 6 to 10 (after column 10 you have the way2) Shapefile3<- column 11 to 15

shapefileTotal<-rbind(Shapefile1, Shapefile2, Shapefile3)

Also, could you please ask again in the FIELDimageR forum at the link: Forum?

Best, Filipe

hanauer48 commented 4 years ago

Hello Filipe, thanks so far. I tried it like this: EX1.Shape<-rbind(EX1.Shape1,EX1.Shape2) But when I excecute: " EX1.Info<- fieldInfo(mosaic = EX1.Indices,fieldShape = EX1.Shape$fieldShape)" I run into an Error "Fehler in if (projection(fieldShape) != projection(mosaic)) { : Fehlender Wert, wo TRUE/FALSE nötig ist" Perhaps you could give me a hint.... Best, Juergen(hanauer48)

filipematias23 commented 4 years ago

Hi,

Perhaps, you can try this code:

projection(EX1.Shape$fieldShape) <- projection(EX1.Indices)
EX1.Info<- fieldInfo(mosaic = EX1.Indices, fieldShape = EX1.Shape$fieldShape)

Or

crs(EX1.Shape$fieldShape) <- crs(EX1.Indices)
EX1.Info<- fieldInfo(mosaic = EX1.Indices, fieldShape = EX1.Shape$fieldShape)

Let me know if it worked. Best