c# - Drawing Many Objects to Screen -
i'm working on project in need summarize substantial amount of data in form of heat map. data kept in database long possible. @ point, need store summary in matrix (possibly?) before can draw blocks heat map screen. creating windows form application c#.
let's assume heat map going summarize log file online mapping program such google maps. assign color particular address or region based on number of times request made region/address. can summarize data @ differing levels of detail. is, each block on heat map can summarize data particular address (max detail, therefore billions/millions of blocks) or can summarize requests street, city, or country (minimum detail -- few blocks each represent country). imagine millions of requests made addresses. have considered summarizing database. problem need draw many blocks screen (up billions, less). let's assume data summarized in database table stores number of hits larger regions. can draw blocks window without constructing object each region or bringing in of information db table? that's primary concern, because if did construct matrix, around 10 gb demanding request.
i'm curious know how many blocks can draw screen , best approach may (i.e. direct3d, xna). above, can see range vary substantially , expect potential billions of squares need drawn. have vertical scroll bar scroll down see other blocks.
overall, i'm wondering how might accomplish c#? creating matrix demanding request require around 10 gigabytes. there way draw screen not require substantial amount of memory (i.e. creating object each block). if have results of sql query translated directly rendered blocks on screen, ideal (i.e. not constructing objects, etc etc). need squares , property color , might need maintain number each block.
note: pretty sure how draw heat map (how zooming, scrolling, etc should appear user). clarify, i'm more concerned how implement our idea. there library or method allows draw many objects without constructing billion objects , using gigabytes of data. each block group of pixels (20x20) same color. don't believe should necessitate constructing 1 billion objects.
thanks!
if graphic heat map, agree comments image that's @ least 780 laptop screens wide impractical. if have information in sql(?) database somewhere, can fancy query partitions results buckets of widths. database should able aggregate these records 1680 (pixels wide) buckets efficiently.
furthermore, if buckets of fixed width (yielding fixed width heat-map image) pre-generate bucket numbers "addresses" in database. indexed properly, grouping fast.
if need see 1:1 image, might consider rendering section of image you're scrolled to. reduce amount of memory necessary store current view. assuming don't need view 780 screens worth of data @ 100% (especially if couple "big picture view" strategy above) you'll save on processing too.
the aggregate function "big picture view" might max, sum, avg. if these functions aren't appropriate, please explain more particular features you'd looking in heat-map.
as far drawing itself, don't need "objects" each box, need draw pixels on graphics object.
Comments
Post a Comment