doorleyr / grid_geojson Goto Github PK
View Code? Open in Web Editor NEWA project for creating geojson grids for the CityScope platform
A project for creating geojson grids for the CityScope platform
For non-scanned instances (such as detroit) it will be helpful to have a function that generates a grid array and commits it to cityIO grid
field.
how do grid_geojson calculates projection now?
When running a full grid creation (below), get:
ine 48, in <module>
meta_map = json.dumps(grasbrook_grid.int_to_meta_map)
AttributeError: 'Grid' object has no attribute 'int_to_meta_map'
import json
import os
import sys
import requests
file_dir = os.path.dirname('grid_geojson')
sys.path.append(file_dir)
from module.grid_geojson import * # nopep8
top_left_lon = 10.01129157249875
top_left_lat = 53.53380541749196
nrows = 78
ncols = 44
rotation = 145.5
cell_size = 16
crs_epsg = '31468'
properties = {
'id': [i for i in range(nrows*ncols)],
'usage': [0 for i in range(nrows*ncols)],
'height': [-100 for i in range(nrows*ncols)],
'pop_density': [2 for i in range(nrows*ncols)]}
crs_epsg = '31468'
grasbrook_grid = Grid(top_left_lon, top_left_lat, rotation,
crs_epsg, cell_size, nrows, ncols)
meta_map = json.dumps(grasbrook_grid.int_to_meta_map)
grid_geo = grasbrook_grid.get_grid_geojson(properties)
# Convert to string format
grid_geo_str = json.dumps(grid_geo)
f = open("results.json", "w+")
f.write(grid_geo_str)
f.close()
f = open("map.json", "w+")
f.write(meta_map)
f.close()
it seems that the scanner tool cannot properly trail the grid making process at this point, most notably due to the need to create an extra geojson for mapping. As well, there are growing cases where scanning is not even needed.
-- I suggest that in order to avoid 'bad' grids created via the scanner, this will be decoupled and a simple Google Colab notebook will be created and linked in the cityscope docs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.