Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
IN-WOP
SeineBasin2
Commits
3832fc4f
Commit
3832fc4f
authored
Jan 19, 2022
by
Dorchies David
Browse files
feat(plot_seine_map): add cities in empty spaces
parent
83ea64de
Pipeline
#31975
passed with stages
in 38 minutes and 52 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
R/plot_seine_map.R
View file @
3832fc4f
...
...
@@ -31,7 +31,7 @@ plot_seine_map <- function(r, breaks, title, credits = "IGN, Inrae", ...) {
# Add main cities
data
(
gis_villes
)
mf_label
(
x
=
gis_villes
,
var
=
"X1"
,
cex
=
0.5
,
halo
=
TRUE
,
r
=
0.10
)
cex
=
0.5
5
,
halo
=
TRUE
,
r
=
0.10
)
# Add label for lakes
lac
<-
data.frame
(
x
=
c
(
780355.2
,
760259.1
,
749809.1
,
719263.0
),
...
...
@@ -41,7 +41,7 @@ plot_seine_map <- function(r, breaks, title, credits = "IGN, Inrae", ...) {
sf_lac
<-
st_as_sf
(
lac
,
coords
=
c
(
"x"
,
"y"
),
crs
=
27572
)
mf_map
(
sf_lac
,
var
=
"zz"
,
type
=
"symb"
,
pal
=
"red"
,
leg_pos
=
NA
)
mf_label
(
x
=
sf_lac
,
var
=
"name"
,
col
=
"navyblue"
,
cex
=
0.
65
,
halo
=
TRUE
,
r
=
0.10
,
pos
=
4
)
cex
=
0.
7
,
halo
=
TRUE
,
r
=
0.10
,
pos
=
4
)
legend
(
"bottomleft"
,
...
...
data-raw/gis_bvi.R
View file @
3832fc4f
#' Record GIS shape file of intermediate basin edges
# Local config
library
(
seinebasin2
)
cfg
<-
loadConfig
(
"bookdown/config.yml"
)
gis_bvi
<-
rgdal
::
readOGR
(
dsn
=
getDataPath
(
cfg
$
hydroclim
$
path
,
"GIS"
,
"bvi_shape"
,
cfg
=
cfg
),
...
...
data-raw/gis_villes.R
View file @
3832fc4f
#' Record GIS shape file of river network
# Local config
library
(
seinebasin2
)
cfg
<-
loadConfig
(
"bookdown/config.yml"
)
# Read Shape file
gis_villes
<-
sf
::
st_read
(
dsn
=
getDataPath
(
cfg
$
hydroclim
$
path
,
"GIS"
,
"Villes_principales"
,
cfg
=
cfg
),
layer
=
"Villes_principales"
)
#
S
ele
ction of main river
s
#
D
ele
te extra column
s
gis_villes
<-
gis_villes
[,
"X1"
]
# Add extra towns
dfV
<-
data.frame
(
x
=
c
(
581488
,
668501
,
723528
,
672043
,
670359
,
693041
),
y
=
c
(
2492465
,
2539327
,
2474726
,
2487744
,
2356131
,
2508093
),
X1
=
c
(
"Beauvais"
,
"Saint-Quentin"
,
"Reims"
,
"Soissons"
,
"Sens"
,
"Laon"
))
gis_villes
<-
rbind
(
gis_villes
,
sf
::
st_as_sf
(
dfV
,
coords
=
c
(
"x"
,
"y"
),
crs
=
sf
::
st_crs
(
gis_villes
)))
usethis
::
use_data
(
gis_villes
,
overwrite
=
TRUE
)
data/gis_villes.rda
View file @
3832fc4f
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment