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

GEODATA DAYS 2024

#1 Fri 03 May 2013 11:39

tima
Juste Inscrit !
Date d'inscription: 3 May 2013
Messages: 4

mapserver

je suis une stagiaire et je veux afficher mon fichier mapfil sous openlayer

voila mon mapfil:
******
MAP
  NAME "QGIS-MAP"
  # Map image size
  SIZE 100 100
  UNITS meters
  SHAPEPATH '../htdocs/data/'
  EXTENT 373363.571767 209974.231693 383768.183072 214585.262078
  #FONTSET './fonts/fonts.txt'
  #SYMBOLSET './symbols/symbols.txt'
  PROJECTION
    'proj=lcc'
    'lat_1=33.3'
    'lat_0=33.3'
    'lon_0=-5.4'
    'k_0=0.999625769'
    'x_0=500000'
    'y_0=300000'
    'a=6378249.2'
    'b=6356515'
    'towgs84=31,146,47,0,0,0,0'
    'units=m'
    'no_defs'
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 255 255 255
  IMAGEQUALITY 95
  IMAGETYPE png

  OUTPUTFORMAT
    NAME png
    DRIVER 'GD/PNG'
    MIMETYPE 'image/png'
    IMAGEMODE RGBA
    EXTENSION 'png'
  END
  # Legend
  LEGEND
      IMAGECOLOR 255 255 255
    STATUS ON
    KEYSIZE 18 12
    LABEL
      TYPE BITMAP
      SIZE MEDIUM
      COLOR 0 0 89
    END
  END

  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
    # Set IMAGEPATH to the path where MapServer should
    # write its output.
    IMAGEPATH 'C:\ms4w\tmp\ms_tmp'

    # Set IMAGEURL to the url that points to IMAGEPATH
    # as defined in your web server configuration
    IMAGEURL '/ms_tmp/'

    # WMS server settings
    METADATA
      'wms_title'           'QGIS-MAP'
      'wms_onlineresource'  'http://localhost:8080/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/pipes.map&'
      'wms_srs'             'EPSG:26191'
    END

    #Scale range at which web interface will operate
    # Template and header/footer settings
    # Only the template parameter is required to display a map. See MapServer documentation
    TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
  END

  LAYER
    NAME 'Pipes'
    TYPE LINE
    DUMP true
    TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
  EXTENT 373363.571767 209974.231693 383768.183072 214585.262078
    DATA '../htdocs/data/Pipes.shp'
    METADATA
      'wms_title' 'Pipes'
    END
    STATUS OFF
    TRANSPARENCY 100
    PROJECTION
    'proj=lcc'
    'lat_1=33.3'
    'lat_0=33.3'
    'lon_0=-5.4'
    'k_0=0.999625769'
    'x_0=500000'
    'y_0=300000'
    'a=6378249.2'
    'b=6356515'
    'towgs84=31,146,47,0,0,0,0'
    'units=m'
    'no_defs'
    END
    CLASS
       NAME 'Pipes'
       STYLE
         WIDTH 4.41
         COLOR 86 236 186
       END
    END
  END

END
******

le fichier javascript:
**************
MAP
  NAME "QGIS-MAP"
  # Map image size
  SIZE 100 100
  UNITS meters
  SHAPEPATH '../htdocs/data/'
  EXTENT 373363.571767 209974.231693 383768.183072 214585.262078
  #FONTSET './fonts/fonts.txt'
  #SYMBOLSET './symbols/symbols.txt'
  PROJECTION
    'proj=lcc'
    'lat_1=33.3'
    'lat_0=33.3'
    'lon_0=-5.4'
    'k_0=0.999625769'
    'x_0=500000'
    'y_0=300000'
    'a=6378249.2'
    'b=6356515'
    'towgs84=31,146,47,0,0,0,0'
    'units=m'
    'no_defs'
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 255 255 255
  IMAGEQUALITY 95
  IMAGETYPE png

  OUTPUTFORMAT
    NAME png
    DRIVER 'GD/PNG'
    MIMETYPE 'image/png'
    IMAGEMODE RGBA
    EXTENSION 'png'
  END
  # Legend
  LEGEND
      IMAGECOLOR 255 255 255
    STATUS ON
    KEYSIZE 18 12
    LABEL
      TYPE BITMAP
      SIZE MEDIUM
      COLOR 0 0 89
    END
  END

  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
    # Set IMAGEPATH to the path where MapServer should
    # write its output.
    IMAGEPATH 'C:\ms4w\tmp\ms_tmp'

    # Set IMAGEURL to the url that points to IMAGEPATH
    # as defined in your web server configuration
    IMAGEURL '/ms_tmp/'

    # WMS server settings
    METADATA
      'wms_title'           'QGIS-MAP'
      'wms_onlineresource'  'http://localhost:8080cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/pipes.map&'
      'wms_srs'             'EPSG:26191'
    END

    #Scale range at which web interface will operate
    # Template and header/footer settings
    # Only the template parameter is required to display a map. See MapServer documentation
    TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
  END

  LAYER
    NAME 'Pipes'
    TYPE LINE
    DUMP true
    TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
  EXTENT 373363.571767 209974.231693 383768.183072 214585.262078
    DATA '../htdocs/data/Pipes.shp'
    METADATA
      'wms_title' 'Pipes'
    END
    STATUS OFF
    TRANSPARENCY 100
    PROJECTION
    'proj=lcc'
    'lat_1=33.3'
    'lat_0=33.3'
    'lon_0=-5.4'
    'k_0=0.999625769'
    'x_0=500000'
    'y_0=300000'
    'a=6378249.2'
    'b=6356515'
    'towgs84=31,146,47,0,0,0,0'
    'units=m'
    'no_defs'
    END
    CLASS
       NAME 'Pipes'
       STYLE
         WIDTH 4.41
         COLOR 86 236 186
       END
    END
  END

END
*****

mercii à vous

Dernière modification par tima (Fri 03 May 2013 11:42)

Hors ligne

 

#2 Fri 03 May 2013 11:49

Renaud
Membre
Lieu: Ploemeur (56)
Date d'inscription: 9 Mar 2006
Messages: 2315

Re: mapserver

Bonjour,

La question aura plus sa place ici.
Je pense qu'il faudra la détailler : qu'est-ce qui bloque pour la publication ?


Renaud Mouche

Hors ligne

 

#3 Fri 03 May 2013 12:19

tima
Juste Inscrit !
Date d'inscription: 3 May 2013
Messages: 4

Re: mapserver

Bonjour,
j'arrive pas à voir mes couches, le code affiche la map plus  un truc en rose


merci M Renaud,

Hors ligne

 

#4 Fri 03 May 2013 12:23

tima
Juste Inscrit !
Date d'inscription: 3 May 2013
Messages: 4

Re: mapserver

mes couches sont en projection Lambert Conique conforme SRS: 26191
mon objective est de diffuser mes layer (WMS WFS) en utilisant Gqis, mapserver, et openlayers

Hors ligne

 

#5 Fri 03 May 2013 22:18

tima
Juste Inscrit !
Date d'inscription: 3 May 2013
Messages: 4

Re: mapserver

votre aide s'il vous plait!!!! sad

Hors ligne

 

Pied de page des forums

Powered by FluxBB