Monga Mapserver ntchito

Nthawi yapitayi yomwe tinayankhula pazifukwa zina MapServer ndi zofunikira za kukhazikitsa. Tsopano tiyeni tiwone zina mwa ntchitoyi mu masewera olimbitsa thupi ndi mapu a Chiapaneco makapu.

mapserver geoserver Kumene kuli kukwera

Apache ikadakhazikitsidwa, zolemba zosasinthika za MapServer ndizomwe zili OSGeo4W pamwambapa C: /

M'kati, muli mafoda osiyana ndi mapulogalamu malinga ndi zomwe zaikidwa, koma foda yoyenera iyenera kupita mkati mwa Apache. Pankhani iyi foda yotchedwa gis.

  • Ndiye mkati, foda ya deta ili ndi zigawo, orthophoto, ndi zina zotero.
  • Mu foda yowonjezera, palinso maofesi a mtundu weniweni omwe amagwiritsidwa ntchito pa malembo, ndikulumikizidwa .ttf. Pano pali fayilo ya txt imene imawakweza iwo ndi ena omwe amafotokoza zizindikiro.
  • Ndipo potsiriza mu fayilo httdocs pitani masamba omwe akukweza utumiki.
  • mapserver geoserver

Tsamba la intaneti

Mu chitsanzo, ine ndikugwiritsa ntchito vuto lomwe linasonyezedwa nthawi yapitayi. Kwenikweni liri ndi fayilo ya ndondomeko yomwe imakonzeretsanso ku phtml extension, ndipo izi zimabweretsa ntchito zomangidwa pa php ndi mapu. Foda ili ndi zithunzi zojambulidwa kuchokera patsamba.

mapserver geoserver

Ngati tiyang'ana, phtml ndi chigoba chokha chomwe chimapangidwa kuchokera pa matebulo, ndipo amatchedwa ntchito mapaprosoftcript / php. Muyenera kuimirira pogwiritsa ntchito:

http://localhost/gis/gispalenque.phtml

Zotsatira zikuwonetsedwa pansipa:

  • mpaka pakati pa ntchito GMapDrawMap (),
  • kumanja kumene kuyitanidwa Keypap GMapDrawKeyMap (),
  • bhala laling'ono pansipa GMapDrawScaleBar (),
  • ndipo ngati ntchito yothandizira, chikhalidwe chokhudza listbox ngati (!HTMLml ()) imati "<! -" ndi zosankha: ZOOM_IN, ZOOM_OUT, RECENTER, QUERY_POINT.

Kuyambira kale, mawonetsedwe akuwoneka ngati awa:

mapserver geoserver

Mafayi .map

Kuphatikizidwa kwa Mapserver kabukuka ndi zomwe apache akukweza, zomwe zimatumiza php kudutsa mapscript ndiyeno izo zimadutsa mu chipolopolo chimenecho. Koma sayansi yambiri ili m'mafayi .map, zomwe siziyenera kusokonezedwa ndi zomwe zimapangidwa ndi Mapinfo, Zowonjezera kapena Mobile Mapper Office yomwe ikuwonjezera.

Izi ndi mapepala a mauthenga, omwe ali ndi mapu ngati mawonekedwe. Izi zingathe kukhazikitsidwa ndi mapulogalamu a pakompyuta monga Quantum GIS, ngati atayikidwa pali imodzi pamapu akulu, imodzi ya Keymap ndi ziwiri kwa ma WG a wms services ndi wfs. Tiyeni tiwone momwe mapepala amalemba:

MAP

NAME PALENQUE_DEMO
STATUS ON
SIZE 600 450
SYMBOLSET ../etc/symbols.txt
ZIZINDIKIRO ZA 604299 1933386 610503 1939300 # KUTHA KWA MAPA OMWE A PALENQUE
#EXTENT 605786 1935102 608000 1938800 #SOLO CHIKHALIDWE CHA 01
MITETU YA UNITS
SHAPEPATH "../data"
TRANSPARENT ON
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt

  • MAP imasonyeza kuti mawuwo ayamba
  • STATUS, ikuwonetsa ngati mapu osasintha alipo kapena ayi
  • SIZE ndi kukula kwawonetsera
  • SYMBOLSET imasonyeza njira ya zizindikiro
  • EXTENT ndi makonzedwe awonetsedwe. Chizindikiro # chimagwiritsidwa ntchito kupanga ndondomeko
  • UNITS kwa magulu
  • SHAPEPATH, njira yomwe zigawozo zili
  • Onse kumapeto adzatha ndi lamulo END

M'kati, chikhocho chimayamba ndi mzere wa lamulo, ndipo chimatha ndi END, mwachitsanzo pazomwe zilili ndipamwamba kwambiri; zojambula zazithunzi zosakhalitsa:

intaneti
MINSCALE 2000000
MAXSCALE 50000000

IMAGEPATH "C: \ OSGeo4W / tmp / ms_tmp /"
IMAGEURL "/ ms_tmp /"
TSIRIZA

mapserver geoserverMzere wazitali:

