Closed PieterjanVerhelst closed 3 years ago
Thanks @PieterjanVerhelst. I will check it next week.
Just FYI: I added the file receivernetwork_frome_2014.csv
in the folder \fish-tracking\scripts\receiver_distance_analysis\data
containing the coordinates of the detection stations in the River Frome. Hence, when the issue is fixed to upload the frome-shapefile, running the rest of the code should result in the distance matrix between the Frome stations (obviously after setting the correct file name at line 88 in prepare_dataset.R
).
@damianooldoni just a kind reminder ;-)
Thanks @PieterjanVerhelst, I definitely needed a reminder, especially if it is a kind one :laughing: I give a look on it immediately.
.shp
files are not enough to load shapes in R, you need also files with other extensions (dbf, prj, shx) which are generated together. You can see some examples in other directories, like yours here:
https://github.com/inbo/fish-tracking/tree/master/scripts/receiver_distance_analysis/data/PJ_manual_water
Maybe you can consider to save your shapefiles as as geojson? See this nice INBO tutorial about it: https://inbo.github.io/tutorials/tutorials/spatial_standards_vector/#how-to-make-and-use-geojson-files-geojson geopackages are also possible (1st part of the tutorial)
Thanks, that was indeed the problem!
I want to calculate the distances between receivers from the River Frome, hence, I created a branch
distance-frome
in which I uploaded the shapefileStatutory_Main_River_Map.shp
in the folder\scripts\receiver_distance_analysis\data\UK\Frome
. When I run the code (line 69 - 73 in scriptprepare_dataset.R
):I get the following error: