Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site. Si vous continuez à utiliser ce dernier, nous considèrerons que vous acceptez l'utilisation des cookies. J'ai compris ! ou En savoir plus !.
banniere

Le portail francophone de la géomatique


Toujours pas inscrit ? Mot de passe oublié ?
Nom d'utilisateur    Mot de passe              Toujours pas inscrit ?   Mot de passe oublié ?

Annonce

Printemps des cartes 2024

#1 Tue 25 July 2006 17:30

demirmiri
Participant occasionnel
Date d'inscription: 19 Jul 2006
Messages: 10

installation mapserver

J'ai un problème concernant l’installation de mapserver en tant que cgi sous  linux debain redhar 9. Les outils suivants ont deja été installés :
PROJ 4.4.9
GEOS 2.1.0
POSTGRESQL 8.0.0 beta 5
POSTGIS 1.0.0 CVS
GD 2.0.12
PDFLIB 5.0.3
PHP 4.3.4
GDAL 1.2.0
GD 2.0.15
GD 2.0.15
GD 2.0.15
CURL 7.10.5
MAPSERVER 4.2.4

Pour configuerer mapserver, nous avons procédé comme suit :

Décopression du fichier tar

tar xvzf mapserver-version.tar.gz

cd mapserver-4.2.4

./configure --without-tiff --with-jpeg=/usr --with-png=/usr \
--with-threads --with-proj --with-postgis --with-pdf \
--with-mapscript --with-gdal=/usr/local/bin/gdal-config \
--with-gd=/usr --with-freetype=/usr --with-ogr --with-wmsclient\
--with-wfs --with-wfsclient \
--with-php=/home/postgres/src/php-4.3.11
make

Cd /usr/src/mapserver/sources/mapserver-4.2.2/mapscript/php3
Cp php_mapscript.so /usr/local/lib/hp/extensions/no-debug-non-zts-20020429/









Après toutes ces étapes, nous avons exécuté la commande suivante :

[root@webmapping mapserver-4.2.4 # ./mapserv

Retourne l’erreur suivante

./mapserv : error when loading shared libraries : libgdal.so.1: cannot open shared objet file: No such file or directory

Alors que l’on devrait avoir le message suivant :

This script can onl be used to decode from results and
Should be initiated as a CGI process via a httpd server

L’installaton de gdal-1.2.0 s’étant bien passée, nous ne comprenons pas qu’un tel message puisse nous etre retourné. Merci pour toute aide.

Hors ligne

 

#2 Tue 25 July 2006 18:06

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9855
Site web

Re: installation mapserver

Bonjour,
vous dites vouloir installer mapserver cgi et vous installez php_mapscript ...

Avez vous eut des erreurs lors du ./configure de mapserver ? Pourquoi ne pas avoir rajouter l'option :
--with-ogr=/usr/local/bin/gdal-config ?

Dans mon cas il a été nécessaire de créer un lien de /usr/local/lib/libgdal.so.1.9.0 vers /usr/lib/

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#3 Tue 25 July 2006 22:47

fx gamoy
Participant occasionnel
Lieu: Bidart
Date d'inscription: 7 Sep 2005
Messages: 31
Site web

Re: installation mapserver

bonjour,

D'après moi il s'agit d'un problème de librairies partagées.

Cela devrait se solutionner en déclarant le repértoire dans lequel figure les
librairies de gdal
ici /usr/local/lib
dans le répertoire /etc/ld.so.conf

puis lancez la commande ldconfig pour mettre en cache les librairies partagées

si le problème se déplace sur une autre librairie non déclarée, procédez de la
même facon..

Bonne journée,
fx

Hors ligne

 

#4 Sun 30 July 2006 15:34

demirmiri
Participant occasionnel
Date d'inscription: 19 Jul 2006
Messages: 10

Re: installation mapserver

Merci pour votre aide. J'ai cependant un autre problème. Je cherche à compiler et installer postgresql et post gis sous windows en environnement simulant linux (MinGW et Msys. Les téléchargement de proj-4.4.9 et postgis-1.1.2 me posent problème. Lorsque je télécharge les fichiers tar et que j'exécute le comande tar xvzf proj -4.4.9. tar.gz ainsi que tar xvzf postgis -1.1.2. tar.gz, le message renvoyé est que ces deux fichiers ne sont pas sous format tar. je les ai pourtant bien téléchargés aus adresses suivantes :

http hmm/postgis.refractions.net/download/postgis-1.1.2.tar.gz

ftp hmm/ftp.remotesensing.org/proj/proj-4.4.9.tar.gz

Je voudrais bien pouvoir régler ce problème avant de passer au paramètrage de postgresql et posgis

Merci

Hors ligne

 

#5 Sun 30 July 2006 19:22

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9855
Site web

Re: installation mapserver

bonjour,
Vos fichiers ont été compactés à l'aide de gzip, pour décompacter :
gzip -d postgis-1.1.2.tar.gz
puis tar xcf postgis-1.1.2.tar
Faites pareil pour proj -4.4.9. tar.gz.

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#6 Tue 01 August 2006 12:18

demirmiri
Participant occasionnel
Date d'inscription: 19 Jul 2006
Messages: 10

Re: installation mapserver

yjacolin a écrit:

bonjour,
Vos fichiers ont été compactés à l'aide de gzip, pour décompacter :
gzip -d postgis-1.1.2.tar.gz
puis tar xcf postgis-1.1.2.tar
Faites pareil pour proj -4.4.9. tar.gz.

Y.


merci pour l'info

Hors ligne

 

#7 Fri 04 August 2006 17:58

demirmiri
Participant occasionnel
Date d'inscription: 19 Jul 2006
Messages: 10

Re: installation mapserver

Nous avons procédé à l'installation complete des outils dédiés au serveur cartographique internet sous red hat 9 (PROJ 4.4.9, GEOS 2.1.0, POSTGRESQL 8.0.0 beta 5, POSTGIS 1.0.0 CVS, GD 2.0.12, PDFLIB 5.0.3
PHP 4.3.4, GDAL 1.2.0, GD 2.0.15, GD 2.0.15, GD 2.0.15, CURL 7.10.5, MAPSERVER 4.2.4 ). L'initialisation de postgresql et le test d'une base a été fait de meme que le test du serveur apache qui tourne. L'option retenue est l'installation et la configuration de php en tant que cgi. Nous voudrions avoir de l'aide concernant le test d'installation de php en tant que cgi et la démo  itasca3.5.tar.gz.

