Comments (7)
Can you provide a reproducible example when you get a chance @wangzhao0217? Good idea to start with the data that we have in the NPT project, e.g. with the following:
stplanr/vignettes/merging-route-networks.Rmd
Line 179 in 9661722
from stplanr.
Additional point/question: do we even need network simplification in these relatively remote places with low cycling potential? Thoughts @mem48 also welcome but my thinking is 'no'.
from stplanr.
Can you try with the latest version of stplanr
which you can install with remotes::install_dev("stplanr")
@wangzhao0217 .
Any questions let me know.
from stplanr.
Good morning @wangzhao0217 I've made some recent updates to the package that allow you to use geo_buffer()
on projected data. So you can now do the rnet_merge()
on projected data, e.g. EPSG:27700. I've done some tests here: https://github.com/ropensci/stplanr/blob/master/data-raw/test_geo_buffer.md
Does that fix the issue for you?
from stplanr.
I think this can be closed now that geo_buffer()
works with projected data. If there are any other issues, feel free to open @wangzhao0217, especially if you can illustrate them with reproducible example code like that shown in the link above.
from stplanr.
Hi Robin,
The testing is not very smooth, thus I reopened the issue:
I have created a markdown file (test geo_buffer with EPSG 27700.Rmd) and made the pr, please have a look.
if reading the sample data directly without doing st_transform, this will leave the CRS as EPSG 4326
Executing the code below will take an extremely long time to run :
rnet_x = sf::read_sf("data-raw/rnet_xp_clip.geojson") # dim(rnet_x) 17934 2 "EPSG",4326
rnet_y = sf::read_sf("data-raw/sampled_rnet_yp.geojson") # dim(rnet_y) 1396 27 "EPSG",4326
rnet_merged = rnet_merge(rnet_x, rnet_y, dist = 20, segment_length = 10, funs = funs, max_angle_diff = 20, crs = "EPSG:27700")
and encounter the error:
Error in igraph::as.undirected(g) :
At core/core/vector.pmt:443 : cannot reserve space for vector, Out of memory
In addition: Warning messages:
1: attribute variables are assumed to be spatially constant throughout all geometries
2: In st_cast.sf(sf::st_cast(x, "MULTILINESTRING"), "LINESTRING") :
repeating attributes for all sub-geometries for which they may not be constant
if conducting st_transform before rnet_merge, is the same takes an extremely long time to run:
rnet_x = st_transform(rnet_x, "EPSG:27700")
rnet_y = st_transform(rnet_y, "EPSG:27700")
brks = c(0, 100, 500, 1000, 5000,10000)
rnet_merged = rnet_merge(rnet_x, rnet_y, dist = 20, segment_length = 10, funs = funs, max_angle_diff = 20, crs = "EPSG:27700")
from stplanr.
I see the issue with rnet_merge()
being slow but I don't think this is a bug with geo_buffer()
. Will close this one and open another issue.
from stplanr.
Related Issues (20)
- Comparing the results between angle_diff with calculate_angle/get_vector HOT 1
- Error message in bind_sf
- CRAN issues
- bug in the rnet_merge function when defining the funs HOT 3
- Use different buffer options in `rnet_merge()`
- Convert large GeoJSON file to PMTiles HOT 1
- Possible speed enhancement to `mats2line()` HOT 3
- Invalid LineStrings in routes_fast_sf HOT 1
- Use `od::odc_to_sfc()` do the legwork in `mats2line()` HOT 3
- Bug in `line_segment()` when using certain values on projected data with `rsgeo` implementation HOT 8
- `rnet_merge()` fails when inputs are projected HOT 4
- `line_bearing()` is slow HOT 3
- Argument of segment_length in line_segment fun causes issue HOT 14
- Tried creating a route from desirelines using osrm function HOT 9
- rnet merge function can't not handle attributes containing strings HOT 1
- Add links to more papers in DESCRIPTION
- Re-add n_segments argument to line_segment() HOT 1
- `line_segment()` fails when n_segments has multiple values HOT 1
- od2line() throws an error if only one origin-destination relation is selected HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stplanr.