Njengoko Mapserver isebenza

ixesha lokugqibela sathetha ngayo kutheni ezinye iikhrayitheriya MapServer kunye neziseko zofakelo. Ngoku makhe sibone ukusebenza kwayo kwindlela yokusebenza kunye neemaphu zeCuapaneco.

i-mapserver geoserver Apho iphakanyisiwe khona

Emva kokuba i-Apache efakwe, isixhobo sokushicilela esingagqibekanga seMapServer yifolda OSGeo4W ngqo kwi C: /

Ngaphakathi, kukho iifolda ezahlukileyo kunye nezicelo kuxhomekeke kwinto efakweyo, kodwa ifolda yokupapashwa kufuneka ihambe ngaphakathi kwe-Apache. Kule meko ifolda ebizwa ngokuthi gis.

  • Emva koko ngaphakathi, ifolda yedata iqulethe iibonda, i-orthophoto, njl
  • Kwifolda njl., Kukho iifom zolu hlobo olusetyenziselwa iilebula, kunye nokwandiswa .ttf. Kwakhona iifayile ye-txt ephakamisa yona enye enye ichaza iimpawu.
  • Kwaye ekugqibeleni kwifolda ye-httdocs iya kumaphepha ewebhu aphakamisa inkonzo.
  • i-mapserver geoserver

Ikhasi lewebhu

Kulo mzekelo, ndiza kusebenzisa ityala eliboniswe kwangaphambili. Eyona nto iqulethe ifayile yenkcazo ebuyisela enye yokongezwa kwe-phtml, kwaye ngoku kuphakamisa imisebenzi eyakhiwe kwi-php kunye neemephu. Ifolda iqulethe imifanekiso edibeneyo ukusuka kwiphepha.

i-mapserver geoserver

Ukuba sibukeka, i-phtml kuphela ikhebhile eyakhiwe ukusuka kwiibhulawu, kwaye ibizwa ngemisebenzi yamamephu / php. Ufanele uvuke usebenzisa:

http://localhost/gis/gispalenque.phtml

Isiphumo siboniswe ngezantsi:

  • ukuya kumbindi umsebenzi GMapDrawMap (),
  • ngakwesokudla umnxeba GMapDrawKeyMap keymap (),
  • ibha yesikali ngaphantsi GMapDrawScaleBar (),
  • kwaye xa kwenzeka imisebenzi yokuthunyelwa, imeko ephathelele uluhlu lwebhokisi ukuba (! IsHtmlMode ()) echo "<! -" ngezigqibo: ZOOM_IN, ZOOM_OUT, RECENTER, QUERY_POINT.

Sekuvele isebenza, isibonakaliso sifana nale:

i-mapserver geoserver

Iifayile .map

Ukudibaniswa kwephepha leMapserver kukuthi yiyiphi i-Apache ephakamisayo, eyathumela php maphepha kwaye emva koko igobolondo. Kodwa ininzi yesayensi iifayile ze .map, ezingafanelanga ukudideka kunye nezo zenziwe yi-Mapinfo, i-Manifold okanye i-Mobile Mapper Office eneenkcukacha ezifanayo.

Ezi .map ziifayile zetekisi, eziqule imephu ngendlela yeskripthi. Ezi zinokudalwa ngeeprodeskthi ezifana ne-Quantum GIS, ukuba zisetyenzisiwe enye enye imephu ephambili, enye ye-Keymap kunye neyesibini ze-OGC iinkonzo ze-wms kunye ne-wfs. Makhe sibone indlela i-mapscript isebenza ngayo:

MAP

IGAMA PALENQUE_DEMO
STATUS ON
SIZE 600 450
SYMBOLSET ../etc/symbols.txt
I604299 1933386 610503 1939300 I-XNUMX # IMIBUZO YONKE IPHEPHA LEPALENQUE
#EXTENT 605786 1935102 608000 1938800 #SOLO I-01 SECTOR
METERS
SHAPEPATH "../data"
UKUPHATHA
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt

  • I-MAP ibonisa ukuba uqala iskripthi
  • I-STATUS, ibonisa ukuba imephu engagqibekanga ikhona okanye ayikho
  • SIZE ubukhulu bomboniso
  • I-SYMBOLSET ibonisa indlela yeempawu
  • I-EXTENT idibaniseli yesibonakaliso. Isimboli # se tyenziswe ukwenza izichasiselo
  • UNITS kwiiyunithi
  • SHAPEPATH, indlela apho iziqendu zikhona
  • Zonke ekupheleni ziya kugqitywa ngomyalelo we-END

Ngaphakathi, ikhowudi iqala ngomgca womyalelo, kwaye iphelela ngo-END, umzekelo kumgangatho osisiseko kunye nesisigxina; lwemifanekiso yeemifanekiso zesikhashana:

WEB
IXHUMA 2000000
MAXSCALE 50000000

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

i-mapserver geoserverIbha yokulinganisa:

I-SCALEBAR
IMAGECOLOR 255 255 255
LABEL
I-COLOR 0 0 0
SIZE EZINYE
ISIPHELO
SIZE 300 5
I-COLOR 255 255 255
I-BACKGROUNCOLOR 0 0 0
OUTLINECOLOR 0 0 0
Iikhilomitha ze-UNITS
I-INTERVALS 3
STATUS ON
ISIPHELO

