Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | connection_routes_gdf = gpd.sjoin( | |
| routes_segments_gdf, routes_gdf, how='left', op='within').dissolve(by='id', aggfunc='sum') | |
| connection_routes_gdf.to_file( | |
| 'connection_routes.geojson', driver='GeoJSON') | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | routes_segments = routes_gdf.unary_union | |
| routes_segments_gdf = gpd.GeoDataFrame.from_features([{ | |
| "type": "Feature", | |
| "properties": {"id": count}, | |
| "geometry": mapping(geometry) | |
| } for id, geometry in enumerate(routes_segments)]) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | with open('connection_lines.geojson') as connection_lines_file: | |
| connection_lines = json.loads(connection_lines_file.read()) | |
| route_features = [] | |
| for line_feature in connection_lines['features']: | |
| origin = { | |
| 'type': 'Feature', | |
| 'geometry': { | |
| 'type': 'Point', | 
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | SELECT ST_AsMVT('test', 4096, 'geom', q) | |
| FROM ( | |
| SELECT | |
| ST_AsMVTGeom( | |
| geom, | |
| TileBBox(z, x, y, 3857), /* https://github.com/mapbox/postgis-vt-util/blob/master/src/TileBBox.sql */ | |
| 4096, | |
| 0, | |
| false | |
| ) geom | 
NewerOlder