[Chameleon] add points directly from coordinates data in decimal-degrees/longitude-latitude and querying

donny wicaks donnywicaks at yahoo.com
Tue Jun 3 03:58:48 EDT 2008

hello, my name is donny wicaksono, from indonesia

i'm developing a web-gis, i use windows as operating system, i use ms4w 2.2.6 with apache 2.2.4, php 5.2.4 and chameleon 2.4. 
for database, i use mysql 2.6.0

i have difficulties, and i really hope that i can get any help from any of you in this mailing list.

this is what i have already done:
1. when you extract chameleon to your ms4w, so you have the samples of applications of chameleon. 
including the data (shapefiles, images), chameleon.map file, *.html for templates *.phtml, and chameleon.php.

2. i have data : a shapefile of a region (for the base map), and tabular data of points with coordinates in degree-minutes-seconds and other relevant data.

3. first, i convert the coordinates of the points into decimal-degree/longitude-lattitude manually by using ms-excel.

4. then by using arcview, i convert the points that are already in decimal-degree/longitude-latitude, into shapefile (shp)

5. then i modify the already existed chameleon.map. i eliminate all unnecessary layers and i add my own layers : my_base_map.shp, and several points.shp
then i save chameleon.map as another name.

6. then i modify the already existed, for example: sample_enhanced.html and sanmple_enhanced.phtml and save them as other name.

7. for php file i use the already existed chameleon.php
and i also have made the httpd_*.conf for it

8. and the web-gis is working fine! all the layers can be displayed on and off, all the navigation tools are working fine: zoom in, out, recenter, pan and so is the query/identify button.

my difficulties are:
1. you can read my description above that i convert points data with coordinates into a shapefile and then put it in *.map file. 
then i realize that if i want to add some more points, then i will keep repeating the same procedures. 
i mean, i will have to make a new shapefile for every points that are added and then add the new shapefile (points.shp) to the *.map
and the points are not supposed to become one layer, but a group of points become one layer, another group of layer become one layer, and so on. so i have five layers of points.

2. then it is related to the query process. when i convert the points in, let's say "points.shp", the database of the shapefile will be stored in "points.dbf".
when i hit the query button / identify feature button in chameleon, the query result will display every data in "points.dbf".
the data in "points.dbf" are only coordinates data and points_id
while i have already develop the data in mysql in appropriate database management systems

my questions are:
1. is there any way to make layers, that can be displayed on the web-gis (the map), from the points by using their coordinates data in decimal-degrees/longitude-latitude  that are stored in mysql?
so i don't have to convert it first into shapefile (*.shp)

if that can be done, what kind of modification i should do? 
if you know the coding for that, please write it also.

what kind of code should i write in *.map file, *.php file, *.html file and *.phtml file in order to make the application works?

2. what code should i write to link the map with mysql database?
where should i write that code? in *.map file, *.php file, *.html file and *.phtml file or in other file? maybe in querywidget.php? if so, what is the code?

if this can be done, i'm sure that the query will become more dynamic. you will help me a lot!!

i think it's all my question. i'm sorry if my post is too long, it's just because i want to explain competely about what i've done and what are my obstacles.

i will appreciate any help and response from any of you
i thank you before..


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20080603/7b02b928/attachment.html

More information about the Chameleon mailing list