GithubHelp home page GithubHelp logo

pyheat's People

Contributors

amccollum avatar gusajz avatar talos avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

pyheat's Issues

Rendering across tile borders

If I for example zoom to lvl 10 or deeper, pyheat seems to have Problems with rendering across tiles.

I uploaded a picture where you can easily see my problem. Its the Exampledata shipped with the download. I did no changes except the zoom and the lat/lon values. There are also no errors print in console..

<script src='http://img811.imageshack.us/shareable/?i=pyheaterror.png&p=tl' type='text/javascript'></script>[URL=http://img811.imageshack.us/i/pyheaterror.png/][IMG]http://img811.imageshack.us/img811/5034/pyheaterror.png[/IMG][/URL]

Can anyone reproduce it?

GLError in patched Version

The new Update provokes an GLError. I guess it's an PyOpenGL Version issue.

Stack Trace:
27/Sep/2010:11:28:07 HTTP INFO Serving HTTP on http://0.0.0.0:8080/
::1 - - [27/Sep/2010:11:28:11] "GET /map HTTP/1.1" 200 1577 "" "Mozilla/5.0 (Win
dows; U; Windows NT 6.0; de; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET C
LR 3.5.30729; .NET4.0C)"
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Programme\Python25\lib\threading.py", line 486, in *bootstrap_inner
self.run()
File "C:\Users\xxx\Desktop\pyheat\examples\heatlayer.py", line 25, in run
self.outputs.put(self.do_task(_args, _kwargs))
File "C:\Users\hengefeld\Desktop\pyheat\examples\heatlayer.py", line 43, in do_task
tile = pyheat.HeatTile(zoom, tx, ty)
File "C:\Program Files\python25\Lib\site-packages\pyheat\heattile.py", line 16, in __init

super(HeatTile, self).init(*self.get_px_bounds())
File "C:\Program Files\python25\Lib\site-packages\pyheat\heatmap.py", line 56, in init
self.prepare(abs(right - left), abs(top - bottom))
File "C:\Program Files\python25\Lib\site-packages\pyheat\heatmap.py", line 90, in prepare
glHint(GL_CLIP_VOLUME_CLIPPING_HINT_EXT, GL_FASTEST)
File "c:\programme\python25\lib\site-packages\PyOpenGL-3.0.1-py2.5-win32.egg\OpenGL\error.py", line 208, in glCheckError baseOperation = baseOperation,
GLError: GLError(
err = 1280,
description = 'Invalid Enumerant.',
baseOperation = glHint,
cArguments = (
GL_CLIP_VOLUME_CLIPPING_HINT_EXT,
GL_FASTEST,
)
)

So I'm using following Versions: PyOpenGL-3.0.1 with py2.5

As given in the docs:
http://pyopengl.sourceforge.net/documentation/manual/glHint.3G.html
there seems to be no allowed option like "GL_CLIP_VOLUME_CLIPPING_HINT_EXT"

Any Ideas what's missing?

Wrong sign in HeatTile.get_ll_bounds padding

The method substracts the padding from self.top and adds it in self.bottom, but it should be the other way. According to google maps documentation (https://developers.google.com/maps/documentation/javascript/maptypes#WorldCoordinates), Y coordinates go from north to south (ie: increasing going to north).

This causes, that padding actually make the box smaller, instead of larger, in the y axis. The result is a gap in top and bottom borders of every tile.

Actual code:
def get_ll_bounds(self, padding=0.0):
(n, w) = self.px2ll(self.left - padding, self.bottom + padding)
(s, e) = self.px2ll(self.right + padding, self.top - padding)
return (s, n, w, e)

Proposed fix (note the signs in px2ll second argument):
def get_ll_bounds(self, padding=0.0):
(n, w) = self.px2ll(self.left - padding, self.bottom - padding)
(s, e) = self.px2ll(self.right + padding, self.top + padding)
return (s, n, w, e)

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.