Merci

Hors ligne

 

#8 Mon 07 August 2006 09:44

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9855
Site web

Re: installation mapserver

demirmiri a écrit:

Nous avons procédé à l'installation complete des outils dédiés au serveur cartographique internet sous red hat 9 (PROJ 4.4.9, GEOS 2.1.0, POSTGRESQL 8.0.0 beta 5, POSTGIS 1.0.0 CVS, GD 2.0.12, PDFLIB 5.0.3
PHP 4.3.4, GDAL 1.2.0, GD 2.0.15, GD 2.0.15, GD 2.0.15, CURL 7.10.5, MAPSERVER 4.2.4 ). L'initialisation de postgresql et le test d'une base a été fait de meme que le test du serveur apache qui tourne. L'option retenue est l'installation et la configuration de php en tant que cgi. Nous voudrions avoir de l'aide concernant le test d'installation de php en tant que cgi et la démo  itasca3.5.tar.gz.

Merci


Pour tester PHP en mode CGI, c'est à dire savoir si php est en mode CGI ou s'il fonctionne ? Une solution :
créer un fichier phpinfo.php contenant les lignes suivantes :

<html>
<body>
<?
phpinfo();
?>
</body>
</html>


La 4eme ligne du tableau vous renseignera. Vous pouvez vérifier également le chargement du module mapscrit si vous l'avez installé.

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#9 Mon 21 August 2006 16:26

demirmiri
Participant occasionnel
Date d'inscription: 19 Jul 2006
Messages: 10

Re: installation mapserver

msGetLabelSize(): TrueType Font error. Requested font (Arial Bold) not found.
voici le message que  me renvoie maserver ares execution de l'url
http://localhost/cgi-bin/mapserv.exe.
Je ne comrend pas trop ce qui se passe dans la mesure où le fichier fontset.txt a bien été sécifié dans le mapfile.

Ci joints les fichierss (temlates, mafile et fontset.txt).

Merci our votre aide


<html>
<head><title>Third Map</title></head>
<body bgcolor="#E6E6E6">
<form name="the_form" method=GET action="[program]"> 
  <table width="100%" border="1">
   <tr><td width="60%" rowspan="6">
       <input name="img" type="image" src="[img]"
               width=640 height=480 border=2>
       </td>
       <td width="40%" align="center" colspan="3">
       <img SRC="[ref]" width=300 height=225 border=1>
       </td>
   </tr>
   <tr><td align="left" colspan="3"><font size="-1">
       Map scale:&nbsp &nbsp &nbsp 1:[scale]</font></td></tr>
   <tr><td align="left" colspan="3"><font size="-1">
       Click x,y:&nbsp &nbsp &nbsp &nbsp [mapx], [mapy]</font></td></tr>
   <tr><td align="left" colspan="3"><font size="-1">
       Map Extent:&nbsp [mapext]</font></td></tr>
   <tr><td><B><center>Legend</center></B></td>
       <td><B><center>Navigation</center></B></td>
       <td><B><center>Layers</center></B></td></tr>
   <tr><td rowspan="2"><img src="[legend]"></td>
       <td align="left"><font size="-1">
       <input type=radio name=zoomdir value=0 [zoomdir_0_check]>
          Pan<BR>
       <input type=radio name=zoomdir value=1 [zoomdir_1_check]>
          Zoom In<BR>
       <input type=radio name=zoomdir value=-1 [zoomdir_-1_check]>
          Zoom Out<BR>
       <input type=text name=zoomsize size=1 value=[zoomsize]>
          Size<BR>
       <center><input type="submit" value="Refresh"></center>
       </td>
       <td align="top">
       <input type="checkbox" name="layer" value="urbanareas"
          [urbanareas_check]>
          Urban Areas<BR>
       <input type="checkbox" name="layer" value="lakes" [lakes_check]>
          Lakes<BR>
       <input type="checkbox" name="layer" value="states" [states_check]>
          State Boundaries<BR>
       <input type="checkbox" name="layer" value="roads" [roads_check]>
          Roads<BR></font>
       </td>
   </tr>
  </table>
   <input type="hidden" name="imgxy" value="320 240">
   <input type="hidden" name="imgext" value="[mapext]">
   <input type="hidden" name="map" value="[map]">
   <input type="hidden" name="program" value="[program]">
</form>
</body>
</html>


<html>
<head> <title>MapServer Third Map</title></head>
<body>
  <form method=POST action="/cgi-bin/mapserv.exe">
    <input type="submit" value="Click to initialize">
    <input type="hidden" name="program" value="mapserv.exe">
    <input type="hidden" name="map" value="C:\www\site\www\demumn\third.map">
    <input type="hidden" name="mapext" value="-180.00 0.00 -60.00 90.00">
    <input type="hidden" name=zoomsize size=2 value=2>
    <input type="hidden" name="layers"
        value="urbanareas lakes states roads capitals">
  </form>
</body>
</html>

# This is our third map file
NAME "third"
UNITS DD
EXTENT -180.00 0.00 -60.00 90.00
SIZE 640 480
IMAGECOLOR 189 202 222
IMAGETYPE PNG
SHAPEPATH "C:\www\site\www\demumn\"
FONTSET "C:\www\site\fontset.txt"
#####################################
# Symbol for drawing fat lines
#
SYMBOL
     NAME "BigLine"
     TYPE ELLIPSE
     POINTS 1 1 END
END

#####################################
# Symbol for drawing dashed lines
#
SYMBOL
     NAME "DashedLine"
     TYPE ELLIPSE
     POINTS 1 1 END
     STYLE 10 10 END   
END

#####################################
# Symbol for drawing spots
#
SYMBOL
     NAME "Circle"
     FILLED true
     TYPE ellipse
     POINTS 1 1 END
END

#####################################
# Web object
#
WEB
     TEMPLATE "C:\www\site\www\demapserver\chapter04\third.html"
     IMAGEPATH "C:\www\site\tmp\"
     IMAGEURL "\tmp\"
END

#####################################
# Reference map
#
REFERENCE
     IMAGE "C:\www\site\www\demapserver\chapter04\third_usaref.gif"
     SIZE 300 225
     EXTENT -180.00 0.00 -60.00 90.00
     STATUS ON
     COLOR -1 -1 -1
     OUTLINECOLOR 255 0 0
END

#####################################
# Scalebar
#
SCALEBAR
     LABEL
          COLOR 0 0 0
          ANTIALIAS true
          SIZE small
     END
     POSITION lr
     INTERVALS 5
     STATUS embed
     SIZE 144 5
     STYLE 0
     UNITS miles
     BACKGROUNDCOLOR 255 0 0
     IMAGECOLOR 255 255 255
     COLOR 128 128 128     
     OUTLINECOLOR 0 0 255
     TRANSPARENT off
END

#####################################
# Legend
#
LEGEND
     STATUS on
     IMAGECOLOR 230 230 230
     LABEL
          TYPE truetype
          FONT "Arial"
          COLOR 0 0 0
          SIZE 10
          ANTIALIAS true
     END
END

#####################################
# State boundaries layer - polygon (for shading)
#
LAYER
     NAME "states"
     DATA "statesp020"
     STATUS on
     TYPE polygon
     LABELCACHE on
     LABELITEM "STATE"
     CLASS
          STYLE
               COLOR 255 246 189
          END
     END
END

#####################################
# State boundaries layer - line (for fat boundary)
#
LAYER
     NAME "states"
     DATA "statesp020"
     STATUS on
     TYPE line
     LABELCACHE on
     LABELITEM "STATE"
     CLASS
          NAME "State Line"
          STYLE
               SYMBOL "BigLine"
               SIZE 2
               COLOR 0 0 0
          END
     END
END

#####################################
# Urban areas layer
#
LAYER
     NAME "urbanareas"
     DATA "urbanap020"
     STATUS on
     TYPE polygon
     LABELCACHE on
     LABELITEM "NAME"
     MAXSCALE 1999999
     CLASS
          STYLE
               COLOR 212 192 100
               OUTLINECOLOR 0 0 0
          END
          LABEL
               TYPE truetype
               FONT "Arial Bold"
               SIZE 10
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
               POSITION auto
          END
     END
END


#####################################
# Cities layer - State capitals and cities pop. > 1000000
#
LAYER
     NAME "majorcities"
     DATA "citiesx020"
     STATUS default
     TYPE point
     LABELITEM "NAME"
     LABELCACHE on
     LABELMAXSCALE 15000000
     CLASSITEM "FEATURE"
     MINSCALE 2000000
     CLASS
          NAME "State Capitals"
          EXPRESSION /State*/
          STYLE
               SYMBOL "Circle"
               SIZE 6
               COLOR 0 255 0
          END
          LABEL
               TYPE truetype
               FONT "Arial"
               SIZE 9
               POSITION auto
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
          END
     END
     CLASS
          EXPRESSION ([Pop_2000] > 1000000)
          NAME "Major Cities"
          STYLE
               SYMBOL "Circle"
               SIZE 10
               COLOR 255 0 0
          END
          LABEL
               TYPE truetype
               FONT "Arial Bold"
               SIZE 10
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
               POSITION auto
          END
     END
END

#####################################
# Cities layer - Large cities, pop. < 1000000
#
LAYER
     NAME "largecities"
     DATA "citiesx020"
     STATUS default
     TYPE point
     LABELCACHE on
     LABELITEM "NAME"
     MINSCALE 2000000
     CLASS
          EXPRESSION(([Pop_2000]>100000)and([Pop_2000]<=1000000))
          NAME "Cities"
          STYLE
               SYMBOL "Circle"
               SIZE 4
               COLOR 255 0 0
               BACKGROUNDCOLOR 255 0 0
          END
          LABEL
               TYPE truetype
               FONT "Arial"
               SIZE 8
               POSITION auto
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
          END
     END
END

#####################################
# City layer - Cities
LAYER
     NAME "cities"
     DATA "citiesx020"
     STATUS default
     TYPE point
     LABELCACHE on
     LABELITEM "NAME"
     LABELMAXSCALE 500000
     MAXSCALE 2000000
     CLASS
          NAME "Small Cities"
          EXPRESSION ([Pop_2000] < 100000)
          STYLE
               SYMBOL "Circle"
               SIZE 3
               COLOR 255 0 0
          END
          LABEL
               TYPE truetype
               FONT "Arial Bold"
               SIZE 7
               POSITION auto
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
          END
     END
