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

mapView error when simple features contain ZM dimensions #99

Closed
kent37 opened this issue Sep 9, 2017 · 8 comments
Closed

mapView error when simple features contain ZM dimensions #99

kent37 opened this issue Sep 9, 2017 · 8 comments

Comments

@kent37
Copy link

kent37 commented Sep 9, 2017

For example:

library(sf)
library(mapview)

t = st_as_sfc("LINESTRING ZM (-71.433917 42.593903 4250 1498623425.8, -71.433355 42.594131 4250 1498623426.8)", crs=4326)
mapView(t)
## Error in if (length(nms) != n || any(nms == "")) stop("'options' must be a fully named list, or have no names (NULL)") : 
##  missing value where TRUE/FALSE needed
        
mapView(st_zm(t)) # works
@tim-salabim
Copy link
Member

Coincidentally, in response to #98 I pushed a fix for this today c41df1e
Hence, with devtools::install_github("r-spatial/mapview@develop") this should no longer fail.

@tim-salabim
Copy link
Member

sorry, just realised that the earlier fix was only for class sf. 7372c3c should fix this for class sfc as well

@kent37
Copy link
Author

kent37 commented Sep 9, 2017

Cool thank you!

@kent37
Copy link
Author

kent37 commented Sep 9, 2017

BTW if you need real-world XYZM data let me know; mine is airplane flight tracks.

@tim-salabim
Copy link
Member

Yes, at some stage we (whoever that may be) will want to progress towards 3d data representation straight from R. I'll keep this in mind thanks!

@mdsumner
Copy link
Member

@kent37 I'd like to try your data in my hypertidy/rangl repo for plotting with rgl, it's been latent for a while but ready for general use - still a bit buggy no doubt, I hadn't tried any xyz sf data yet

@kent37
Copy link
Author

kent37 commented Sep 11, 2017

@mdsumner OK give me a few days, I'll get you something.

@kent37
Copy link
Author

kent37 commented Sep 12, 2017

@mdsumner Attached is a zipped shapefile containing 144 flight tracks of aircraft departing runway 33L at Boston Logan airport on Jan 27, 2017. Data is from an ADS-B recorder so it is kind of rough. Each point includes lat, lon, altitude in feet and time in EST. Unzip and read with
st_read('tracks.shp')
tracks.zip

If you are making interactive 3D visualizations of such things I'm interested :-)

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