[QGIS Commit] r9402 - in docs/trunk/english_us/user_guide: . plugins_screenies

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Sep 24 08:03:21 EDT 2008


Author: dassau
Date: 2008-09-24 08:03:21 -0400 (Wed, 24 Sep 2008)
New Revision: 9402

Added:
   docs/trunk/english_us/user_guide/plugins_screenies/mapserver_export_dialog.png
   docs/trunk/english_us/user_guide/plugins_screenies/mapserver_export_qgs.png
   docs/trunk/english_us/user_guide/plugins_screenies/mapserver_export_test.png
Modified:
   docs/trunk/english_us/user_guide/core_plugins.tex
   docs/trunk/english_us/user_guide/grass_integration.tex
   docs/trunk/english_us/user_guide/plugins_mapserver_export.tex
   docs/trunk/english_us/user_guide/plugins_screenies/Makefile
Log:
updated and tested section mapserver export plugin


Modified: docs/trunk/english_us/user_guide/core_plugins.tex
===================================================================
--- docs/trunk/english_us/user_guide/core_plugins.tex	2008-09-24 11:13:56 UTC (rev 9401)
+++ docs/trunk/english_us/user_guide/core_plugins.tex	2008-09-24 12:03:21 UTC (rev 9402)
@@ -46,6 +46,9 @@
 \includegraphics[width=0.7cm]{interpolation}
 & Interpolation \index{plugins!Interpolation}& Interpolation on base of vertices of a vector layer\\
 \hline
+\includegraphics[width=0.7cm]{mapserver_export}
+& MapServer Export Plugin \index{plugins!MapServer Export}& Export a saved QGIS project file to a MapServer map file \\
+\hline
 \includegraphics[width=0.7cm]{north_arrow}
 & North Arrow \index{plugins!north arrow}& Add a north arrow to the map canvas\\
 \hline

Modified: docs/trunk/english_us/user_guide/grass_integration.tex
===================================================================
--- docs/trunk/english_us/user_guide/grass_integration.tex	2008-09-24 11:13:56 UTC (rev 9401)
+++ docs/trunk/english_us/user_guide/grass_integration.tex	2008-09-24 12:03:21 UTC (rev 9402)
@@ -113,7 +113,7 @@
 
 \begin{figure}[ht]
 \begin{center}
-\caption{GRASS data organized in the alaska LOCATION (adapted from Neteler \& 
+\caption{GRASS data in the alaska LOCATION (adapted from Neteler \& 
 Mitasova 2007 \cite{neteler_mitasova07})}\label{fig:grass_location}\smallskip
 \includegraphics[clip=true]{grass_location}
 \end{center}  

Modified: docs/trunk/english_us/user_guide/plugins_mapserver_export.tex
===================================================================
--- docs/trunk/english_us/user_guide/plugins_mapserver_export.tex	2008-09-24 11:13:56 UTC (rev 9401)
+++ docs/trunk/english_us/user_guide/plugins_mapserver_export.tex	2008-09-24 12:03:21 UTC (rev 9402)
@@ -2,57 +2,80 @@
 
 % when the revision of a section has been finalized, 
 % comment out the following line:
-\updatedisclaimer
+%\updatedisclaimer
 
 You can use QGIS to ``compose'' your map by adding and arranging layers, 
-symbolizing them, and customizing the colors and then create a map file 
-for the UMN MapServer. In order to use the MapServer Export plugin, you 
-must have Python installed on your system and QGIS must have been compiled 
-with support for it.
+symbolizing them, customizing the colors and then create a map file 
+for MapServer. In order to use the MapServer Export plugin, you 
+must have Python >= 2.4 installed on your system and QGIS must have been 
+compiled with support for it. All binary packages include Python Support.
 
-The MapServer Export plugin in QGIS \CURRENT is an Python Plugin, that is 
-automatically loaded into the \filename{Plugin Manager}. 
+The MapServer Export plugin in QGIS \CURRENT is a Python Plugin, that is 
+automatically loaded into the \filename{Plugin Manager} as a core plugin 
+(see Section~\ref{sec:core_plugins}).
 
 \subsubsection{Creating the Project File}
 
-To create a MapServer map file:
+The MapServer Export Plugin operates on a saved QGIS project file and 
+\textbf{not} on the current contents of the map canvas and legend. This 
+has been a source of confusion for a number of people. As described below, 
+before you start using the MapServer Export Plugin, you need to arrange 
+the raster and vector layers you want to use in MapServer and save this 
+status in a QGIS project file
 
+\begin{figure}[ht]
+\begin{center}
+  \caption{Arrange raster and vector layers for QGIS project file \nixcaption}
+  \label{fig:mapserver_export_qgs}\smallskip
+  \includegraphics[clip=true, width=13cm]{mapserver_export_qgs}
+\end{center}
+\end{figure}
+
+In this example we show the four steps to get us to the point where we are 
+ready to create the MapServer map file. We use raster and vector files from 
+the QGIS sample dataset \label{label_sampledata}.
+
 \begin{enumerate}
-\item Add your layers to QGIS
-\item Symbolize your layers, setting the renderer and colors
-\item Arrange the layers in the order you want them to appear in MapServer
-\item Save your work to a QGIS project file
+\item Add the raster layer \filename{landcover.tif} clicking on the 
+\toolbtntwo{mActionAddRasterLayer}{Add Raster Layer} icon.
+\item Add the vector Shapefiles \filename{lakes.shp, majrivers.shp} and 
+\filename{airports.shp} from the QGIS sample dataset clicking on the 
+\toolbtntwo{mActionAddNonDbLayer}{Add Vector Layer} icon.
+\item Change the colors and symbolize the data as you like (see 
+Figure~\ref{fig:mapserver_export_qgs})
+\item Save a new project named \filename{mapserverproject.qgs} using 
+\mainmenuopt{File} > \dropmenuopttwo{mActionFileSave}{Save Project}.
 \end{enumerate} 
 
-This gets us to the point where we are ready to create the map file.
-
-\begin{Tip}\caption{\textsc{MapServer Export Requires a QGIS Project File}}
-\qgistip{This has been a source of confusion for a number of people. The
-MapServer export tool operates on a saved QGIS project file,
-\textbf{not} the current contents of the map canvas and legend. When 
-using the tool, you need to specify a QGIS project file as input.
-}
-\end{Tip} 
-
 \subsubsection{Creating the Map File}
 
-The exporter tool (\filename{msexport}) is installed in your QGIS binary directory and can be used independently of QGIS. 
+The tool \filename{msexport} to export a QGIS project file to a MapServer map 
+file is installed in your QGIS binary directory and can be used independently of QGIS. 
+From QGIS you need to load the MapServer Export Plugin first with the Plugin Manager. 
+Click \mainmenuopt{Plugins} > \dropmenuopt{Manage Plugins...} to open the Plugin Manager, 
+choose MapServer export Plugin and click \button{OK}. Now start the 
+\toolbtntwo{mapserver_export}{MapServer Export} dialog (see 
+Figure~\ref{fig:mapserver_export_dialog}) clicking the icon in the toolbar menu.
 
-From QGIS you can start the exporter by choosing \mainmenuopt{File} > \dropmenuopt{Export to MapServer Map...}. 
+\begin{figure}[ht]
+\begin{center}
+  \caption{Export to MapServer Dialog \nixcaption}
+  \label{fig:mapserver_export_dialog}\smallskip
+  \includegraphics[clip=true, width=10cm]{mapserver_export_dialog}
+\end{center}
+\end{figure}
 
-Here is a summary of the input fields:
-
 \begin{description}
 \item [Map file] \mbox{}\\
-Enter the name for the map file to be created. You can use the button at the right to browse for the directory where you want the map file created. 
-
+Enter the name for the map file to be created. You can use the button at the 
+right to browse for the directory where you want the map file created. 
 \item [Qgis project file] \mbox{}\\
-Enter the full path to the QGIS project file (.qgs) you want to export. You can use the button at the right to browse for the QGIS project file.
+Enter the full path to the QGIS project file (.qgs) you want to export. You can 
+use the button at the right to browse for the QGIS project file.
 \item [Map Name] \mbox{}\\
 A name for the map. This name is prefixed to all images generated by the mapserver.
 \item [Map Width] \mbox{}\\
 Width of the output image in pixels.
-
 \item [Map Height] \mbox{}\\
 Height of the output image in pixels.
 \item [Map Units] \mbox{}\\
@@ -67,78 +90,63 @@
 Full path to the MapServer footer file to be used with the map file
 \end{description}
 
-Only the Map file and QGIS project file inputs are required to create a
-map file, however you may end up with a non-functional map file, depending
-on your intended use. Although QGIS is good at creating a map file from
-your project file, it may require some tweaking to get the results you
-want - but it's still way better than writing a map file from scratch.  
+Only the \filename{Map file} and \filename{QGIS project file} inputs are 
+required to create a map file, however you may end up with a non-functional 
+map file, depending on your intended use. Although QGIS is good at creating 
+a map file from your project file, it may require some tweaking to get the 
+results you want. But let's create a map file using the project file 
+\filename{mapserverproject.qgs} we just created 
+(see Figure~\ref{fig:mapserver_export_dialog}):
 
-\minisec{Creating a Map File}
-
-Let's create a map file using the shape files \filename{alaska}, \filename{lakes} 
-and \filename{rivers} layers from the qgis\_sample\_data:
-
 \begin{enumerate}
-  \item Load the \filename{alaska}, \filename{rivers} and \filename{lakes} 
-  layers into QGIS
-  \item Change the colors and symbolize the data as you like
-  \item Save the project using \mainmenuopt{File} >
-  \dropmenuopttwo{mActionFileSave}{Save Project}.
-  \item Open the exporter by clicking mainmenuopt{File} > \dropmenuopt{Export
-  to MapServer Map...}.
-  \item Enter a name for your new map file
-  \item Browse and find the project file you just saved
-  \item Enter a name for the map
-  \item Enter 600 for the width and 400 for the height
-  \item Our layers are in decimal degrees so we don't need to change the
-    units
-  \item Choose ``png'' for the image type
-  \item Click \button{OK} to generate the map file
+  \item Open the MapServer Export Plugin clicking the 
+  \toolbtntwo{mapserver_export}{MapServer Export} icon.
+  \item Enter the name \filename{qgisproject.map} for your new map file.
+  \item Browse and find the QGIS project file \filename{mapserverproject.qgs} 
+  you just saved.
+  \item Enter a name \filename{MyMap} for the map.
+  \item Enter \filename{600} for the width and \filename{400} for the height.
+  \item Our layers are in meters so we change the units to meters.
+  \item Choose ``png'' for the image type.
+  \item Click \button{OK} to generate the new map file \filename{qgisproject.map}. 
+  QGIS displays the success of your efforts.
 \end{enumerate}
 
-
-%\begin{figure}[ht]
-%\begin{center}
-%  \caption{Export to MapServer map module in QGIS}\label{fig:mapserver_export}\smallskip
-%  \includegraphics[clip=true, width=0.8\textwidth]{mapserver_export}
-%\end{center}
-%\end{figure}
-
-You'll notice there is no feedback on the success of your efforts. This
-is an enhancement scheduled for the next version. 
-
 You can view the map file in an text editor or visualizer. If you
 take a look, you'll notice that the export tool adds the metadata needed
 to enable our map file for WMS. 
 
 \subsubsection{Testing the Map File}
 
-Let's test our work by using the \filename{shp2img} command to create an image
-from the map file. The  \filename{shp2img} utility is part of MapServer,
-but is also distributed with FWTools. To create an image from our map:
+We can now test our work using the \filename{shp2img} tool to create an image
+from the map file. The \filename{shp2img} utility is part of MapServer and FWTools. 
+To create an image from our map:
 
 \begin{itemize}
 \item Open a terminal window
 \item If you didn't save your map file in your home directory, change to
-  the directory where you saved it
-\item Run \filename{shp2img} 
-\item View the created image 
+  the folder where you saved it
+\item Run \filename{shp2img -m qgisproject.map -o mapserver\_test.png} and 
+  display the image 
 \end{itemize}
  
-Assuming our map file was named \filename{mapserver\_test.map}, the
-\filename{shp2img} command is:
+This creates a PNG with all the layers included in the QGIS project file. 
+In addition, the extent of the PNG will be the same as when we saved the 
+project. As you can see in Figure~\ref{fig:mapserver_export_test}, all 
+inforamtion except the airport symbols are included.
 
-\begin{verbatim}
-shp2img -m mapserver_test.map -o mapserver_test.png
-\end{verbatim}
+\begin{figure}[ht]
+\begin{center}
+  \caption{Test PNG created by shp2img with all MapServer Export layers \nixcaption}
+  \label{fig:mapserver_export_test}\smallskip
+  \includegraphics[clip=true, width=12cm]{mapserver_export_test}
+\end{center}
+\end{figure}
 
-This creates a PNG for us to view, containing all the layers that were on
-when we saved the QGIS project. In addition, the extent of the PNG will be the same as
-when we saved the project.
-
 If you plan to use the map file to serve WMS requests, you probably don't
 have to tweak anything. If you plan to use it with a mapping template or a
 custom interface, you may have a bit of manual work to do. To see how easy
 it is to go from QGIS to serving maps on the web, take a look at
-Christopher Schmidt's 5 minute flash video.
+Christopher Schmidt's 5 minute flash video. He used QGIS version 0.8, but it 
+is still useful.
 \footnote{\url{http://openlayers.org/presentations/mappingyourdata/}}

Modified: docs/trunk/english_us/user_guide/plugins_screenies/Makefile
===================================================================
--- docs/trunk/english_us/user_guide/plugins_screenies/Makefile	2008-09-24 11:13:56 UTC (rev 9401)
+++ docs/trunk/english_us/user_guide/plugins_screenies/Makefile	2008-09-24 12:03:21 UTC (rev 9402)
@@ -13,7 +13,10 @@
 
 PNG=pluginmanager.eps\
 	plugininstaller.eps\
-	
+	mapserver_export_qgs.eps\
+	mapserver_export_dialog.eps\
+	mapserver_export_test.eps\
+
 ##### TARGETS #####
 
 all: $(PNG) $(JPG)

Added: docs/trunk/english_us/user_guide/plugins_screenies/mapserver_export_dialog.png
===================================================================
(Binary files differ)


Property changes on: docs/trunk/english_us/user_guide/plugins_screenies/mapserver_export_dialog.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: docs/trunk/english_us/user_guide/plugins_screenies/mapserver_export_qgs.png
===================================================================
(Binary files differ)


Property changes on: docs/trunk/english_us/user_guide/plugins_screenies/mapserver_export_qgs.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: docs/trunk/english_us/user_guide/plugins_screenies/mapserver_export_test.png
===================================================================
(Binary files differ)


Property changes on: docs/trunk/english_us/user_guide/plugins_screenies/mapserver_export_test.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



More information about the QGIS-commit mailing list