END

#####################################
# State boundaries layer - annotation (for labels)
#
LAYER
     NAME "states"
     DATA "statesp020"
     STATUS on
     TYPE annotation
     LABELCACHE on
     LABELITEM "STATE"
     LABELMINSCALE 2000000
     CLASS
          LABEL
               TYPE truetype
               FONT "Arial Bold"
               SIZE 14           
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
               MINDISTANCE 200
               MINFEATURESIZE 10
          END
     END
END
END # mapfile

Hors ligne

 

#10 Mon 21 August 2006 17:16

demirmiri
Participant occasionnel
Date d'inscription: 19 Jul 2006
Messages: 10

Re: installation mapserver

msGetLabelSize(): TrueType Font error. Requested font (Arial Bold) not found.
voici le message que  me renvoie maserver ares execution de l'url
http://localhost/cgi-bin/mapserv.exe.
Je ne comrend pas trop ce qui se passe dans la mesure où le fichier fontset.txt a bien été sécifié dans le mapfile.

Ci joints les fichierss (temlates, mafile et fontset.txt).

Merci our votre aide


<html>
<head><title>Third Map</title></head>
<body bgcolor="#E6E6E6">
<form name="the_form" method=GET action="[program]"> 
  <table width="100%" border="1">
   <tr><td width="60%" rowspan="6">
       <input name="img" type="image" src="[img]"
               width=640 height=480 border=2>
       </td>
       <td width="40%" align="center" colspan="3">
       <img SRC="[ref]" width=300 height=225 border=1>
       </td>
   </tr>
   <tr><td align="left" colspan="3"><font size="-1">
       Map scale:&nbsp &nbsp &nbsp 1:[scale]</font></td></tr>
   <tr><td align="left" colspan="3"><font size="-1">
       Click x,y:&nbsp &nbsp &nbsp &nbsp [mapx], [mapy]</font></td></tr>
   <tr><td align="left" colspan="3"><font size="-1">
       Map Extent:&nbsp [mapext]</font></td></tr>
   <tr><td><B><center>Legend</center></B></td>
       <td><B><center>Navigation</center></B></td>
       <td><B><center>Layers</center></B></td></tr>
   <tr><td rowspan="2"><img src="[legend]"></td>
       <td align="left"><font size="-1">
       <input type=radio name=zoomdir value=0 [zoomdir_0_check]>
          Pan<BR>
       <input type=radio name=zoomdir value=1 [zoomdir_1_check]>
          Zoom In<BR>
       <input type=radio name=zoomdir value=-1 [zoomdir_-1_check]>
          Zoom Out<BR>
       <input type=text name=zoomsize size=1 value=[zoomsize]>
          Size<BR>
       <center><input type="submit" value="Refresh"></center>
       </td>
       <td align="top">
       <input type="checkbox" name="layer" value="urbanareas"
          [urbanareas_check]>
          Urban Areas<BR>
       <input type="checkbox" name="layer" value="lakes" [lakes_check]>
          Lakes<BR>
       <input type="checkbox" name="layer" value="states" [states_check]>
          State Boundaries<BR>
       <input type="checkbox" name="layer" value="roads" [roads_check]>
          Roads<BR></font>
       </td>
   </tr>
  </table>
   <input type="hidden" name="imgxy" value="320 240">
   <input type="hidden" name="imgext" value="[mapext]">
   <input type="hidden" name="map" value="[map]">
   <input type="hidden" name="program" value="[program]">
</form>
</body>
</html>


<html>
<head> <title>MapServer Third Map</title></head>
<body>
  <form method=POST action="/cgi-bin/mapserv.exe">
    <input type="submit" value="Click to initialize">
    <input type="hidden" name="program" value="mapserv.exe">
    <input type="hidden" name="map" value="C:\www\site\www\demumn\third.map">
    <input type="hidden" name="mapext" value="-180.00 0.00 -60.00 90.00">
    <input type="hidden" name=zoomsize size=2 value=2>
    <input type="hidden" name="layers"
        value="urbanareas lakes states roads capitals">
  </form>
</body>
</html>

# This is our third map file
NAME "third"
UNITS DD
EXTENT -180.00 0.00 -60.00 90.00
SIZE 640 480
IMAGECOLOR 189 202 222
IMAGETYPE PNG
SHAPEPATH "C:\www\site\www\demumn\"
FONTSET "C:\www\site\fontset.txt"
#####################################
# Symbol for drawing fat lines
#
SYMBOL
     NAME "BigLine"
     TYPE ELLIPSE
     POINTS 1 1 END
END

#####################################
# Symbol for drawing dashed lines
#
SYMBOL
     NAME "DashedLine"
     TYPE ELLIPSE
     POINTS 1 1 END
     STYLE 10 10 END   
END

#####################################
# Symbol for drawing spots
#
SYMBOL
     NAME "Circle"
     FILLED true
     TYPE ellipse
     POINTS 1 1 END
END

#####################################
# Web object
#
WEB
     TEMPLATE "C:\www\site\www\demapserver\chapter04\third.html"
     IMAGEPATH "C:\www\site\tmp\"
     IMAGEURL "\tmp\"
END

#####################################
# Reference map
#
REFERENCE
     IMAGE "C:\www\site\www\demapserver\chapter04\third_usaref.gif"
     SIZE 300 225
     EXTENT -180.00 0.00 -60.00 90.00
     STATUS ON
     COLOR -1 -1 -1
     OUTLINECOLOR 255 0 0
END

#####################################
# Scalebar
#
SCALEBAR
     LABEL
          COLOR 0 0 0
          ANTIALIAS true
          SIZE small
     END
     POSITION lr
     INTERVALS 5
     STATUS embed
     SIZE 144 5
     STYLE 0
     UNITS miles
     BACKGROUNDCOLOR 255 0 0
     IMAGECOLOR 255 255 255
     COLOR 128 128 128     
     OUTLINECOLOR 0 0 255
     TRANSPARENT off
END

#####################################
# Legend
#
LEGEND
     STATUS on
     IMAGECOLOR 230 230 230
     LABEL
          TYPE truetype
          FONT "Arial"
          COLOR 0 0 0
          SIZE 10
          ANTIALIAS true
     END
END

#####################################
# State boundaries layer - polygon (for shading)
#
LAYER
     NAME "states"
     DATA "statesp020"
     STATUS on
     TYPE polygon
     LABELCACHE on
     LABELITEM "STATE"
     CLASS
          STYLE
               COLOR 255 246 189
          END
     END
END

#####################################
# State boundaries layer - line (for fat boundary)
#
LAYER
     NAME "states"
     DATA "statesp020"
     STATUS on
     TYPE line
     LABELCACHE on
     LABELITEM "STATE"
     CLASS
          NAME "State Line"
          STYLE
               SYMBOL "BigLine"
               SIZE 2
               COLOR 0 0 0
          END
     END
END

#####################################
# Urban areas layer
#
LAYER
     NAME "urbanareas"
     DATA "urbanap020"
     STATUS on
     TYPE polygon
     LABELCACHE on
     LABELITEM "NAME"
     MAXSCALE 1999999
     CLASS
          STYLE
               COLOR 212 192 100
               OUTLINECOLOR 0 0 0
          END
          LABEL
               TYPE truetype
               FONT "Arial Bold"
               SIZE 10
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
               POSITION auto
          END
     END
END


#####################################
# Cities layer - State capitals and cities pop. > 1000000
#
LAYER
     NAME "majorcities"
     DATA "citiesx020"
     STATUS default
     TYPE point
     LABELITEM "NAME"
     LABELCACHE on
     LABELMAXSCALE 15000000
     CLASSITEM "FEATURE"
     MINSCALE 2000000
     CLASS
          NAME "State Capitals"
          EXPRESSION /State*/
          STYLE
               SYMBOL "Circle"
               SIZE 6
               COLOR 0 255 0
          END
          LABEL
               TYPE truetype
               FONT "Arial"
               SIZE 9
               POSITION auto
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
          END
     END
     CLASS
          EXPRESSION ([Pop_2000] > 1000000)
          NAME "Major Cities"
          STYLE
               SYMBOL "Circle"
               SIZE 10
               COLOR 255 0 0
          END
          LABEL
               TYPE truetype
               FONT "Arial Bold"
               SIZE 10
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
               POSITION auto
          END
     END
END

#####################################
# Cities layer - Large cities, pop. < 1000000
#
LAYER
     NAME "largecities"
     DATA "citiesx020"
     STATUS default
     TYPE point
     LABELCACHE on
     LABELITEM "NAME"
     MINSCALE 2000000
     CLASS
          EXPRESSION(([Pop_2000]>100000)and([Pop_2000]<=1000000))
          NAME "Cities"
          STYLE
               SYMBOL "Circle"
               SIZE 4
               COLOR 255 0 0
               BACKGROUNDCOLOR 255 0 0
          END
          LABEL
               TYPE truetype
               FONT "Arial"
               SIZE 8
               POSITION auto
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
          END
     END
END

#####################################
# City layer - Cities
LAYER
     NAME "cities"
     DATA "citiesx020"
     STATUS default
     TYPE point
     LABELCACHE on
     LABELITEM "NAME"
     LABELMAXSCALE 500000
     MAXSCALE 2000000
     CLASS
          NAME "Small Cities"
          EXPRESSION ([Pop_2000] < 100000)
          STYLE
               SYMBOL "Circle"
               SIZE 3
               COLOR 255 0 0
          END
          LABEL
               TYPE truetype
               FONT "Arial Bold"
               SIZE 7
               POSITION auto
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
          END
     END
END

#####################################
# State boundaries layer - annotation (for labels)
#
LAYER
     NAME "states"
     DATA "statesp020"
     STATUS on
     TYPE annotation
     LABELCACHE on
     LABELITEM "STATE"
     LABELMINSCALE 2000000
     CLASS
          LABEL
               TYPE truetype
               FONT "Arial Bold"
               SIZE 14           
               OUTLINECOLOR 255 255 255
               COLOR 0 0 0
               MINDISTANCE 200
               MINFEATURESIZE 10
          END
     END
END
END # mapfile

fichier fontset.txt

Arial (TrueType) C:\WINDOWS\Fonts\ARIAL.TTF
Arial Bold (TrueType) C:\WINDOWS\Fonts\ARIALBD.TTF
Arial Italic (TrueType) C:\WINDOWS\Fonts\ARIALI.TTF
Arial Bold Italic (TrueType) C:\WINDOWS\Fonts\ARIALBI.TTF
Times New Roman (TrueType) C:\WINDOWS\Fonts\TIMES.TTF
Times New Roman bold (TrueType) C:\WINDOWS\Fonts\TIMESBD.TTF
Times New Roman italic (TrueType) C:\WINDOWS\Fonts\TIMESI.TTF
Times New Roman bold_italic (TrueType) C:\WINDOWS\Fonts\TIMESBI.TTF
TrebucNet MS (TrueType) C:\WINDOWS\Fonts\trebuc.ttf
Trebuchet MS Bold (TrueType) C:\WINDOWS\Fonts\trebucb.ttf
Trebuchet MS Italic (TrueType) C:\WINDOWS\Fonts\trebuci.ttf
Trebuchet MS Bold Italic (TrueType) C:\WINDOWS\Fonts\trebucbi.ttf

Hors ligne

 

#11 Mon 21 August 2006 18:06

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9855
Site web

Re: installation mapserver

demirmiri a écrit:

fichier fontset.txt

Arial (TrueType) C:\WINDOWS\Fonts\ARIAL.TTF
Arial Bold (TrueType) C:\WINDOWS\Fonts\ARIALBD.TTF
Arial Italic (TrueType) C:\WINDOWS\Fonts\ARIALI.TTF
Arial Bold Italic (TrueType) C:\WINDOWS\Fonts\ARIALBI.TTF
Times New Roman (TrueType) C:\WINDOWS\Fonts\TIMES.TTF
Times New Roman bold (TrueType) C:\WINDOWS\Fonts\TIMESBD.TTF
Times New Roman italic (TrueType) C:\WINDOWS\Fonts\TIMESI.TTF
Times New Roman bold_italic (TrueType) C:\WINDOWS\Fonts\TIMESBI.TTF
TrebucNet MS (TrueType) C:\WINDOWS\Fonts\trebuc.ttf
Trebuchet MS Bold (TrueType) C:\WINDOWS\Fonts\trebucb.ttf
Trebuchet MS Italic (TrueType) C:\WINDOWS\Fonts\trebuci.ttf
Trebuchet MS Bold Italic (TrueType) C:\WINDOWS\Fonts\trebucbi.ttf


Bonjour,
Perso, je n'aurais pas mis "(TrueType)" cela n'apporte rien. En gros pour chaque nom vous avez l'emplacement du fichier TTF. Ce nom ne doit pas contenir d'espace (je pense), et dans votre mapfile vous devez reprendre le même terme. Or dansvotre lmapfile vous utilisez : FONT "Arial Bold" et non FONT "Arial Bold (TrueType)".

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#12 Mon 28 August 2006 15:09

demirmiri
Participant occasionnel
Date d'inscription: 19 Jul 2006
Messages: 10

Re: installation mapserver

Vous voudrez bien m’aider à résoudre ce problème.

Le code javascript intégré dans le fichier html template suivant qui utilise la fonction setmode ().

<script language="JavaScript" type="text/javascript">
<!--
function setMode()
// set map mode to the previous mode
{   document.the_map.mode.selectedIndex=0;
    for (i=0;i<document.the_map.mode.length;i++){
        if (document.the_map.mode[i].value ==
                document.the_map.previousmode.value){
           document.the_map.mode.selectedIndex=i;
        }
    }
};
// -->
</script>

Mais à l’exécution, le message suivant est retourné :



Le code source du fichier html template affichant l’état suivant.

<!-- MapServer version 4.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG -->
<html><!-- fourth.html -->
<head><title>MapServer Fourth Application</title>

