stephan@188: .. index:: installation, requirements, apache, UMN MapServer, compile, jar stephan@188: stephan@140: ------------ stephan@140: Requirements stephan@140: ------------ stephan@140: stephan@140: The current version of the converter only runs on Windows. This is because stephan@140: the ArcObjects JDK API is not running properly on Linux though. stephan@140: stephan@140: To run the converter you need at least the following componentes: stephan@140: stephan@140: * Sun Java6 SDK to build, JRE to run stephan@140: * ArcGIS Desktop10.x or ArcEngine10.x with a valid licence enabled stephan@202: * UMN MapServer with Java MapScript-bindings (>=6.0.1 or recent development-version) stephan@202: * Apache2 Webserver for displaying the resulting Mapfiles stephan@140: * Optional: MapServer compiled with ArcSDE-plugin stephan@140: * Optional: GDAL/OGR compiled with ArcSDE-support stephan@140: * Optional: GDAL/OGR compiled with FileGeodatabase-support stephan@202: * Optional: Other GDAL/OGR-related tools. stephan@140: stephan@140: stephan@140: ------------ stephan@140: Installation stephan@140: ------------ stephan@140: stephan@140: Compile the converter-sources stephan@140: ----------------------------- stephan@140: stephan@140: To compile the sources you need to have a properly configured stephan@140: ant-environmet available. ArcGIS SDK provides an ant-installation which stephan@140: suffices:: stephan@140: stephan@140: ant jar stephan@140: rrenkert@182: or:: rrenkert@182: rrenkert@182: ant jar-norevision rrenkert@182: stephan@140: Install Apache Webserver stephan@140: ------------------------ stephan@140: stephan@140: Install Apache webserver by exedcuting the .msi-file and follow the stephan@140: install-dialogs:: stephan@140: stephan@140: httpd-2.2.19-win32-x86-openssl-0.9.8r.msi stephan@140: stephan@140: Make sure that you install apache as a service so it will be available stephan@140: directly after system bootup. stephan@140: stephan@140: stephan@140: Install UMN MapServer stephan@140: --------------------- stephan@140: stephan@140: The current documentation uses the Windows binary-builds from http://www.gisinternals.com/sdk/ stephan@140: stephan@202: 1. Unzip the ZIP-file at ``c:/ms_6.1-dev`` stephan@140: stephan@140: #. Configure Apache Webserver to find the cgi-bin-folder:: stephan@140: stephan@140: ScriptAlias /cgi-bin/ "C:/ms_6.1-dev/bin/" stephan@140: stephan@140: stephan@140: Options None stephan@140: Order allow,deny stephan@140: Allow from all stephan@140: stephan@140: stephan@202: #. Copy mapserv.exe from ``c:/ms_6.1-dev/bin/apps/ms`` to ``c:/ms_6.1-dev/bin/`` stephan@140: rrenkert@182: stephan@140: Create run-environment stephan@140: ---------------------- stephan@140: rrenkert@182: The current version of MXD2map needs a few steps to run properly. rrenkert@182: The following steps assume the runtime folder to be c:/mxd2map/. This path can rrenkert@182: be changed. stephan@140: stephan@202: 1. Copy ``mxd2map.jar`` to ``c:/mxd2map/``. stephan@140: stephan@202: #. Copy folder "conf" from repository to ``c:/mxd2map/`` rrenkert@182: stephan@202: #. Create folder ``c:/mxd2map/lib/`` rrenkert@182: rrenkert@182: #. Get log4j from http://logging.apache.org/log4j/1.2/download.html rrenkert@182: rrenkert@182: #. Get jargs http://jargs.sourceforge.net/ (Version 1.0) rrenkert@182: stephan@202: #. Build the libraries and copy the resulting jar-files to ``c:/mxd2map/lib/`` rrenkert@182: stephan@202: #. Copy mapscript.jar and mapscript.dll to ``c:/mxd2map/lib/`` rrenkert@182: stephan@202: #. Create a folder ``c:/mxd2map/logs/`` rrenkert@182: stephan@202: #. Create or copy a converter.properties file to ``c:/mxd2map/`` stephan@202: stephan@202: Setup environment-variables stephan@202: --------------------------- stephan@202: stephan@202: For running the converter it is necessary to set up some environment stephan@202: variables and adjust the path accordingly. stephan@202: stephan@202: The following example shows the minimum env-vars needed:: stephan@202: stephan@202: @echo off stephan@202: if "%1" == "setenv" goto setenv stephan@202: stephan@202: %comspec% /k SDKShell.bat setenv %1 stephan@202: goto exit stephan@202: stephan@202: :setenv stephan@202: @echo Setting environment for using the GDAL and MapServer tools. stephan@202: stephan@202: if "%2"=="hideoci" goto hideoci stephan@202: stephan@202: set ocipath=0 stephan@202: set _path="%PATH:;=" "%" stephan@202: for %%p in (%_path%) do if not "%%~p"=="" if exist %%~p\oci.dll set ocipath=1 stephan@202: stephan@202: if "%ocipath%"=="0" goto hideoci stephan@202: @echo WARNING: If you encounter problems with missing oci libraries then type: stephan@202: @echo SDKShell hideoci stephan@202: goto setenv2 stephan@202: stephan@202: :hideoci stephan@202: @echo Hiding the OCI plugin library. stephan@202: if not exist %CD%\bin\gdal\plugins-optional mkdir %CD%\bin\gdal\plugins-optional stephan@202: if exist %CD%\bin\gdal\plugins\ogr_OCI.dll move %CD%\bin\gdal\plugins\ogr_OCI.dll %CD%\bin\gdal\plugins-optional\ogr_OCI.dll stephan@202: if exist %CD%\bin\gdal\plugins\gdal_GEOR.dll move %CD%\bin\gdal\plugins\gdal_GEOR.dll %CD%\bin\gdal\plugins-optional\gdal_GEOR.dll stephan@202: stephan@202: :setenv2 stephan@202: SET PATH=C:\Program Files\ArcGIS\DeveloperKit10.0\java\jre\bin;C:\Program Files\ArcGIS\Engine10.0\bin;%CD%\bin;%CD%\bin;%CD%\bin\gdal\python\osgeo;%CD%\bin\proj\apps;%CD%\bin\gdal\apps;%CD%\bin\ms\apps;%CD%\bin\gdal\csharp;%CD%\bin\ms\csharp;%CD%\bin\curl;%CD%\bin\ms\java;C:\Program Files\Vim\vim71;C:\Program Files\TortoiseHg;%PATH% stephan@202: SET GDAL_DATA=%CD%\bin\gdal-data stephan@202: SET GDAL_DRIVER_PATH=%CD%\bin\gdal\plugins stephan@202: SET PYTHONPATH=%CD%\bin\gdal\python\osgeo stephan@202: SET PROJ_LIB=%CD%\bin\proj\SHARE stephan@202: SET CURL_CA_BUNDLE=C:\ms4w\Apache\conf\ca-bundle\cacert.pem stephan@202: stephan@202: :exit stephan@202: stephan@202: The above batch-script ``SDKShell.bat`` needs to be sources before working stephan@202: with MXD2map. stephan@202: