Giter Site home page Giter Site logo

otm-tiler's Introduction

OpenTreeMap Logo

#Deprecated Repository

This repository contains the code for OTM1, the old version of the OpenTreeMap software (also known as OTM v1.0 through v1.3). Development is largely suspended on OTM1. "OTM2", available in another repository, is the newest, next-generation version of the OpenTreeMap software. If you're just getting started, we highly recommend starting with the OTM2 code - it has been re-engineered from the ground up and the target for all current and future development.

This OTM1 repository exists primarily for archival purposes.

#Updates? Issues? Questions?# For updates join the announcement email list here: http://groups.google.com/group/opentreemap-user For issues or questions you can try mailing the user list: http://groups.google.com/group/opentreemap-user or connect with us via IRC at #opentreemap on freenode (freenode.net).

This is v1.3 of OpenTreeMap, the in development version.

#Other Repositories OpenTreeMap is also available for iOS and Android.

iOS app code is available at https://github.com/azavea/OpenTreeMap-iOS
Default graphics and config files for the OpenTreeMap iOS app are available at https://github.com/azavea/OpenTreeMap-iOS-skin

Android app code is available at https://github.com/azavea/OpenTreeMap-Android
A default skin is included in the repository, as are "howto.pdf" build instructions.

#Installation Instructions# ###Required programs:###

  • Webserver - Gunicorn is recommended
  • Database - Postgres 8.1 + postgis 1.5 is recommended (postgis 2.0+ is not yet supported)
  • Map tile renderer - GeoServer(java) on tomcat is recommended
  • SMTP service - sendmail is recommended
  • tile caching service - tilecache is recommended (port 8080 through apache)
  • Python 2.7

###Required python libraries (installed via pip)###

  • BeautifulSoup (3.2.0)
  • Django (1.3.4)
  • PIL (1.1.7)
  • South (0.7.5)
  • Unidecode (0.04.9)
  • django-badges (0.1.6)
  • django-debug-toolbar (0.9.1)
  • django-extensions (0.7.1)
  • django-pagination (1.0.7)
  • django-profiles (0.2)
  • django-shapes (0.2.0)
  • django-sorting (0.1)
  • django-tagging (0.3.1)
  • django-threadedcomments
  • django-pipeline (1.1.27)
  • feedparser (5.1)
  • geopy (0.94.1)
  • psycopg2 (2.4.1)
  • python-omgeo (1.4.1)
  • simplejson (2.3.2)
  • sorl-thumbnail (11.12)
  • template-utils (0.4p2)
  • wsgiref (0.1.2)
  • xlrd (0.7.1)
  • yuicompressor (2.4.6.1)

###Optional libraries###

  • gunicorn (0.14.3) (via pip)
  • libapache2-mod-wsgi (if you want to run with apache) (via apt)

###Required libraries from aptitude###

  • binutils
  • libgeos-3.2.0
  • libgeos-c1
  • libgdal1-1.6.0
  • libproj0
  • gdal-bin

###Required libraries from the web###

###Patches:### Fix to proj to deal with spherical mercator wget http://download.osgeo.org/proj/proj-datumgrid-1.4.tar.gz tar -xzf /proj-datumgrid-1.4.tar.gz cd proj-datumgrid-1.4 nad2bin null < null.lla sudo cp null /usr/share/proj Get django-sorting and fix bug git clone git://github.com/directeur/django-sorting.git Apply patch to django-sorting: https://github.com/directeur/django-sorting/issues#issue/8 -including comment by Alsaihn sudo cp django_sorting -R /usr/local/lib/python2.6/dist-packages/django_sorting Get django-shapes and remove HttpResponse call wget https://bitbucket.org/springmeyer/django-shapes/get/tip.tar.gz In shapes/views/export.py - zip-response method - change > # Stick it all in a django HttpResponse #response = HttpResponse(zip_stream, mimetype=mimetype) #response['Content-Disposition'] = 'attachment; filename=%s.zip' % file_name.replace('.shp','') #response['Content-length'] = str(len(zip_stream)) #response['Content-Type'] = mimetype #response.write(zip_stream) return zip_stream

Get django-reputation and fix default config and user bug
    svn checkout http://django-reputation.googlecode.com/svn/trunk/ django-reputation
            cd django-reputation
            sudo cp django_reputation -R /usr/local/lib/python2.6/dist-packages/django_reputation
            Change default config and user bug: (b/c it doesn't seem to accept values in settings.py)
                    cd /usr/local/lib/python2.6/dist-packages/django_reputation
                    In config.py - <change values as needed>
        In model.py - change >
            ....
            relevant_reputation_actions = UserReputationAction.objects.filter(user=user).filter........
            ....
            if expected_delta <= MAX_REPUTATION_GAIN_PER_DAY and expected_delta >= -1 * MAX_REPUTATION_LOSS_PER_DAY:
                delta = action_value
            elif expected_delta > MAX_REPUTATION_GAIN_PER_DAY:
                delta = 0
            elif expected_delta < MAX_REPUTATION_LOSS_PER_DAY:
                delta = 0
            ...
Fix Tilecache TMS issue
            In tilecache/Services/TMS.py - change >
                    ...
                    elif len(parts) < 2:
                            return self.serviceCapabilities(host, self.service.layers)
                    else:
                + parts = parts[-5:]
                            layer = self.getLayer(parts[1])
                            if len(parts) < 3:
                            return self.layerCapabilities(host, layer)
                    ...

###USDA Grant### Portions of OpenTreeMap are based upon work supported by the National Institute of Food and Agriculture, U.S. Department of Agriculture, under Agreement No. 2010-33610-20937, 2011-33610-30511, 2011-33610-30862 and 2012-33610-19997 of the Small Business Innovation Research Grants Program. Any opinions, findings, and conclusions, or recommendations expressed on the OpenTreeMap website are those of Azavea and do not necessarily reflect the view of the U.S. Department of Agriculture.

otm-tiler's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

otm-tiler's Issues

Support custom instance CartoCSS for boundaries and map features

I asked JEST if it was possible to have per-request styling in Windshaft and Andrew Fink responded:

"in the req2params function, make req.params.style a complete cartocss string"

Implementing this will require coordinating changes with with the core application. The tiler-local tasks are:

  • Update the map feature SQL to return a new has_tree column for the CartoCSS to grab on to
  • Fetch custom instance CartoCSS from the database
  • Include the custom CartoCSS in req.params.style

Support searching on fields of models other than Tree

Searching on any field of a map feature subclass (e.g. plot.length, rainBarrel.capacity) gives an error like The model name must be one of the following: mapFeature, polygonalMapFeature, tree, species, mapFeaturePhoto, udf. Not plot.

We need to handle both built-in fields and custom fields.

For custom fields we can't just search on mapFeature. If I create a "color" custom field for both bioswales and rain gardens, searching on mapFeature.color would find both bioswales and rain gardens.

Investigate error for species.id searches

Error reported from Android Rollbar exceptions:
For the search parameters : show=["Plot"] instance_id=417 q=["AND",{"species.id":{"ISNULL":true}}]]

The following error was reported: {"error":"The model name must be one of the following: mapFeature, polygonalMapFeature, tree, plot, rainBarrel, rainGarden, bioswale, species, mapFeaturePhoto, udf. Not 0"}

Update the project to be compatible with a newer long term support version of node

We are on 0.10.x Support for 0.10 ends in October 2016, and support for 0.12.x ends in December 2016, so we should upgrade to at least 4.x and possibly 6.x.

Experimentation has shown that updating to a compatible version of Windshaft will bring some breaking API changes.

LTS Schedule https://github.com/nodejs/LTS

Schedule as of September 27, 2016

LTS Status Release LTS Start Maintenance Start LTS End
Maintenance v0.10 - 2015-10-01 2016-10-01
Maintenance v0.12 - 2016-04-01 2016-12-31
Active v4 2015-10-01 2017-04-01 2018-04-01
N/A v5 N/A
Pending v6 2016-10-01 2018-04-01 2019-04-01

schedule

Error parsing multi-select search with interior single quotes

Looks like the DB choked when given the string '\"8'' x 10'\"'. We're probably not properly escaping interior quotes,

{"error":"ERROR:  unterminated quoted identifier at or near \"\"%'))) ) otmfiltersql LIMIT 0\"\nLINE 1: ...s\"::hstore->'Install tree pit') ILIKE '%\"8'' x 10'\"%'))) ) o...

Full sql was: 'SELECT * FROM ( SELECT DISTINCT(the_geom_webmercator) AS the_geom_webmercator, feature_type FROM treemap_mapfeature LEFT OUTER JOIN stormwater_polygonalmapfeature ON stormwater_polygonalmapfeature.mapfeature_ptr_id = treemap_mapfeature.id JOIN treemap_plot ON treemap_mapfeature.id = treemap_plot.mapfeature_ptr_id WHERE ( treemap_mapfeature.instance_id = 337 ) AND ( \"treemap_mapfeature\".\"feature_type\" IN ( 'Plot' ) ) AND ((\"stormwater_polygonalmapfeature\".\"polygon\" IS NULL) AND (((\"treemap_mapfeature\".\"udfs\"::hstore->'Install tree pit') ILIKE '%\"8'' x 10'\"%'))) ) otmfiltersql LIMIT 0'\n  encountered during parsing of layer 'treemap_mapfeature' in Layer at line 88"}

Bioswale tile layer not accurate to search filter

To reproduce on staging:

  1. Go to an instance with trees and bioswales
  2. Click Advanced Search
  3. Uncheck everything except 'show trees' & 'show bioswales' and search
  4. Observe that bioswales are dimmed
  5. Uncheck 'show trees' and search again
  6. Bioswales are now (correctly) not dimmed

Here's a bioswale, dimmed, with the filters:
screenshot from 2015-07-17 19 24 19

It looks like the counts are ok, so this may just be a tile layer issue.

copied from OpenTreeMap/otm-core#2160

Cannot find module node-v11-linux-x64/srs.node

Hi,

We're installing on Ubuntu 12.04 and for some reason the srs module is being built as binding/node-v14-darwin-x64/srs.node rather than node-v11-linux-x64/srs.node. Any idea how we're getting a darwin module for node v14 when we're using node v11 on linux?

I've tried reinstalling and it didn't fix it.

Thanks,
Collin

Error: Cannot find module '/usr/local/tiler/node_modules/windshaft/node_modules/grainstore/node_modules/millstone/node_modules/srs/lib/binding/node-v11-linux-x64/srs.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/tiler/node_modules/windshaft/node_modules/grainstore/node_modules/millstone/node_modules/srs/lib/srs.js:18:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

Points appear on map for new instance

I created a new instance in Philadelphia in a dev environment with lots of Philadelphia data, and some, but not all, points were visible on the map. It was not possible to click them though. They disappear at high zoom levels.

My best guess is that this is a tiler issue.

Experiment with showing boundary layer at lower zoom levels

The boundary style starts showing the boundary lines at zoom level 16. In practice, this is proving to be a little too close. Once you are at that zoom level, may regions do not fit onscreen.

This was set fairly high to prevent the lines from aggressively pulling focus from the trees. We should try 13, or maybe 12 and ensure that Philly, Edmonton, and LA all look good.

Unable to build tiler

Hi, I have problem with building and running tiler on any environment and any version of node/npm. Usual error is:

otm_kdp@kdp:~/tiler$ node server.js
module.js:341
throw err;
^

Error: Cannot find module '/home/otm_kdp/tiler/node_modules/windshaft/node_modules/grainstore/node_modules/millstone/node_modules/srs/lib/binding/node-v47-linux-x64/srs_settings.js'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object. (/home/otm_kdp/tiler/node_modules/windshaft/node_modules/grainstore/node_modules/millstone/node_modules/srs/lib/srs.js:6:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)

I have tried to fight with those outdated dependencies for hours, but I nearly gave up. Numerous things from dependencies don't compile: sqlite3, hiredis, srs and other. Is there any way to run tiler?

My architecture is Ubuntu 14.04.1 LTS x86_64, but really, this doesn't work either on Fedora and Debian.

Thanks

Add a new boundary layer endpoint that renders boundary polygons as choropleth

  • Colored based on the canopy_percent column value
  • Shows a the canopy percent as a text label. (consider TreesCount). Set a minimum zoom for the label in the CartoCSS so that labels are never bigger than the areas.
  • Parameters:
    • Boundary category
    • Min threshold (boundaries with percentages less this value are not shown)
    • Max threshold (boundaries with percentages greater than this value are not shown)

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.