Skip to content

Commit cb4c44d

Browse files
committed
new package name : cppRosm
1 parent 1f5abcd commit cb4c44d

23 files changed

+84
-84
lines changed

.Rbuildignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
^cppRnet\.Rproj$
1+
^cppRosm\.Rproj$
22
^\.Rproj\.user$
33
^Makefile$
44
^LICENSE\.md$

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Package: cppRnet
1+
Package: cppRosm
22
Title: Fast en Efficient OSM Data in R
33
Version: 1.0.0
44
Authors@R:
@@ -7,8 +7,8 @@ Authors@R:
77
Description: A set of fast and user friendly functions for working with large
88
OpenStreetMap extract data. Developed on top of the C++ libosmium library.
99
License: MIT + file LICENSE
10-
URL: https://github.com/ischlo/cppRnet, https://ischlo.github.io/cppRnet/
11-
BugReports: https://github.com/ischlo/cppRnet/issues
10+
URL: https://github.com/ischlo/cppRosm, https://ischlo.github.io/cppRosm/
11+
BugReports: https://github.com/ischlo/cppRosm/issues
1212
Imports:
1313
cli,
1414
data.table,

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright (c) 2024 cppRnet authors
3+
Copyright (c) 2024 cppRosm authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ importFrom(data.table,.N)
1414
importFrom(data.table,.NGRP)
1515
importFrom(data.table,.SD)
1616
importFrom(data.table,data.table)
17-
useDynLib(cppRnet, .registration = TRUE)
17+
useDynLib(cppRosm, .registration = TRUE)

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# cppRnet 1.0.0
1+
# cppRosm 1.0.0
22

33
* Big update since the package no longer depends on a local installation of *protozero* and *libosmium*, they are imported and built with the package, making it mostly self sufficient.
44

5-
# cppRnet 0.0.9000
5+
# cppRosm 0.0.9000
66

77
* Added a `NEWS.md` file to track changes to the package.

R/RcppExports.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
33

44
cpp_extract_graph <- function(file) {
5-
.Call(`_cppRnet_cpp_extract_graph`, file)
5+
.Call(`_cppRosm_cpp_extract_graph`, file)
66
}
77

88
cpp_extract_data <- function(file, main_sel) {
9-
.Call(`_cppRnet_cpp_extract_data`, file, main_sel)
9+
.Call(`_cppRosm_cpp_extract_data`, file, main_sel)
1010
}
1111

R/construct_geom.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
#'@title construct_geom
33
#'@name construct_geom
44
#'@description
5-
#'From a cppRnet data table, make the geometries.
5+
#'From a cppRosm data table, make the geometries.
66
#'
7-
#'@param cpprnet_dt a data table obtained with cppRnet extract_data()
7+
#'@param cpprnet_dt a data table obtained with cppRosm extract_data()
88
#'@param complete bool. TRUE to reconstruct Polygons, else use just points.
99
#'@param cores integer. Run the computation on multiple cores using `parallel`.
1010
#'@examples
11-
#'cpprnet_filepath <- system.file(package = 'cppRnet','extdata','map.osm')
12-
#'cpprnet_dt <- cppRnet::extract_data(filename = cpprnet_filepath)
11+
#'cpprnet_filepath <- system.file(package = 'cppRosm','extdata','map.osm')
12+
#'cpprnet_dt <- cppRosm::extract_data(filename = cpprnet_filepath)
1313
#'
14-
#'cppRnet::construct_geom(cpprnet_dt,complete=TRUE)
14+
#'cppRosm::construct_geom(cpprnet_dt,complete=TRUE)
1515
#'
1616
#'head(cpprnet_dt$geometry)
1717
#'

R/cppRnet-package.R renamed to R/cppRosm-package.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
#' @importFrom data.table .SD
1313
#' @importFrom data.table data.table
1414
#' @importFrom Rcpp sourceCpp
15-
#' @useDynLib cppRnet, .registration = TRUE
15+
#' @useDynLib cppRosm, .registration = TRUE
1616
## usethis namespace: end
1717
NULL

R/extract_data.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#'@param filename a local osm extract file with .osm or .osm.pbf extension.
99
#'@param main_keys a vector containing main keys to extract the values for. Check osm map features or vignette for a full detail.
1010
#'@examples
11-
#' local_osm_filename <- system.file("extdata",'map.osm', package = "cppRnet")
11+
#' local_osm_filename <- system.file("extdata",'map.osm', package = "cppRosm")
1212
#'
13-
#' data <- cppRnet::extract_data(local_osm_filename)
13+
#' data <- cppRosm::extract_data(local_osm_filename)
1414
#' head(data)
1515
#' head(data$attrs)
1616
#'@return a data table with several main columns, including one called `attrs` which contains lists

