Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with ms_simplify and sys = TRUE #87

Closed
maka1234 opened this issue Jun 27, 2019 · 4 comments
Closed

Issue with ms_simplify and sys = TRUE #87

maka1234 opened this issue Jun 27, 2019 · 4 comments

Comments

@maka1234
Copy link

maka1234 commented Jun 27, 2019

Hey!

I read through the documentation and tried to run ms_simplify using sys = TRUE
library(sf)
library(tmap)
library(rmapshaper)
fiss <- read_sf("/path/to/file")
fiss <- ms_simplify(fiss, keep = 0.02, sys = TRUE)

This returns the following error:
[i] Error: File not found (C:/Users/User)
Run mapshaper -h to view help
Cannot open data source C:\Users\User\AppData\Local\Temp\RtmpMD75li\file230064ff2da8.geojson
Error in CPL_read_ogr(dsn, layer, query, as.character(options), quiet, :
Open failed.

I've installed node.js:
check_sys_mapshaper()
mapshaper version 0.4.120 is installed and on your PATH

Any idea what I'm doing wrong? I'm having a really hard time opening large shapefiles without this.

@ateucher
Copy link
Owner

ateucher commented Jul 5, 2019

This is an odd one. Can you check to see if the file was successfully written to that location? (C:\Users\User\AppData\Local\Temp\RtmpMD75li\file230064ff2da8.geojson)

@ateucher
Copy link
Owner

ateucher commented Jul 5, 2019

I wonder if there's a space or a special character in your username (I'm guessing in this report you substituted "User" for your actual user name)?

@geospatial-dave
Copy link

geospatial-dave commented Oct 9, 2019

Hey mate, I've encountered a similar issue as maka above, following up on your questions:

  • File was not successfully written to location
  • My user is david, definitely no special characters there

If I can help in any other way let me know, I'm trying to simplify 150MB .shp file and need to use the sys=TRUE function as it just hangs forever otherwise. Mapshaper version is 0.4.136

Error below:

Error: [each] Command expects a single value. Received: 'rmapshaperid = this.id'
Run mapshaper -h to view help
Cannot open data source C:\Users\david\AppData\Local\Temp\RtmpOybJjr\file281467f33312.geojson
Error in CPL_read_ogr(dsn, layer, as.character(options), quiet, type,  : 
  Open failed.
In addition: Warning message:
running command 'mapshaper C:/Users/david/AppData/Local/Temp/RtmpOybJjr/file2814188f2e0f.geojson snap -simplify 0.111  weighting=0.7 keep-shapes -each 'rmapshaperid = this.id' -o C:\Users\david\AppData\Local\Temp\RtmpOybJjr\file281467f33312.geojson' had status 1 

@ateucher
Copy link
Owner

ateucher commented Oct 9, 2019

Closing (See #77), should be fixed in v0.4.1. Please reopen if this is still happening and you have the latest rmapshaper from CRAN (0.4.1)

@ateucher ateucher closed this as completed Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants