Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Area bounding box issue #10

Open
asalzberg82 opened this issue Jan 19, 2013 · 1 comment
Open

Area bounding box issue #10

asalzberg82 opened this issue Jan 19, 2013 · 1 comment

Comments

@asalzberg82
Copy link

Hi,

great heatmap program and have it working nicely. I have a set of points scattered over DC and everything works great when I don't specify area=((minx,miny),(maxx,maxy)).

What I get when I do use the area = piece is that the y coord (latitute) is scrunched and I cant really seem to fix it. I have tried messing with the size parameter at the same time. Is the solution to convert all my input coordinates to a projected system first? The coordinates in my csv are all wgs 84 geo coordinates - so i thought to specify the min/max coordinates in the same way.

Sample output without area restriction (image1) and with (image2) attached, plus code.

any help appreciated. Again - great that you produced this and very helpful.
Code (with area restriction) below - same code used without area produces image1.

import heatmap # http://jjguy.com/heatmap/
import csv

hm = heatmap.Heatmap()
if __name__ == "__main__":
    pts = []
    for point in csv.reader(open("coordinates.csv")):
        pts.append((float(point[0]), float(point[1])))
    print "Processing %d points..." % len(pts)
    hm.heatmap(pts,dotsize=110,opacity=500,scheme='fire', area=((-77.11656,38.80644),(-76.909515,38.89307))).save("image2.png")

image1
image2

@jjguy
Copy link
Owner

jjguy commented Jan 22, 2013

Are you using 2.2.0 or the more-recently pushed 2.2.1? Y3pp3r found/fixed a bug in the area parameter that causes similar behavior:

920ea2c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants