[ka-Map-users] how to use mssql database

Samuel Hiatt samhiatt at gmail.com
Tue Jun 26 22:57:18 EDT 2007


Welcome to ka-map!  I am a bit new myself, but I've had quite a bit of
success presenting my data with it so far.

I am building a similar interface that allows me to click on a pixel in a
raster and display information based on the value of the selected pixel.  A
couple tips on how I've done it (which is not to say that is the best, or
only way)...

1.  ka-map is just used as the interface to the data... after a pixel is
clicked a server-side python script will generate a plot (mine's a
timeseries, too) that is displayed afterwards in the ka-map interface.

2. I altered map_query_float.php to display my custom data returned from the
query.  There was actually some code commented out already in that file
which, after uncommented, displayed a table of the variables returned from
the query.  Look for the following code so you can see where to add your

                        echo "<tr>";
                        foreach ($aKeys as $key) {
                            echo "<th>$key</th>";
                        echo "<tr>";

then later...

                        foreach ($aValues as $value) {
                            if ($value)
                                echo "<td>$value</td>";
                                echo "<td>&nbsp;</td>";
                        echo "</tr>";

Take a look at that to see what it can do for you.  I added some code that
displayed an image based on the value of one of those variables.

3.  I've found a python library that makes it incredibly easy to create
graphs on-demand.  Take a look at the python matplotlib library.  It should
be extremely easy to use especially if you are familiar with matlab.  There
might be a similar php library out there that does the same thing, but I
found python to be helpful since it is already processing my data and has an
interface to my MySQL database from which it grabs the data to be plotted.

I hope I made some sense.  Let me know if I can be of any more help.


On 6/26/07, stin wang <stin.wang at gmail.com> wrote:
> Hello, lister
> I'm fresh to ka-map. I want to do something described as blow; anyone can
> give me some idea about how to do is welcome.
> I'm do some researches in greenhouse, which means i put some sensors in
> the greenhouse, used to monitor some environment parameter ,such as
> temperature , humidity, carbon dioxide concentration and radiation. There
> are several green houses, so I want to build a webgis so I can check data
> visually. The data gathered in greenhouse is send to mssql2000 database
> server. So my question is how to show the data in sql2000 in a ka-map
> interface.
> I have already built a test ka-map, and add a new map to hold my
> greenhouse point data. Is there  any idea that can allow me to just click
> one point then popup a gage and show a curve describe the variation in a
> fixed time series. And future more, maybe I can do some interpolations using
> kriging method?? I don't know, maybe you get give me some cues.
> --
> ----------------------------------------------
> Tie Wang
> TianJin Climate Center
> TianJin Meterological Bureau
> Tianjin, 300074, China
> Email: stin.wang at gmail.com
> ----------------------------------------------
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20070626/cf303833/attachment.html

More information about the ka-Map-users mailing list