Custom X and Y plot sizes do not match actual measurements

40 views
Skip to first unread message

Daniel Smith

unread,
Oct 30, 2024, 6:07:18 PM10/30/24
to FIELDimageR: A R package to analyze orthomosaic images from field trials.

When trying to create a plot using custom X and Y dimensions, it seems like the measurements that are specified do not match what is generated. In the example below I tried generating a custom plot size with dimensions 0.5m x 1.5m, however the generated plot file has dimensions ~0.25m x 1.4m. Just wondering if this is a know issue, and whether it might be to do with the CRS being used?

image

I've attached the logs below too.

Thanks again for your help!

# Write the grid shapefile to disk output_shapefile= grid_shapefile st_write(output_shapefile, "C:/Users/uqdsmi34/AppData/Local/Temp/processing_kapPNo/28945e62f9cd4896ae8007f3de62c94c/output_shapefile.gpkg", layer = "output_shapefile", quiet = TRUE) R execution console output [1] "C:/Users/uqdsmi34/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/rlibs/sf" Linking to GEOS 3.11.2, GDAL 3.8.2, PROJ 9.3.1; sf_use_s2() is TRUE Warning message: package 'sf' was built under R version 4.3.3 [1] "C:/Users/uqdsmi34/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/rlibs/raster" Loading required package: sp Warning messages: 1: package 'raster' was built under R version 4.3.3 2: package 'sp' was built under R version 4.3.3 [1] "C:/Users/uqdsmi34/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/rlibs/sf" [1] "C:/Users/uqdsmi34/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/rlibs/terra" terra 1.7.78 Warning message: package 'terra' was built under R version 4.3.3 [1] "C:/Program Files/R/R-4.3.2/library/dplyr" Attaching package: 'dplyr' The following objects are masked from 'package:terra': intersect, union The following objects are masked from 'package:raster': intersect, select, union The following objects are masked from 'package:stats': filter, lag The following objects are masked from 'package:base': intersect, setdiff, setequal, union Warning message: package 'dplyr' was built under R version 4.3.3 Simple feature collection with 4 features and 1 field Geometry type: POINT Dimension: XY Bounding box: xmin: 434212.5 ymin: 6950955 xmax: 434228.7 ymax: 6950974 Projected CRS: GDA94 / MGA zone 56 id geometry 1 1 POINT (434222 6950974) 2 2 POINT (434228.7 6950970) 3 3 POINT (434219.3 6950955) 4 4 POINT (434212.5 6950959) NULL [,1] [,2] [1,] 0.4173291 -0.2607314 [2,] 0.4828722 0.7839262 [,1] [,2] [1,] -3103420 1615136 [,1] [,2] [1,] 0.4173291 -0.2607314 [2,] 0.4828722 0.7839262 [,1] [,2] [1,] -3103420 1615136 Simple feature collection with 12 features and 1 field Geometry type: POLYGON Dimension: XY Bounding box: xmin: 434212.5 ymin: 6950955 xmax: 434228.7 ymax: 6950974 Projected CRS: GDA94 / MGA zone 56 First 10 features: geometry ID 1 POLYGON ((434212.5 6950959,... 1 2 POLYGON ((434214.2 6950958,... 2 3 POLYGON ((434215.9 6950957,... 3 4 POLYGON ((434217.6 6950956,... 4 5 POLYGON ((434215.7 6950964,... 5 6 POLYGON ((434217.3 6950963,... 6 7 POLYGON ((434219 6950962, 4... 7 8 POLYGON ((434220.7 6950961,... 8 9 POLYGON ((434218.8 6950969,... 9 10 POLYGON ((434220.5 6950968,... 10 Simple feature collection with 12 features and 0 fields Geometry type: POLYGON Dimension: XY Bounding box: xmin: 434214.5 ymin: 6950957 xmax: 434226.8 ymax: 6950972 Projected CRS: GDA94 / MGA zone 56 First 10 features: x 1 POLYGON ((434215.4 6950961,... 2 POLYGON ((434217.1 6950960,... 3 POLYGON ((434218.8 6950959,... 4 POLYGON ((434220.5 6950958,... 5 POLYGON ((434218.5 6950966,... 6 POLYGON ((434220.2 6950965,... 7 POLYGON ((434221.9 6950964,... 8 POLYGON ((434223.6 6950963,... 9 POLYGON ((434221.7 6950972,... 10 POLYGON ((434223.4 6950971,... Execution completed in 5.23 seconds Results: {'output_shapefile': 'C:/Users/uqdsmi34/AppData/Local/Temp/processing_kapPNo/28945e62f9cd4896ae8007f3de62c94c/output_shapefile.gpkg'} Loading resulting layers Algorithm 'FIELDimageR fieldShape' finished
Reply all
Reply to author
Forward
0 new messages