Skip to content

Area bounding box issue #10

@asalzberg82

Description

@asalzberg82

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions