[mapserver-commits] r8227 - in trunk/docs: howto input/vector

svn at osgeo.org svn at osgeo.org
Tue Dec 9 20:37:07 EST 2008


Author: hobu
Date: 2008-12-09 20:37:07 -0500 (Tue, 09 Dec 2008)
New Revision: 8227

Added:
   trunk/docs/input/vector/mysql.txt
Removed:
   trunk/docs/howto/ogrmysql.txt
   trunk/docs/input/vector/mygis.txt
Log:
remove mygis docs, replace with OGR MySQL docs

Deleted: trunk/docs/howto/ogrmysql.txt
===================================================================
--- trunk/docs/howto/ogrmysql.txt	2008-12-10 01:34:57 UTC (rev 8226)
+++ trunk/docs/howto/ogrmysql.txt	2008-12-10 01:37:07 UTC (rev 8227)
@@ -1,106 +0,0 @@
-.. sectnum::
-
-Introduction
-============
-
-This method takes advantage of OGR's MySQL driver and avoids the need to set up an ODBC connection.  
-
-This is the primitive MySQL support for point data, not the recently added  `MySQL spatial support found in GDAL/OGR 1.3.2`_ .  
- 
-Support for this functionality is found in GDAL/OGR 1.2.6 and older on Windows and GDAL/OGR 1.3.2 on Linux.
-
-**Needed**
-
-- MySQL database containing a table with fields containing x and y coordinates
-- .ovf file, a small xml file you will create
-- MapServer compiled with OGR version supporting this functinality
-
-Create .ovf file
-===========================
-
-Here is the .ovf file named aqidata.ovf
-
-::
-
-   <OGRVRTDataSource>
-       <OGRVRTLayer name="aqidata">
-           <SrcDataSource>MYSQL:aqiTest,user=uuuuu,password=ppppp,host=192.170.1.100,port=3306,tables=testdata</SrcDataSource> 
-	   <SrcSQL>SELECT areaID, x, y, sampleValue FROM testdata</SrcSQL> 
-	   <GeometryType>wkbPoint</GeometryType>
-	   <GeometryField encoding="PointFromColumns" x="x" y="y"/> 
-       </OGRVRTLayer>
-   </OGRVRTDataSource>
-
-If you look at the connection string in <SrcDataSource>
-
-- The MySQL database name is 'aqiTest'
-- 'testdata' is the table containing the coordinate data
-- host and port are for MySQL server 
-
-Use the GeometryField element to tell OGR which fields store the x and y coordinate data.  Mine are simply named x and y.
-
-
-Test Connection with ogrinfo
-==============================
-
-:: 
-
-   # usr/local/bin/ogrinfo /maps/aqidata.ovf
-
-ogrinfo returns 
-
-::
-
-   ERROR 4: Update access not supported for VRT datasources.
-   Had to open data source read-only.
-   INFO: Open of `/maps/aqidata.ovf'
-   using driver `VRT' successful.
-   1: aqidata (Point)
-
-*Don't worry about the error, this is just telling you that it is a read-only driver.  
-If it really bugs you, call ogrinfo with the -ro (read only) flag.*
-
-To see the actual data
-
-::
-
-# usr/local/bin/ogrinfo /maps/aqidata.ovf -al  
-
-Create MapServer Layer
-=======================
-
-::
-
-   LAYER
-       NAME "MyAqi"
-       STATUS DEFAULT
-       TYPE POINT
-       CONNECTIONTYPE OGR  
-       CONNECTION "aqidata.ovf"
-       DATA "aqidata"
-       CLASS 
-          NAME "MyClass"
-	      STYLE
-	          SYMBOL 'circle'
-                  SIZE 15
-	          COLOR 0 255 0
-	      END
-       END
-   END  
-
-DATA in the LAYER definition should be the same as the name attribute of the OGRVRTLayer element in the ovf file. 
-
-*For this to draw, you need to have a SYMBOLSET defined in your mapfile and have a symbol called 'circle' in your symbols.sym file.*
-
-More Information
-=================
-
- `MapServer OGR HowTo`_ 
-
- `MapServer Vector Data Reference - Virtual Spatial Data`_ 
-
-.. #### rST Link Section ####
-
-.. _`MySQL spatial support found in GDAL/OGR 1.3.2`: http://www.gdal.org/ogr/drv_mysql.html 
-.. _`MapServer OGR HowTo`: http://mapserver.gis.umn.edu/docs/howto/ogr_howto
-.. _`MapServer Vector Data Reference - Virtual Spatial Data`: http://mapserver.gis.umn.edu/docs/reference/vector_data/VirtualSpatialData
\ No newline at end of file

Deleted: trunk/docs/input/vector/mygis.txt
===================================================================
--- trunk/docs/input/vector/mygis.txt	2008-12-10 01:34:57 UTC (rev 8226)
+++ trunk/docs/input/vector/mygis.txt	2008-12-10 01:37:07 UTC (rev 8227)
@@ -1,56 +0,0 @@
-.. _mygis:
-
-*****************************************************************************
- MyGIS
-*****************************************************************************
-
-MyGIS reference
----------------
-The MyGIS reference documentation can be found at:
-
-http://dev.mysql.com/doc/refman/4.1/en/spatial-extensions.html
-
-
-Adding a MyGIS layer
---------------------
-
-*Note: the following instructions have been extracted from the the mapmygis.c source and I have not tried them myself. I am adding them here only to fill a gap in the documentation; comments and suggestions are welcome.*
-
-Standard ways of specifiying a MyGIS connection are: 
-
-(1) 'geometry_column from geometry_table' 
-(2) 'geometry_column from (<sub query>) as foo using unique <column name>; using SRID=<srid#>'
-                                                                                                                                                  
-NOTE: for (2) 'using unique' and 'SRID=' are optional, but its highly recommended that you use them!!!
-
-The most common problem with (1) is incorrectly uploading your data.  There must be an entry in the geometry_columns table.  This will be automatically done if you used the shp2mysql program or created your geometry column with the AddGeometryColumn() MYGIS function.
-
-Another important thing to check is that the MYGIS user specified in the CONNECTION string does have SELECT permissions on the table(s) specified in your DATA string.
-
-If you are using the (2) method (and have errors), you've probably made a typo.
-Example:
-::
-
-'the_geom from (select the_geom,oid from mytable) as foo using unique oid using SRID=76'
-
-
-This is very much like the (1) example.  The subquery ('select the_geom,oid from mytable') will be executed, and mapserver will use 'oid' (a postgresql system column) for uniquely specifying a geometry (for mapserver queries).  The geometry (the_geom) must have a SRID of 76.
-
-Example:
-::
-
-'roads from (select table1.roads,table1.rd_segment_id,table2.rd_name,table2.rd_type from table1,table2 where table1.rd_segment_id=table2.rd_segment_id) as foo using unique rd_segment_id using SRID=89' 
-
-This is a more complex sub-query involving joining two tables.  The resulting geometry (column 'roads') has SRID=89, and mapserver will use rd_segment_id to uniquely identify a geometry.  The attributes rd_type and rd_name are useable by other parts of mapserver.
-
-To use a view, do something like:
-::
-
-'<geometry_column> from (SELECT * FROM <view>) as foo using unique <column name> using SRID=<srid#>'
-
-For example:
-::
-
-'the_geom from (SELECT * FROM myview) as foo using unique gid using SRID=-1'
-
-NOTE: for the (2) case, the ' as foo ' is requred.  The 'using unique <column>' and 'using SRID=' are case sensitive.
\ No newline at end of file