i-mapserver geoserverUluhlu lwe-raster: oluya kwingxowa-mali, ngokuchazwa kwoluhlu olufana ne "Ortofoto", ukusuka kwi-tiff ekhompyutheni yedatha:

LAYER
NAME orthophoto
METADATA
"INKCAZELO" "I-OrtoFoto"
ISIPHELO
TYPE RASTER
ISIHLOKO
INGXELO "C: \ OSGeo4W / apps / gis / data / ortofotoGral.tif"
#OFFSITE 0 0 0
ISIPHELO

Umgca we-shp wee-polygons, ezixhomekeke kwimilinganiselo, ukuphakamisa idatha ethile kwi-template ye-html, ne-label ye-sans font, ubukhulu be6, umbala omnyama kunye nomgca omhlophe we-5 buffer ...

i-mapserver geoserver

LAYER
ISIGABA02Zone
TYPE POLYGON
ISIHLOKO
I50
I607852 1935706 610804 1938807 METADATA
"INKCAZELO" "I-Thematic by Value Sector 02"
"RESULT_FIELDS" "UNkskink Cve_Mz Cve_Pred Indawo yePerimeter VALUE"
ISIPHELO
IINKONZO PALENQUE_SECTOR01
I-TEMPLATE "ttt_query.html"
TOLERANCE 5
#TOLERANCEUNITS PIXELS
LABELITEM "VALOR"
CLASSITEM "VALOR"
LABELCACHE ON
CLASS
I-SYMBOL 1
I-COLOR 128 128 128
OUTLINECOLOR 0 0 0
IGAMA "IndawoNULL"
UKUPHUMA ([VALUE] = 0)
LABEL
I-ANGLE AUTO
I-COLOR 0 0 0
FONT ngaphandle
TYPE TRUETYPE
POSITION cc

ABANTU ABAKHULU
BUFFER 5
SIZE 6
OUTLINECOLOR 200 200 200
ISIPHELO
END # # value 0
CLASS
I-SYMBOL 3
I-COLOR 255 128 128
#COLOR -1 -1 -1 #SIN UKUFALISA

... kwaye njalo kuze kube sekupheleni

ISIPHELO
END # # Value Value
IPHEPHA # Uluhlu

Ukugqiba

Ngenxa yoko, ukusebenza kunye MapServer, nangona ilula, kuba iindlela ezintsonkothileyo encinane kakhulu imisebenzi emikhulu kuba yonke into kwi .map. Esi sithintelo inkulu kukuba yonke yenziwe ngeenyawo, ezifana ukuchaza umbala nganye theming, ngoko ke kuvela izixhobo ezifana CartoWeb, ukusebenza MapServer kodwa izisa plugins yakhiwe nemizekelo kunye neempawu ezenza le nguqulelo zakudala baqhubeke i ukufunda kuqala:

  • Umsebenzi ohlukeneyo, kunye ne-AJAX ukuze uhlaziywe ngokwahlukileyo
  • Phakamisa ikhowudi, ngaphandle kokuba i-script iphinde ibhale kwakhona .map ngokubhekiselele kwiimpawu ezikhethiweyo
  • Ukubuya ngokukhawuleza ngaphandle kokufuna ukuhlaziywa, njengokungathi kuluhlu lwesaqa
  • Ukulungiswa kwe vector kwi-intanethi, ukubhalwa kwangoko kwi-cache
  • Uluhlu lokulayisha kwifom ye vector
  • Thumela kwiGoogle Earth
  • Qalisa iPaul of the deployment

Ngomnye siza kujonga iCartoWeb, apha ndiyishiye ikhonkco kwimimiselo ephambili.

Iimpendulo ze-3 "Indlela iMapserver isebenza ngayo"

  1. Sawubona,

    Ndizama ukubiza umgca ukusuka kwi .map, ngale ndlela:

    LAYER
    Izindlu zokuhlola zegama
    TYPE POINT
    UQHUBELELO LWE-OGR
    Qhagamshela
    »

    xxxxx
    EXEC ......
    eess_id
    wkbPoint
    WGS84

    »

    Ingxaki yam kukuba inkonzo ye-DSN inika iingxaki: xa ndicela i-GetCapability ukuba ndibuyisele i-password ... ndinga faka umnxeba kwifayile ukunqanda "ukunika" ipassword okanye yimpazamo ye-DSN? Enkosi!

  2. I-MapServer yiprojekthi evulekileyo ye-Open Source enenjongo yokubonisa iimophu ezinamandla zendawo kwi-intanethi. Umqhubi oqhubekileyo ngumqhubi odweliswe kwifolda engenanto kwivolumu esebenzisa inkqubo yefayile ye-NTFS. Umsebenzi oqhubekileyo oqhuba njengamanye aqhubayo, kodwa anikwe iindlela zokuqhuba endaweni yokubhala iileta.

Shiya impendulo

Idilesi yakho ye email aziyi kupapashwa.

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda indlela idatha yakho yokubhaliweyo isetyenziswe ngayo.