<script language="JavaScript" type="text/javascript">
<!--
function setMode()
// set map mode to the previous mode
{   document.the_map.mode.selectedIndex=0;
    for (i=0;i<document.the_map.mode.length;i++){

Ci-joints :

Le map file fourth.html

#####################################
#
# MapServer Fourth application
#

#####################################
# Map object
#
NAME "Fourth"                         # used as base image name
UNITS dd                              # units are decimal degrees
EXTENT -180.0 -85.0 180.0 85.0        # map extent
SIZE 640 320                          # map image size in pixels
IMAGECOLOR 200 225 255                # background color
IMAGETYPE jpeg                        # image type jpeg/gif/png
SHAPEPATH "C:\www\site\www\demumn\"   # path to data directory
FONTSET "C:\www\site\fontset.txt" # pointers to fonts

#####################################
# Web object
#
WEB
    # A header/footer defined in a web object is displayed
    # before/after any individual query response is made.
    # It is displayed only once.
    #
    HEADER "C:\www\site\www\demapserver\chapter05\fourth_web_header.html"
    FOOTER "C:\www\site\www\demapserver\chapter05\fourth_web_footer.html"
    EMPTY  "\fourth_empty.html"             # URL
    TEMPLATE "C:\www\site\www\demapserver\chapter05\fourth.html"         
    IMAGEPATH "C:\www\site\tmp\"
    IMAGEURL "\tmp\"                        # URL
END

#####################################
# Reference map
#
REFERENCE
    IMAGE "c:\www\site\www\demapserver\chapter05\fourth_worldref.gif"
    SIZE 320 160
    EXTENT -180.0 -85.0 180.0  85.0
    STATUS ON
    COLOR -1 -1 -1
    OUTLINECOLOR 255 0 0
END

#####################################
# Querymap object
#
QUERYMAP                     
    STATUS on                # draw query map
    STYLE hilite             # highlight selected feature
    COLOR 255 255 0          # in yellow
    SIZE 320 160
END

####################################
# Country layer
#
LAYER
    NAME "Countries"
    STATUS on
    TYPE polygon
    DATA "countries"

    # A header or footer defined at the layer level is displayed
    # if that layer is a query layer. It is displayed only once.
    #
    HEADER "c:\www\site\www\demapserver\chapter05\fourth_countries_header.html"   
    FOOTER "c:\www\site\www\demapserver\chapter05\fourth_countries_footer.html"   

    TOLERANCE 1             # must be within 1 tolerance unit
    TOLERANCEUNITS miles    # units for tolerance values is miles

    CLASS   
        # A template defined at the class level is used to
        # display the results for each reponse to a query. If a
        # query results in N hits, then the template will be used
        # N times. To be queriable a layer must specify a CLASS
        # level template.
        #
        TEMPLATE "c:\www\site\www\demapserver\chapter05\fourth_countries_query.html"
        STYLE
            COLOR 199 199 199
        END
    END # end class   
END # end layer       

####################################
# Cities layer
#
LAYER
    NAME "Cities"                     
    STATUS on
    TYPE point
    DATA "cities"
    LABELITEM "CITY"        # labels use value in column "CITY"
    LABELCACHE on

    # A header or footer defined at the layer level is displayed
    # if that layer is a query layer. It is displayed only once.
    #
    HEADER "c:\www\site\www\demapserver\chapter05\fourth_cities_header.html"
    FOOTER "c:\www\site\www\demapserver\chapter05\fourth_cities_footer.html"

    TOLERANCE 1             # must be within 1 tolerance unit
    TOLERANCEUNITS miles    # units for tolerance values is miles

    CLASS
        # A template defined at the class level is used to display
        # the results for each reponse to a query. If a result set
        # contains N, then the template will be used N times.
        #
        TEMPLATE "c:\www\site\www\demapserver\chapter05\fourth_cities_query.html"
        STYLE
            COLOR 0 0 0     # symbol color is black
        END
        LABEL           
            TYPE truetype   # use truetype font
            FONT "arialbd"  # use arial bold
            SIZE 8          # use 8 point size
            COLOR 255 0 0   # color text red
            BACKGROUNDCOLOR 255 255 255 # render text on white bg
            MINDISTANCE 50  # labels > 50 pixels apart
            POSITION lc     # center labels below feature
            ANTIALIAS true  # antialias the text
        END # end label       
    END # end class

    # To use information stored in a DBF file external to a shape
    # file requires a JOIN. You must identify the external file
    # with the keyword TABLE. The NAME is the reference to use in
    # the template file. To link the shape to the external DBF,
    # FROM and TO specify the fields that must match.

    JOIN
        TABLE "c:\www\site\www\demapserver\chapter05\fourth_join.dbf"
        NAME "test-join"
        FROM "CITY"
        TO "CITY"
    END 
END # end layer

####################################
# Line layer for Country boundaries
#
LAYER
    NAME "Boundaries"
    STATUS default
    TYPE line
    DATA "countries"
    CLASS
        STYLE
            COLOR 0 0 0
        END
    END # end class
END # end layer

####################################
# Annotation layer for Countries
LAYER
    STATUS DEFAULT          # this layer is always rendered
    TYPE annotation       
    DATA "countries"
    LABELITEM "STATE"       # labels use value in column "STATE"
    LABELCACHE on
    CLASS                   # class renders line & label
        STYLE
            COLOR 0 0 0     # line color is black
        END
        LABEL               
            TYPE truetype   # use truetype font
            FONT "arialbi"  # use arial bold
            SIZE 8          # use 8 point szie
            COLOR 0 0 0     # color text black
            BACKGROUNDCOLOR 255 255 255 # render text on white bg
            MINDISTANCE 50  # labels > 50 pixels apart
            POSITION cc     # labels in center of feature
            ANTIALIAS true  # antialias the text
        END # end label   
    END # end class   
END # end layer

END # end of map file

Le fichier d’initialisation fourth_i.html

<html>
  <head><title>MapServer Fourth Application</title></head>
  <body>

    <form method=GET action="/cgi-bin/mapserv.exe">
        <input type="submit" value="Click Me">

        <input type="hidden" name="program"
               value="mapserv.exe">

        <input type="hidden" name="map"
               value="C:\www\site\www\demumn\fourth.map">

        <input type="hidden" name=zoomsize
               size=2 value=2>

        <input type="hidden" name=map_Cities_tolerance
               size=4 value=100>

        <input type="hidden" name=map_Countries_tolerance
               size=4 value=100>

        <input type="hidden" name="layers"
               value="Cities Countries">

        <input type="hidden" name="slayer"
               value="Countries">

        <input type="hidden" name="mapshape"   value="">
        <input type="hidden" name="imgshape"   value="">
        <input type="hidden" name="imgbox"     value="">
        <input type="hidden" name="qstring"    value="">
        <input type="hidden" name="qlayer"     value="">
        <input type="hidden" name="qitem"      value="">
        <input type="hidden" name="shapeindex" value="">
        <input type="hidden" name="savequery"  value="">

    </form>
  </body>
</html>









Le fichier template fourth.html

<html><!-- fourth.html -->
<head><title>MapServer Fourth Application</title>

<script language="JavaScript" type="text/javascript">
<!--
function setMode()
// set map mode to the previous mode
{   document.the_map.mode.selectedIndex=0;
    for (i=0;i<document.the_map.mode.length;i++){
        if (document.the_map.mode[i].value ==
                document.the_map.previousmode.value){
           document.the_map.mode.selectedIndex=i;
        }
    }
};
// -->
</script>

</head>
<body bgcolor="#E6E6E6" onload="setMode()">

<form name="the_map" method=GET action="[program]"> 

  <font size="4">Query Definition</font>
  <table width="100%" border="1">

     <tr><td width="60%" rowspan="6" align="center">
            <input name="img" type="image" src="[img]"
                   width=640 height=320 border=2>
            <input type="submit" value="Refresh"></td>

         <td width="40%" align="center" colspan="3">
            <img SRC="[ref]" width=320 height=160 border=1>
               </td></tr>

     <tr><td align="left" colspan="2"><font size="-1">
            Map scale:&nbsp &nbsp &nbsp 1:[scale]</font>
               </td></tr>

     <tr><td align="left" colspan="2"><font size="-1">
            Click x,y:&nbsp &nbsp &nbsp &nbsp [mapx], [mapy]
               </font></td></tr>

     <tr><td align="left" colspan="2"><font size="-1">
            Map Extent:&nbsp [mapext]</font></td></tr>

     <tr><td align="center"><B>Navigation</B></td>
         <td align="center"><B>Layers</B></td></tr>

     <tr><td align="left">
            <input type=radio name=zoomdir
                   value=0 [zoomdir_0_check]> Pan <BR>
            <input type=radio name=zoomdir
                   value=1 [zoomdir_1_check]> Zoom In <BR>
            <input type=radio name=zoomdir
                   value=-1 [zoomdir_-1_check]> Zoom Out <BR>
            <input type=text name=zoomsize
                   size=3 value=[zoomsize]> Size </td>

         <td align="left">
            <input type="checkbox" name="layer"
                   value="Cities" [Cities_check]>
                   Cities <BR>
            <input type="checkbox" name="layer"
                   value="Countries" [Countries_check]>
                   Countries</td></tr>

     <tr><td colspan="3" align="center"><B>Query</B></td></tr>
     <tr><td colspan="3" align="center">
          <table><tr><td rowspan=1 valign="top">
                         Map Mode:</td>

                     <td rowspan=1 valign="top" align="left">
                         <select name="mode">
                               <option value="browse">
                            Browse</option>
                               <option value="query">
                            Query</option>
                               <option value="nquery">
                            Nquery</option>
                               <option value="itemquery">
                            Itemquery</option>
                               <option value="itemnquery">
                            Itemnquery</option>
                               <option value="featurequery">
                            Featurequery</option>
                               <option value="featurenquery">
                            Featurenquery</option>
                               <option value="itemfeaturequery">
                            Itemfeaturequery</option>
                               <option value="itemfeaturenquery">
                            Itemfeaturenquery</option>
                               <option value="indexquery">
                            Indexquery</option>
                         </select></td>

                     <td align="right">
                         Query layer:</td>
                     <td align="left">
                         <input type=text name="qlayer" size=10
                                value="[qlayer]"></td>

                     <td align="right">
                         imgbox coords:</td>
                     <td align="left">
                         <input type=text name=imgbox size=25
                                value=[imgbox]></td></tr>

                 <tr>
                     <td></td>
                     <td></td>

                     <td align="right">
                         Query item:</td>
                     <td align="left">
                         <input type=text name="qitem" size=10
                                value="[qitem]"></td>

                     <td align="right">
                         imgshape coords:</td>
                     <td align="left">
                         <input type=text name="imgshape" size=25
                                value="[imgshape]"></td></tr>

                 <tr>
                     <td></td>
                     <td></td>

                     <td align="right">
                         Query string:</td>
                     <td align="left">
                         <input type=text name=qstring size=25
                                value=[qstring]></td>

                     <td align="right">
                         mapshape coords:</td>
                     <td align="left">
                         <input type=text name="mapshape" size=25
                                value="[mapshape]"></td></tr>

                 <tr>
                     <td></td>
                     <td></td>
                     <td align="right">
                         Cities Tolerance:</td>
                     <td align="left">
                         <input type=text
                                name=map_Cities_tolerance size=4
                                value=[map_Cities_tolerance]>
                                miles</td>

                     <td align="right">
                         Shape index:</td>
                     <td align="left">
                         <input type=text name=shapeindex size=10
                                value=[shapeindex]></td></tr>

                 <tr>
                     <td></td>
                     <td></td>
                     <td align="right">
                         Countries Tolerance:</td>
                     <td align="left">
                         <input type=text
                                name=map_Countries_tolerance size=4
                                value=[map_Countries_tolerance]>
                                miles</td>

                     <td align="center" colspan=2 bgcolor="#F5A5A5">
                         Feature query select layer:
                         <em>Countries</em></td></tr>

          </table>
         </td></tr>
    </table>

    <input type="hidden" name="imgxy" value="320 160">
    <input type="hidden" name="imgext" value="[mapext]">
    <input type="hidden" name="map" value="[map]">
    <input type="hidden" name="program" value="[program]">
    <input type="hidden" name="slayer" value="Countries">
    <input type="hidden" name="previousmode" value="[previousmode]">
    <input type="hidden" name="savequery" value="true">
</form>
</body>
</html>

Hors ligne

 

#13 Tue 07 November 2006 13:30

demirmiri
Participant occasionnel
Date d'inscription: 19 Jul 2006
Messages: 10

Re: installation mapserver

Je suis à la rechercehe de documents sur CARTOWEB WITH DEMO 3.0.0 que j'ai installé sous Windows. Merci

Hors ligne

 

#14 Tue 07 November 2006 14:10

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9855
Site web

Re: installation mapserver

Bonjour,

Vous avez des documents ici dont la traduction de la doc (en cours) ici :
http://www.alolise.org/wiki/index.php?t … e_CartoWeb
Vous avez bien entendu la doc sur http://www.cartoweb.org et le wiki qui propose quelques how-to (en anglais).

Cordialement,

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

Pied de page des forums

Powered by FluxBB