Git Product home page Git Product logo

bend_buildings's Introduction

Bend Building Import Project

This repo acts as a workspace for doing a bulk import of the 2004 building footprints from the City of Bend. Inspired in part by the excellent job done by the Los Angeles maptime folks.

UPDATE: There's a demo map that shows our dataset now available: http://maptimebend.github.io/bend_buildings/demo/ (Warning: Large geojson file, give it a sec.)

Purpose

Currently only a handful of buildings are available in OpenStreetMap for Bend. While the city's dataset is 12 years old as of 2016, there are still 36,213 features in the dataset, most of which are probably still there. Although thousands of buildings will be missing, this will be a great start!

Steps

[x] Acquire city data

[x] Create import wiki page

  • The wiki page also needs to be maintained throughout the project

[x] Determine attributes to be imported (discuss in this issue)

[x] Acquire any additional data needed

[x] Process data

[ ] Get "buy in" from OSM community

[ ] Prepare import: OSM wiki page on imports

[ ] Decide on how to divide import tasks

[ ] Execute import

Building our dataset from scratch

Required packages:

This tutorial recommends using a python virtual environment to keep everything tidy. The easiest way to do that is to install anaconda or miniconda. These scripts were created using miniconda on MacOS. Commands could vary slightly for other systems, see the documentation.

Once either of those is installed, you should have access to the conda command line tool.

To create a new environment:

conda create --name python35 python=3

Now activate this environment:

source activate python35

Now install dependencies. This tutorial uses Homebrew and Conda to fetch everything. See individual package docs for other operating systems.

conda install gdal
brew install liblas --with-laszip
brew install postgres
brew install postgis
brew install points2grid
conda install rasterio
conda install rasterstats

Then clone this repo and cd into the main directory.

Build database of buildings with addresses

This assumes that you have Postgres installed with a user named "postgres" and listening on the default port. See the script itself for annotated source.

sh process_addresses.sh

This should create a new database named buildings and add a table named buildings. Source data are our building footprint file and the latest taxlot and address information available from data.deschutes.gov.

Create height grid from lidar data

This script will download the raw lidar files for Bend from NOAA and process them into a GeoTIFF with one band representing feature height above ground. See the script itself for annotated source. WARNING: This will probably take hours and result in a 10GB+ geotiff dataset. Feel free to tweak the resolution settings to speed up the process and reduce file sizes. The original script created a 25cm grid, but that is in all likelihood more resolution than is necessary.

sh process_grid.sh

Extract building heights from height grid

This will use our building footprints table in postgres to extract the median value of the grid within each building polygon. It will append that info to the buildings table.

sh process_building_heights.sh

In addition, this script will export a GeoJSON file to the demo folder. To view a demo of the data, cd to demo and start a web server.

Additional resources

Path to DOGAMI LiDAR: ftp://coast.noaa.gov/pub/DigitalCoast/lidar1_z/geoid12a/data/1452/ or https://coast.noaa.gov/htdata/lidar1_z/geoid12a/data/1452/

bend_buildings's People

Contributors

ajzeigert avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

n-skinner

bend_buildings's Issues

What fields should we import?

Current fields in building_footprints2004_intlfeet.shp and whether we should import them.

Field name Description Import? Corresponding OSM tag
FID_ Internal ID number No None
ENTITY Geometry type description No None
HANDLE Not sure, all values NULL No None
LAYER Seems to describe whether it's a mobile home, secondary structure, etc. Would need a proper key Yes, if we can translate to useful OSM tags TBA
COLOR Not sure No None
LINETYPE Another geometry description, all values CONTINUOUS No None
ELEVATION Probably ground elevation? Maybe, see below ele
THICKNESS Not sure No None
TEXT All values NULL No None

I'd also like to propose these additional fields, if we can acquire the corresponding data:

Field name Description Source Corresponding OSM tag
height Height of structure Derive from DOGAMI lidar height wiki
House_Number Address of building Derive from Deschutes County data addr:housenumber wiki
Street_Name + Street_Type Address of building Derive from Deschutes County data addr:street wiki

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.