npct / pct-shiny

The Shiny map for Local Authorites
GNU Affero General Public License v3.0
24 stars 14 forks source link

Tfgm #102

Closed JDWoodcock closed 8 years ago

JDWoodcock commented 8 years ago

it crashes when I select route network

usr110 commented 8 years ago

Here's the exact error:

shiny::runApp('gm')

Listening on http://127.0.0.1:4813 OGR data source with driver: GeoJSON Source: "las-pcycle.geojson", layer: "OGRGeoJSON" with 326 features It has 9 fields Warning: Unhandled error in observer: No transformation possible to NA reference system observe({ leafletProxy("map") %>% clearGroup(., "straight_line") %>% clearGroup(., "quieter_route") %>% clearGroup(., "faster_route") %>% clearGroup(., "route_network") %>% removeShape(., "highlighted") leafletProxy("map") %>% { switch(input$line_type, straight = plotLines(., toPlot$l, input$nos_lines, straightPopup, "straight_line", getLineColour("straight_line")), route = { plotLines(., toPlot$rQuiet, input$nos_lines, routePopup, "quieter_route", getLineColour("quieter_route")) plotLines(., toPlot$rFast, input$nos_lines, routePopup, "faster_route", getLineColour("faster_route")) }, d_route = plotLines(., toPlot$rFast, input$nos_lines, routePopup, "faster_route", getLineColour("faster_route")), rnet = plotLines(., toPlot$rnet, input$nos_lines, [... truncated] ERROR: [on_request_read] connection reset by peer

@Robinlovelace Would you have a look at it? I believe it's to do with two parameters not being set properly 1) Is Projected: NA (should be False) 2) proj4string : [NA](should not be NA)

As a comparison, see the rnet summary of 'gm' and 'Avon' below:

summary(loadb("pct-data/gm")$rnet) Object of class SpatialLinesDataFrame Coordinates: min max x -2.712286 -2.028003 y 53.373314 53.649097 Is projected: NA proj4string : [NA] ...

summary(loadb("pct-data/Avon")$rnet) Object of class SpatialLinesDataFrame Coordinates: min max x -2.979112 -2.320981 y 51.281967 51.615238 Is projected: FALSE proj4string : [+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs]