We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Swell charts
Page Index Toggle Pages: 1
Swell charts (Read 2070 times)
Swell charts
Mar 29th, 2010, 5:11am
 
Hi - yesterday i visited the decode exhibition in the V&A London and was totaly blown away by some of the exhibits.

Whilst reading the guide on the train home i was introduced to this software and i spent some time last night exploring because i think it might be the perfect tool for my latest project.

I am a carpenter by trade and have very little programming exp but Im very eager to learn. My idea is to recreate a more creative version of the thermal type swell charts that can be viewed here on  

magicseaweed.com the colourful charts that you see on the front page

These charts are created in Python with MATPLOT LIB and are fed by freely available GRIB data fom the NOAA.

I have created some software with the help of someone else that downloads the GRIB data then applys my own algorithims to reflect what local conditions are needed for good surfing conditions at any given lat/lon this then creates a CSV file that returns a value between 1 and 5 for the different variables such as wind, wave height, wave direction. eg. if the GRIB data shows a SW wind blowing at 40 mph for my local beach and i know that the best wind is usuall a NE then it will return a value of 0 if the GRIB reads a NE wind at 5mph it would return 5 etc, the software then totals up all of the variables and produces an overall of score between 0-50 for a chosen beach.

Is something like this possible to intergrate with Processing? it would be great to be able to show a location on a map that was for example returning a total value of over 40 which would indicate that good surfing conditions were happening at that location. FYI the GRIB data updates every 3 hours and the software will automatically download and write a CSV file to the server.

Im ploughing my way through the tutorials and finding it very rewarding, but it would be nice if someone could tell me if im barking up the wrong tree or could show me some pointers.

Thanks in advance
Al
Re: Swell charts
Reply #1 - Mar 29th, 2010, 5:33am
 
this is pretty easy to do if youve got some programming knowledge already.

what might help is this post about mapping points to a worldmap by lat/long http://processing.org/discourse/yabb2/num_1259917547.html

depening on how you want it to look like
getChild might be useful http://processing.org/learning/basics/getchild.html if youve got a map of different beaches and want to color them differently.

so what you now have to do now is, write a parser for your csv file and use this data to color, scale points/beaches on your map...

if you have any problems or more questions how to do something in particular, feel free do ask
Re: Swell charts
Reply #2 - Mar 29th, 2010, 11:51am
 
Thanks Cedrick for the advice im trying to replace the world map with wikimedia United_Kingdom_location_map.svg, I changed the png file to the UK version and resized the window but i guess the co-ordinates are still based on the world projection. Ive been scouring the tutorials but seemed to have drawn a blank.

What am i missing?

Cheers
Al
Re: Swell charts
Reply #3 - Mar 29th, 2010, 2:57pm
 
good question how to change the worldmap to any other map. i guess antiplastik can help you here as he wrote the code for the worldmap.
Re: Swell charts
Reply #4 - Mar 30th, 2010, 4:37am
 
Cedric wrote on Mar 29th, 2010, 2:57pm:
good question how to change the worldmap to any other map. i guess antiplastik can help you here as he wrote the code for the worldmap.


Would anyone be interested in a little freelance tutoring to explain to me how to intergrate data from a csv file into processing, ive got quite a few ideas how to visualise the data with processing but im lacking some core skills.

The data can be viewed here rollingsixes.co.uk/testingsixsurf/SixSurf007.htm i only need to display the data in the last column which is a overall score for the quality of surfing conditions for a given lat/lon

I will be ordering the book at the weekend, but if anyone is interested in helping me please let me know.

Many Thanks
Re: Swell charts
Reply #5 - Mar 30th, 2010, 2:27pm
 
If you want to plot points on your map, then it's easy, but you will have to deal with projection issues.

There are many different projections (equirectangular, mercator, etc.), which means there are many different formulas to convert your (long, lat) coordinates into (x, y) point on screen.

So, first, you have to choose one, or find which one has been used for the image (or svg map) you want to use as a background.

Then, find the appropriate formula to convert (long, lat) into (x, y).

For example, for the equirectangular projection, the formula is :
Code:
x = (180 + longitude)/360;
y = (90 + latitude)/180;


I've uploaded an example here using some old code :
http://www.openprocessing.org/visuals/?visualID=8601
Re: Swell charts
Reply #6 - Apr 5th, 2010, 4:01pm
 
Hi, Ive started to animate some images that represent wave heights in the North Atlantic - im hoping to learn processing to add some more interaction to the images in the future but now im very new to this and im experiencing some problems.

rollingsixes.co.uk/testingsixsurf/applet/index.html

The animation consists of 60 521x611 PNG images when i include all of the images in the script and press play it works fine. When i export the file and test the index.htm it seems to stop functioning when i include over 24 images. Is there something i need to change in the code?

Also the 'box' seems to cut off the bottom right of the images i have set up the size to match the PNG size so im a little confused why it doesnt display correct this also displays correct when i press the play button locally.

If anyone has any cool ideas what processing could do with these images please let us know.

Many Thanks
Al
Re: Swell charts
Reply #7 - Apr 6th, 2010, 5:17am
 
Since you made a new topic (Animation problem), I will answer there.
Page Index Toggle Pages: 1