Example of a LAYER¶
LAYER
NAME kwadranten
TYPE POLYGON
CONNECTIONTYPE oraclespatial
CONNECTION "user/pwd"
DATA "GEOMETRIE FROM KWADRANTEN USING SRID 90112"
DUMP TRUE
CLASS
STYLE
OUTLINECOLOR 0 0 0
COLOR 0 128 128
END
END
END
You can specify the SID for your database, the SID alias needs to be supplied in the tnsnames.ora file of the Oracle client, e.g.
Example for tnsnames.ora:
MYDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server_ip)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB1)
)
)
So after this you can define you layer connection as:
CONNECTION "user/pwd@MYDB"
===================================================
oracle
==================================================
Oracle 10g & 11g
################
Steps to Enable Oracle 10g or 11g Support in MS4W
*************************************************
1. Make sure you have Oracle 10g or 11g client software
installed on your machine (the same machine that you
are running MS4W on).
2. Replace the existing libmap.dll in /ms4w/Apache/cgi-bin/
with the one in the
/ms4w/Apache/cgi-bin/ignored-libmap/oracle11g/
folder.
3. Move the ogr_OCI.dll plugin file up from
/ms4w/gdalplugins/ignored/oracle-11g/ into /ms4w/gdalplugins/
If this is successful, executing the following at the
commandline (after setting /ms4w/setenv.bat)
"ogrinfo --formats" should list the OCI driver.
4. Restart Apache to be safe.
5. For mapfile configuration see
http://www.mapserver.org/input/vector/oracle.html
=================================================
MAPINFO
================================================
Map File Example¶
LAYER
NAME Elevation_Poly_5
TYPE POLYGON
STATUS DEFAULT
CONNECTIONTYPE OGR
CONNECTION "./hypso/elev5_poly.TAB"
STYLEITEM "AUTO"
CLASS
NAME "Elevation Poly 5"
END
END # Layer
============================================================
APACHE
=============================================================
Setting the Apache Environment¶
Sometimes it is confusing WHERE to set WHAT in the splitted apache2.conf-files. In the folder “/etc/apache2/sites_available” you find your sites-file. If you did not do sth. Special e.g. installing virtual hosts, the file is named “default”. In this file, the apache cgi-directory is defined. Our file looks like this:
ScriptAlias /cgi-bin/ /var/www/cgi-bin/