[GLLUG] Re: PHP GD Question

Thomas Alan Hearn hearntho@msu.edu
Fri, 16 May 2003 09:39:39 -0400


Lee,
  I have worked with GD and PHP as well as MySQL quite a bit, and I would 
agree that it would most likely be easier to have predefined colored maps 
for the counties of michigan.  Drawing shapes with GD around county borders 
could be quite a gruesome task, however it is possible.  One way to do this 
is to use a map with borders that are clearly white or black, and write a 
script with GD that recursively colors in between two points, checking if 
they have exceeded the white or black colors of the border.  Hope this 
helps. 

Cheers,
Tom Hearn 


Ex Fed writes: 

> Hello Everyone! 
> 
> We use models to predict the possiblity of a plant disease or pest 
> emergence.  This is based upon an algorithm that takes as input hourly 
> weather information to include humidity, temperature and precipitation.  
> It requires  seven days of data to calculate this probability. 
> 
> On a dynamic webpage, I want to display these percentages on the screen 
> with a color legend and have the appropriate county on the Michigan Map 
> colored corresponding to the statistical probability calculated.  I would 
> like the user to be able to select past weeks to see the probability, but 
> the default map displayed would show the probability of the past seven 
> days. 
> 
> Does anybody out there know if it would be feasible to use PHP and GD 
> somehow to color in individual counties on a State Map image.   The 
> coloration would be determined values that were stored in a Mysql database 
> or determined by an algorithm that worked upon the values in a Mysql 
> database.  Unfortunately, these are not simple rectangles, arcs, squares, 
> the counties are pretty complex shapes. 
> 
> Or would this be a lot of work that might be accomplished by use of a good 
> GIS/mapping package?  Does anybody out there have any experiences with GIS 
> with Linux / Mysql acting as a server/datasource, serving up dynamic maps 
> in users web browsers? 
> 
> Appreciate your input, 
> 
> Lee Duynslager 
> 
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
> http://join.msn.com/?page=features/featuredemail 
> 
> _______________________________________________
> linux-user mailing list
> linux-user@egr.msu.edu
> http://www.egr.msu.edu/mailman/listinfo/linux-user