Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mvexel/sqftenvy
https://github.com/mvexel/sqftenvy
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mvexel/sqftenvy
- Owner: mvexel
- Created: 2011-03-13T11:26:42.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-03-14T08:13:42.000Z (almost 14 years ago)
- Last Synced: 2024-10-21T23:08:18.337Z (2 months ago)
- Language: Python
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
sqftenvy
========this service caclulates the average square metrage of apartments within a radius around a point.
currently this works for the small area that we got BAG data for at Hack De Overheid #3. This dataset has a limited geographical [extent](http://www.openstreetmap.org/?minlon=4.877&minlat=52.36&maxlon=4.94&maxlat=52.387&box=yes).
Nudge me if you want the BAG extract shapefile used to fill the database (see below). You only need this if you want to play with the script and the data yourself.
You can try the service live [here](http://lima.schaaltreinen.nl/sqftenvy/4.892498,52.37306,50). This link gives you the average square metrage of apartments around Dam Sq.
db setup
--------create postgres database adressen and add postgis functions
createdb adressen
createlang plpgsql adressen
psql -d adressen -f postgis.sql
psql -d adressen -f spatial_ref_sys.sqlcreate the table in postgis:
ogr2ogr -overwrite -s_srs EPSG:28992 -t_srs EPSG:4326 -f PostgreSQL PG:dbname=adressen adressen.shpogr2ogr -overwrite -s_srs EPSG:28992 -t_srs EPSG:4326 -f PostgreSQL PG:dbname=adressen panden.shp
make sure you have web.py. Use sudo if you need to - I use Mac OSX and homebrew so python modules can be installed without superuser privileges.
pip install web.py
usage
-----host/sqftenvy/lon,lat,radius
* lon: longitude in EPSG:4326
* lat: latitude in EPSG:4326
* radius: radius in meters