Giter Club home page Giter Club logo

grid_geojson's People

Contributors

doorleyr avatar relno avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

cityscope

grid_geojson's Issues

Add grid array maker to the class

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.

Cannot create map for fully interactive grid

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()

decoupling CityScoPy form grid_geojson

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.