Thank You so very much for your responses, Mr. Akmanchi and Mr. Lacroix.<br>i really appreciate it.<br>i will try to implement both ways for my application.<br><br>Thank You again<br>-donny-<br><br><br><b><i>Julien-Samuel Lacroix <jlacroix@mapgears.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Hi,<br><br>You can also use the OGR virtual data sources. You can connect directly <br>to a text file, a MySQL file or a ODBC connection.<br><br>How to set it up:<br>http://www.gdal.org/ogr/drv_vrt.html<br><br>How to integrate it in MapServer:<br>http://mapserver.gis.umn.edu/docs/reference/vector_data/VirtualSpatialData<br><br>Julien<br><br>Anand Akmanchi wrote:<br>> Hi Donny,<br>> <br>> You can certainly put your points data in a single table in mysql<br>> <br>> Step 1: you have to add a column of int auto_increment type and name it GID<br>> Step 2: Add a column of type
geometry<br>> Step 3: lets say that you have two columns containing latitude and <br>> longitude in degree decimals. you have to populate the geometry column <br>> by concatenating the lat and long values and generate a point using the <br>> pointfromtext function in mysql.<br>> <br>> heres how you do it:<br>> ALTER TABLE mypointstable ADD GID int(11) PRIMARY KEY AUTO_INCREMENT NOT <br>> NULL;<br>> ALTER TABLE mypointstable ADD GEOMETRY GEOMETRY NOT NULL;<br>> UPDATE mypointstable SET GEOMETRY = <br>> PointFromText(CONCAT('POINT(',mypointstable .longitude,' ',mypointstable <br>> .latitude,')4326')); <br>> /*========4326 is the EPSG code for WGS84 datum*/<br>> /*========Add a spatial index to geometry field */<br>> ALTER TABLE mypointstable ADD SPATIAL INDEX ( 'GEOMETRY' ) ;<br>> <br>> Step 4: Use the mypointstable and define it accordingly in map file to <br>> view it in ms4w.<br>> also take a look at the url
below<br>> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MySQL<br>> <br>> Hope this helps<br>> -- <br>> Dr. Anand Akmanchi<br>> Lecturer in Geoinformatics<br>> Department of Geography<br>> University of Pune<br>> ========================================<br>> "Man's mind, once stretched by a new idea, never regains its original <br>> dimensions." - Oliver Wendell Holmes<br>> ========================================<br>> <br>> <br>> <br>> On Tue, Jun 3, 2008 at 12:58 AM, donny wicaks <donnywicaks@yahoo.com><br>> <mailto:donnywicaks@yahoo.com>> wrote:<br>> <br>> hello, my name is donny wicaksono, from indonesia<br>> <br>> i'm developing a web-gis, i use windows as operating system, i use<br>> ms4w 2.2.6 with apache 2.2.4, php 5.2.4 and chameleon 2.4.<br>> for database, i use mysql 2.6.0<br>> <br>> i have difficulties, and i really hope that i can get any help from<br>> any
of you in this mailing list.<br>> <br>> this is what i have already done:<br>> 1. when you extract chameleon to your ms4w, so you have the samples<br>> of applications of chameleon.<br>> including the data (shapefiles, images), chameleon.map file, *.html<br>> for templates *.phtml, and chameleon.php.<br>> <br>> 2. i have data : a shapefile of a region (for the base map), and<br>> tabular data of points with coordinates in degree-minutes-seconds<br>> and other relevant data.<br>> <br>> 3. first, i convert the coordinates of the points into<br>> decimal-degree/longitude-lattitude manually by using ms-excel.<br>> <br>> 4. then by using arcview, i convert the points that are already in<br>> decimal-degree/longitude-latitude, into shapefile (shp)<br>> <br>> 5. then i modify the already existed chameleon.map. i eliminate all<br>> unnecessary layers and i add my own
layers : my_base_map.shp, and<br>> several points.shp<br>> then i save chameleon.map as another name.<br>> <br>> 6. then i modify the already existed, for example:<br>> sample_enhanced.html and sanmple_enhanced.phtml and save them as<br>> other name.<br>> <br>> 7. for php file i use the already existed chameleon.php<br>> and i also have made the httpd_*.conf for it<br>> <br>> 8. and the web-gis is working fine! all the layers can be displayed<br>> on and off, all the navigation tools are working fine: zoom in, out,<br>> recenter, pan and so is the query/identify button.<br>> <br>> <br>> <br>> my difficulties are:<br>> 1. you can read my description above that i convert points data with<br>> coordinates into a shapefile and then put it in *.map file.<br>> then i realize that if i want to add some more points, then i will<br>> keep repeating the same
procedures.<br>> i mean, i will have to make a new shapefile for every points that<br>> are added and then add the new shapefile (points.shp) to the *.map<br>> and the points are not supposed to become one layer, but a group of<br>> points become one layer, another group of layer become one layer,<br>> and so on. so i have five layers of points.<br>> <br>> 2. then it is related to the query process. when i convert the<br>> points in, let's say "points.shp", the database of the shapefile<br>> will be stored in "points.dbf".<br>> when i hit the query button / identify feature button in chameleon,<br>> the query result will display every data in "points.dbf".<br>> the data in "points.dbf" are only coordinates data and points_id<br>> while i have already develop the data in mysql in appropriate<br>> database management systems<br>> <br>> <br>> <br>> my questions
are:<br>> 1. is there any way to make layers, that can be displayed on the<br>> web-gis (the map), from the points by using their coordinates data<br>> in decimal-degrees/longitude-latitude that are stored in mysql?<br>> so i don't have to convert it first into shapefile (*.shp)<br>> <br>> if that can be done, what kind of modification i should do?<br>> if you know the coding for that, please write it also.<br>> <br>> what kind of code should i write in *.map file, *.php file, *.html<br>> file and *.phtml file in order to make the application works?<br>> <br>> 2. what code should i write to link the map with mysql database?<br>> where should i write that code? in *.map file, *.php file, *.html<br>> file and *.phtml file or in other file? maybe in querywidget.php? if<br>> so, what is the code?<br>> <br>> if this can be done, i'm sure that the query will become
more<br>> dynamic. you will help me a lot!!<br>> <br>> i think it's all my question. i'm sorry if my post is too long, it's<br>> just because i want to explain competely about what i've done and<br>> what are my obstacles.<br>> <br>> i will appreciate any help and response from any of you<br>> i thank you before..<br>> <br>> regards,<br>> donny<br>> <br>> <br>> _______________________________________________<br>> Chameleon mailing list<br>> Chameleon@lists.maptools.org <mailto:Chameleon@lists.maptools.org><br>> http://lists.maptools.org/mailman/listinfo/chameleon<br>> <br>> <br>> <br>> <br>> -- <br>> Dr. Anand Akmanchi<br>> Lecturer in Geoinformatics<br>> Department of Geography<br>> University of Pune<br>> ========================================<br>> "Man's mind, once stretched by a new idea, never regains its original <br>> dimensions."
- Oliver Wendell Holmes<br>> ========================================<br>> <br>> <br>> ------------------------------------------------------------------------<br>> <br>> _______________________________________________<br>> Chameleon mailing list<br>> Chameleon@lists.maptools.org<br>> http://lists.maptools.org/mailman/listinfo/chameleon<br><br>-- <br>Julien-Samuel Lacroix<br>Mapgears<br>http://www.mapgears.com/<br></mailto:Chameleon@lists.maptools.org></mailto:donnywicaks@yahoo.com></donnywicaks@yahoo.com></blockquote><br><p>