SCALEBAR
IMAGECOLOR 255 255 255
LABEL
COLOR 0 0 0
SIZE SMALL
TSIRIZA
SIZE 300 5
COLOR 255 255 255
BACKGROUNDCOLOR 0 0 0
OUTLINECOLOR 0 0 0
UNITS makilomita
ZOKHUDZA 3
STATUS ON
TSIRIZA

mapserver geoserverMndandanda wa raster: omwe amapita ku thumba, ndi kufotokozera mu mndandanda ngati "Ortofoto", kuchokera ku tiff yomwe ili mu foda ya data:

LAYER
NAME orthophoto
METADATA
"DESCRIPTION" "OrtoFoto"
TSIRIZA
TYPE OTHANDIZA
STATUS OFF
DATA "C: \ OSGeo4W / apps / gis / data / ortofotoGral.tif"
#OFFSITE 0 0 0
TSIRIZA

Pulogalamu ya polygoni, yotsatiridwa ndi ndondomeko, kulemba zina pa html template, ndi sans font label, kukula kwa 6, mtundu wakuda ndi zoyera za 5 buffer ...

mapserver geoserver

LAYER
NAME NAME02Zone
TYPE POLYGON
STATUS OFF
TRANSPARENCY 50
EXTENT 607852 1935706 610804 1938807 METADATA
"ZINTHU ZOFUNIKA" "Zotsatila ndi Phindu la Makampani 02"
"RESULT_FIELDS" "MsLink Cve_Mz Cve_Pred prop Area Perimeter VALUE"
TSIRIZA
DATA PALENQUE_SECTOR01
YEREKANI "ttt_query.html"
KUKHULUPIRIRA 5
#TOLERANCEUNITS PIXELS
LABELITEM "VALOR"
CLASSITEM "VALOR"
LABELCACHE ON
CLASS
SYMBOL 1
COLOR 128 128 128
OUTLINECOLOR 0 0 0
NAME "ZoneNULL"
EXPRESSION ([VALUE] = 0)
LABEL
ANGLE AUTO
COLOR 0 0 0
TIZANI popanda
TYPE TRUETYPE
POSITION cc

ANTHU OYERA
BUFFER 5
SIZE 6
OUTLINECOLOR 200 200 200
TSIRIZA
END # mtengo wa 0
CLASS
SYMBOL 3
COLOR 255 128 128
#Color -1 -1 -1 #SIN kudzazidwa

... ndi zina zotero mpaka kutseka

TSIRIZA
END #Class Value
END # Mzere

Kutsiriza

Choncho, ntchito ndi MapServer, ngakhale wosavuta, kumakhaladi njira zovuta ndi operewera kwambiri kwa ntchito yaikulu kwambili cifukwa zonse zili .map lapansi. The sangathe lalikulu ndi kuti zonse zichitike wapansi, monga liwulo aliyense mtundu mu theming, choncho uka zipangizo monga CartoWeb, ntchito pa MapServer koma kumabweretsa mapulagini anamanga ndi zitsanzo ndi mbali kuti zimenezi Baibulo wosazindikira kukhalabe ndi readme poyamba:

  • Gwiritsani ntchito mafelemu osiyana, ndi AJAX kuti muwatsitsimutse mosiyana
  • Lembetsani kachidindo, munaperekanso zikalata zolemba .map pogwiritsa ntchito zifukwa zosinthika
  • Mphamvu imabweretsanso kusamukirako popanda kubwezeretsa, monga ngati chingwe chodutsa
  • Mndandanda wamakono pa intaneti, zolembera mwamsanga pa cache
  • Tsitsani zosanjikiza mu vector mawonekedwe
  • Tumizani ku Google Earth
  • Pangani pulogalamu ya kutumizidwa

M'kutsatira tidzayang'ana CartoWeb, apa ndikusiya kulumikizana kwa zitsanzo zazikulu.

Mayankho a 3 ku "Momwe Mapserver amagwirira ntchito"

  1. moni,

    Ndikuyesera kutcha chingwe kuchokera ku .map, motere:

    LAYER
    Malo osindikizira a NAME
    TIZANI POINTO
    CONNECTIONTYPE OGR
    KONTANI # # virtual.ovf »
    »

    xxxxx
    EXEC ......
    eess_id
    wkbPint
    WGS84

    »

    Vuto langa ndikuti ntchito ya DSN ikupereka mavuto: mukafunsa a GetCapability kuti ndikubweza mawu achinsinsi ... nditha kuyimba fayilo kuti mupewe "kupereka" mawu achinsinsi kapena ndi cholakwika cha DSN? Zikomo!

  2. MapServer ndi polojekiti yotchuka ya Open Source yomwe cholinga chake chikuwonetsa mapu a malo othamanga pa intaneti. Galimoto yoyendetsedwa ndi galimoto yomwe imapangidwira kufolda yopanda kanthu pamtundu umene umagwiritsa ntchito ma fayilo a NTFS. Maulendo okwera amatha kugwira ntchito ngati njira zina zilizonse, koma amapatsidwa njira zoyendetsera galimoto m'malo mwa makalata oyendetsa galimoto.

Siyani yankho

Anu email sati lofalitsidwa.

Tsambali likugwiritsa ntchito Akismet kuchepetsa spam. Phunzirani momwe deta yanu ikufotokozera.