Copied: trunk/docs/input/vector/mysql.txt (from rev 8219, trunk/docs/howto/ogrmysql.txt)
===================================================================
--- trunk/docs/input/vector/mysql.txt	                        (rev 0)
+++ trunk/docs/input/vector/mysql.txt	2008-12-10 01:37:07 UTC (rev 8227)
@@ -0,0 +1,106 @@
+.. sectnum::
+
+Introduction
+============
+
+This method takes advantage of OGR's MySQL driver and avoids the need to set up an ODBC connection.  
+
+This is the primitive MySQL support for point data, not the recently added  `MySQL spatial support found in GDAL/OGR 1.3.2`_ .  
+ 
+Support for this functionality is found in GDAL/OGR 1.2.6 and older on Windows and GDAL/OGR 1.3.2 on Linux.
+
+**Needed**
+
+- MySQL database containing a table with fields containing x and y coordinates
+- .ovf file, a small xml file you will create
+- MapServer compiled with OGR version supporting this functinality
+
+Create .ovf file
+===========================
+
+Here is the .ovf file named aqidata.ovf
+
+::
+
+   <OGRVRTDataSource>
+       <OGRVRTLayer name="aqidata">
+           <SrcDataSource>MYSQL:aqiTest,user=uuuuu,password=ppppp,host=192.170.1.100,port=3306,tables=testdata</SrcDataSource> 
+	   <SrcSQL>SELECT areaID, x, y, sampleValue FROM testdata</SrcSQL> 
+	   <GeometryType>wkbPoint</GeometryType>
+	   <GeometryField encoding="PointFromColumns" x="x" y="y"/> 
+       </OGRVRTLayer>
+   </OGRVRTDataSource>
+
+If you look at the connection string in <SrcDataSource>
+
+- The MySQL database name is 'aqiTest'
+- 'testdata' is the table containing the coordinate data
+- host and port are for MySQL server 
+
+Use the GeometryField element to tell OGR which fields store the x and y coordinate data.  Mine are simply named x and y.
+
+
+Test Connection with ogrinfo
+==============================
+
+:: 
+
+   # usr/local/bin/ogrinfo /maps/aqidata.ovf
+
+ogrinfo returns 
+
+::
+
+   ERROR 4: Update access not supported for VRT datasources.
+   Had to open data source read-only.
+   INFO: Open of `/maps/aqidata.ovf'
+   using driver `VRT' successful.
+   1: aqidata (Point)
+
+*Don't worry about the error, this is just telling you that it is a read-only driver.  
+If it really bugs you, call ogrinfo with the -ro (read only) flag.*
+
+To see the actual data
+
+::
+
+# usr/local/bin/ogrinfo /maps/aqidata.ovf -al  
+
+Create MapServer Layer
+=======================
+
+::
+
+   LAYER
+       NAME "MyAqi"
+       STATUS DEFAULT
+       TYPE POINT
+       CONNECTIONTYPE OGR  
+       CONNECTION "aqidata.ovf"
+       DATA "aqidata"
+       CLASS 
+          NAME "MyClass"
+	      STYLE
+	          SYMBOL 'circle'
+                  SIZE 15
+	          COLOR 0 255 0
+	      END
+       END
+   END  
+
+DATA in the LAYER definition should be the same as the name attribute of the OGRVRTLayer element in the ovf file. 
+
+*For this to draw, you need to have a SYMBOLSET defined in your mapfile and have a symbol called 'circle' in your symbols.sym file.*
+
+More Information
+=================
+
+ `MapServer OGR HowTo`_ 
+
+ `MapServer Vector Data Reference - Virtual Spatial Data`_ 
+
+.. #### rST Link Section ####
+
+.. _`MySQL spatial support found in GDAL/OGR 1.3.2`: http://www.gdal.org/ogr/drv_mysql.html 
+.. _`MapServer OGR HowTo`: http://mapserver.gis.umn.edu/docs/howto/ogr_howto
+.. _`MapServer Vector Data Reference - Virtual Spatial Data`: http://mapserver.gis.umn.edu/docs/reference/vector_data/VirtualSpatialData
\ No newline at end of file



More information about the mapserver-commits mailing list