R/extract_graph.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
#'
88
#'@param filename a local osm extract file with .osm or .osm.pbf extension.
99
#'
10-
# local_osm_filename <- system.file("extdata",'map.osm', package = "cppRnet")
10+
# local_osm_filename <- system.file("extdata",'map.osm', package = "cppRosm")
1111
#
12-
# cppRnet::extract_graph(local_osm_filename)
12+
# cppRosm::extract_graph(local_osm_filename)
1313
#'
1414
#'@return this function returns the value 1 to the R environment when it's completed.
1515
#' It writes out 2 files containing nodes and segments. The files are written in the current directory and are called:
@@ -31,4 +31,4 @@ extract_graph <- function(filename){
3131
# return(graph_data)
3232

3333
cpp_extract_graph(filename)
34-
}
34+
}

R/filter_sec.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
#'@title Filtering secondary tags
44
#'@name filter_sec
55
#'@description
6-
#'This function provides a handy way of filtering a cppRnet data set for specific secondary tags.
6+
#'This function provides a handy way of filtering a cppRosm data set for specific secondary tags.
77
#'It will return a data set to which will be added new columns based on the specific secondary keys and values that
88
#'are looked for.
99
#'
10-
#'@param data a cppRnet data set, with an `attrs` column.
10+
#'@param data a cppRosm data set, with an `attrs` column.
1111
#'@param keys either a vector of valid key parameters, or a named list where names correspond to keys and
1212
#'attributes are vectors of matching values.
1313
#'@param cores number of cores to parallelise the computation
1414
#'
1515
#'@examples
1616
#'
17-
#'test_file <- system.file(package = 'cppRnet','extdata','map.osm')
18-
#'data <- cppRnet::extract_data(test_file)
17+
#'test_file <- system.file(package = 'cppRosm','extdata','map.osm')
18+
#'data <- cppRosm::extract_data(test_file)
1919
#'
2020
#'
2121
#'keys <- list("cuisine"=c("pizza","japanese")
2222
#' ,"takeaway"=c("yes"))
2323
#'
24-
#'data_filtered <- cppRnet::filter_sec(data,keys)
24+
#'data_filtered <- cppRosm::filter_sec(data,keys)
2525
#'
2626
#'@export
2727
filter_sec <- function(data,keys,cores=1){

R/map_features.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ map_keys_1st <- c('aerialway'
6363
,'waterway'
6464
)
6565

66-
# all the other keys are considered 2nd level
66+
# all the other keys are considered 2nd level

R/oop.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# oop
2-
# creating the cppRnet data.frame/data.table S3 class for better consistency.
2+
# creating the cppRosm data.frame/data.table S3 class for better consistency.
33

44
# new_myclass()
55
# validate_myclass()
66
# myclass()
77

8-
# a cppRnet class object is also a data.frame, or data.table.
8+
# a cppRosm class object is also a data.frame, or data.table.
99
# it has a few restrictions, mainly the attrs column that should contain named lists.
1010
# an id column with osm ids.
1111
# a lon and lat columns
1212
# a key and value columns in the simplest form.
1313

14-
# any method of the cppRnet package that uses cppRnet data tables should ideally do a validity check.
14+
# any method of the cppRosm package that uses cppRosm data tables should ideally do a validity check.
1515

1616
new_cppRnet_dt <- function(dt = data.frame()){
1717

README.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ output: github_document
44
---
55

66
<!-- badges: start -->
7-
[![R-CMD-check](https://github.com/ischlo/cppRnet/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ischlo/cppRnet/actions/workflows/R-CMD-check.yaml)
7+
[![R-CMD-check](https://github.com/ischlo/cppRosm/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ischlo/cppRosm/actions/workflows/R-CMD-check.yaml)
88
![](https://github.com/ischlo/cppSim/actions/workflows/rhub.yaml/badge.svg)
99
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
10-
![](https://github.com/ischlo/cppRnet/actions/workflows/pkgdown.yaml/badge.svg)
10+
![](https://github.com/ischlo/cppRosm/actions/workflows/pkgdown.yaml/badge.svg)
1111

1212
<!-- badges: end -->
1313

@@ -30,7 +30,7 @@ This section is under development, it will be a quick setup guide for the compil
3030

3131
## Installation
3232

33-
The usage of `cppRnet` relies on the **libosmium** library, which needs to be installed on the machine. For more details on installation refer to the official website. On mac, it is recommended to install using [`brew`](https://brew.sh) with the following terminal command:
33+
The usage of `cppRosm` relies on the **libosmium** library, which needs to be installed on the machine. For more details on installation refer to the official website. On mac, it is recommended to install using [`brew`](https://brew.sh) with the following terminal command:
3434

3535
``` bash
3636
brew install libosmium
@@ -39,9 +39,9 @@ brew install libosmium
3939
Next, install the package itself from github:
4040

4141
``` r
42-
# remotes::install_github('ischlo/cppRnet')
43-
# devtools::install_github('ischlo/cppRnet')
44-
# pak::pak("ischlo/cppRnet")
42+
# remotes::install_github('ischlo/cppRosm')
43+
# devtools::install_github('ischlo/cppRosm')
44+
# pak::pak("ischlo/cppRosm")
4545

4646
```
4747

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Ivann Schlosser
22

33
<!-- badges: start -->
44

5-
[![R-CMD-check](https://github.com/ischlo/cppRnet/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ischlo/cppRnet/actions/workflows/R-CMD-check.yaml)
5+
[![R-CMD-check](https://github.com/ischlo/cppRosm/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ischlo/cppRosm/actions/workflows/R-CMD-check.yaml)
66
![](https://github.com/ischlo/cppSim/actions/workflows/rhub.yaml/badge.svg)
77
[![Lifecycle:
88
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
@@ -33,7 +33,7 @@ the compiled dependencies.
3333

3434
## Installation
3535

36-
The usage of `cppRnet` relies on the **libosmium** library, which needs
36+
The usage of `cppRosm` relies on the **libosmium** library, which needs
3737
to be installed on the machine. For more details on installation refer
3838
to the official website. On mac, it is recommended to install using
3939
[`brew`](https://brew.sh) with the following terminal command:
@@ -45,9 +45,9 @@ brew install libosmium
4545
Next, install the package itself from github:
4646

4747
``` r
48-
# remotes::install_github('ischlo/cppRnet')
49-
# devtools::install_github('ischlo/cppRnet')
50-
# pak::pak("ischlo/cppRnet")
48+
# remotes::install_github('ischlo/cppRosm')
49+
# devtools::install_github('ischlo/cppRosm')
50+
# pak::pak("ischlo/cppRosm")
5151
```
5252

5353
The package will detect the presence of the library and notify you if it

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
url: https://ischlo.github.io/cppRnet/
1+
url: https://ischlo.github.io/cppRosm/
22
template:
33
bootstrap: 5
44

man/construct_geom.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/cppRnet-package.Rd renamed to man/cppRosm-package.Rd

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/extract_data.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/filter_sec.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/RcppExports.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
1212

1313
// cpp_extract_graph
1414
int cpp_extract_graph(const std::string& file);
15-
RcppExport SEXP _cppRnet_cpp_extract_graph(SEXP fileSEXP) {
15+
RcppExport SEXP _cppRosm_cpp_extract_graph(SEXP fileSEXP) {
1616
BEGIN_RCPP
1717
Rcpp::RObject rcpp_result_gen;
1818
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -23,7 +23,7 @@ END_RCPP
2323
}
2424
// cpp_extract_data
2525
Rcpp::List cpp_extract_data(const std::string& file, Rcpp::CharacterVector main_sel);
26-
RcppExport SEXP _cppRnet_cpp_extract_data(SEXP fileSEXP, SEXP main_selSEXP) {
26+
RcppExport SEXP _cppRosm_cpp_extract_data(SEXP fileSEXP, SEXP main_selSEXP) {
2727
BEGIN_RCPP
2828
Rcpp::RObject rcpp_result_gen;
2929
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -35,12 +35,12 @@ END_RCPP
3535
}
3636

3737
static const R_CallMethodDef CallEntries[] = {
38-
{"_cppRnet_cpp_extract_graph", (DL_FUNC) &_cppRnet_cpp_extract_graph, 1},
39-
{"_cppRnet_cpp_extract_data", (DL_FUNC) &_cppRnet_cpp_extract_data, 2},
38+
{"_cppRosm_cpp_extract_graph", (DL_FUNC) &_cppRosm_cpp_extract_graph, 1},
39+
{"_cppRosm_cpp_extract_data", (DL_FUNC) &_cppRosm_cpp_extract_data, 2},
4040
{NULL, NULL, 0}
4141
};
4242

43-
RcppExport void R_init_cppRnet(DllInfo *dll) {
43+
RcppExport void R_init_cppRosm(DllInfo *dll) {
4444
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
4545
R_useDynamicSymbols(dll, FALSE);
4646
}

0 commit comments

Comments
 (0)