Unable to visualize fieldShape

112 views
Skip to first unread message

Artūrs Katamadze

unread,
Oct 31, 2023, 2:58:33 PM10/31/23
to FIELDimageR: A R package to analyze orthomosaic images from field trials.
Hello,

I have a couple of issues with the new FieldimageR. 
1. How can I rotate the image? Or is it not necessary anymore? 
2. When i create a fieldShape i get an error that is listed below. How can i resolve it? I tried reducing the size of my orthomosaic but it does not work e.g. with 12 10m2 plot at 1cm/px resolution i have 5mil pixels but allowed is only 500k


Warning messages: 1: In rasterCheckSize(x, maxpixels = maxpixels) : maximum number of pixels for Raster* viewing is 5e+05 ; the supplied Raster* has 2002965 ... decreasing Raster* resolution to 5e+05 pixels to view full resolution set 'maxpixels = 2002965 ' 2: In CPL_crs_from_input(x) : GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order.

fmatias

unread,
Nov 1, 2023, 7:04:20 AM11/1/23
to FIELDimageR: A R package to analyze orthomosaic images from field trials.
Hi Artur,

1. Rotation is not necessary anymore because we are using fieldShape_render() from FIELDimageR.Extra

2. This msg is a warning and not error. Seems it´s working... Could you check the results, please?

Hope it helps,
Filipe

Artūrs Katamadze

unread,
Nov 2, 2023, 11:57:29 PM11/2/23
to FIELD...@googlegroups.com
Hi,

When i try to run the indices I get this error - 
> EX1.Indices<- fieldIndex(mosaic = EX1.Shape$newMosaic, Red=3,Green=2,Blue=1,RedEdge=4,NIR=5, 
+                          index = c("NGRDI","BGI"), 
+                          myIndex = c("(Red-Blue)/Green"))
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘nlyr’ for signature ‘"NULL"’



Maybe this has something to do with resolution after all, when i create the shape file it is super small when its visualized
lines.png
image.png

--
You received this message because you are subscribed to the Google Groups "FIELDimageR: A R package to analyze orthomosaic images from field trials." group.
To unsubscribe from this group and stop receiving emails from it, send an email to FIELDimageR...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/FIELDimageR/807a911a-a0b6-4857-b0b2-61745b94431cn%40googlegroups.com.

pspawar

unread,
Nov 9, 2023, 1:00:36 AM11/9/23
to FIELD...@googlegroups.com
Hi..,
Ensure 'newMosaic' is correctly initialized. It appears 'newMosaic' might not be a spatRaster object. The 'nlyr' error implies an issue with a 'NULL' signature. Verify your data and initialization. Can you provide detailed properties of 'newMosaic'? This information will aid in understanding the issue more effectively.

Filipe Matias

unread,
Nov 9, 2023, 5:27:02 AM11/9/23
to FIELD...@googlegroups.com
Hi everyone,

Another suggestion is using rast():

EX1.Indices<- fieldIndex(mosaic = rast(EX1.Shape$newMosaic), Red=3,Green=2,Blue=1,RedEdge=4,NIR=5, 
                          index = c("NGRDI","BGI"), 
                          myIndex = c("(Red-Blue)/Green"))

Let us know if it works...!

Best,
Filipe

Artūrs Katamadze

unread,
Nov 13, 2023, 1:59:45 PM11/13/23
to FIELD...@googlegroups.com

@pspawer How can i check the properties of the newMosaic? I get these details when i call each line:
> EX1.Shape
Simple feature collection with 96 features and 2 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 472761.1 ymin: 4283504 xmax: 472763.2 ymax: 4283510
Projected CRS: WGS 84 / UTM zone 29N
First 10 features:
                          affineT ID PlotID
1  POLYGON ((472761.5 4283504,...  1      1
2  POLYGON ((472761.5 4283504,...  2      2
3  POLYGON ((472761.5 4283504,...  3      3
4  POLYGON ((472761.5 4283504,...  4      4
5  POLYGON ((472761.5 4283504,...  5      5
6  POLYGON ((472761.4 4283504,...  6      6
7  POLYGON ((472761.4 4283504,...  7      7
8  POLYGON ((472761.4 4283504,...  8      8
9  POLYGON ((472761.4 4283504,...  9      9
10 POLYGON ((472761.4 4283504,... 10     10
> EX1.Shape$newMosaic
NULL
Not sure what any of this means :D

@Filipe Now I am seeing this error and the lines are created again in a smaller area than I need.

Warning messages:
1: In rasterCheckSize(x, maxpixels = maxpixels) :
  maximum number of pixels for Raster* viewing is 5e+05 ; 
the supplied Raster* has 42701904 
 ... decreasing Raster* resolution to 5e+05 pixels
 to view full resolution set 'maxpixels =  42701904 '
2: In CPL_crs_from_input(x) :
  GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order.

image.png

Stewart Morley

unread,
Nov 30, 2023, 12:19:33 PM11/30/23
to FIELDimageR: A R package to analyze orthomosaic images from field trials.
Was this ever resolved or explained?
Reply all
Reply to author
Forward
0 new messages