Ta yaya Workserver Works

A baya lokacin da muka yi magana game da wasu sharuddan dalilin da ya sa MapServer da kuma tushen kayan shigarwa. Yanzu bari mu ga wasu daga cikin aiki a cikin wani motsa jiki tare da taswirar Chiapanecans.

mai kula da geoserver Inda aka saka

Da zarar an shigar da Apache, jagorar da aka buga na MapServer shi ne babban fayil na OSGeo4W kai tsaye kan C: /

A ciki, akwai manyan fayiloli tare da aikace-aikace dangane da abin da aka shigar, amma babban fayil don wallafawa dole ne ya shiga ciki. A wannan yanayin babban fayil da ake kira gis.

  • Sa'an nan a ciki, babban fayil ɗin data yana ƙunshe da yadudduka, kothophoto, da dai sauransu.
  • A cikin babban fayil da sauransu, siffofin irin gashin da aka yi amfani da su don alamun, tare da tsawo .ttf. Har ila yau a nan fayil txt ne wanda yake ɗaga su da kuma wani da yake fassara alamomi.
  • Kuma a karshe cikin babban fayil httdocs je shafukan intanet wanda ke tayar da sabis ɗin.
  • mai kula da geoserver

Shafin yanar gizo

A misali, zan yi amfani da yanayin da aka nuna a baya. Yana da ƙila ya ƙunshi fayil ɗin index wanda ke turawa zuwa tsawo na phtml, wannan kuma yana ɗaga ayyukan da aka gina akan php da taswira. Babban fayil yana ƙunshe da hotunan da aka danganta daga shafin.

mai kula da geoserver

Idan muka duba, phtml ne kawai harsashi da aka gina daga tebur, kuma ana kira zuwa ayyukan kwamfuta / php. Ya kamata ka tashi ta amfani da:

http://localhost/gis/gispalenque.phtml

Da ke ƙasa shine sakamakon:

  • zuwa cibiyar aikin GMapDrawMap (),
  • a hannun dama kira zuwa keymap GMapDrawKeyMap (),
  • sikelin da ke ƙasa GMapDrawScaleBar (),
  • kuma idan akwai ayyukan aiki, wani yanayin game da jerin akwatin idan (! IsHtmlMode ()) yayi kira "<! -" tare da yanke shawara: ZOOM_IN, ZOOM_OUT, RECENTER, QUERY_POINT.

Tuni ya gudana, abubuwan da suke ciki suna kama da wannan:

mai kula da geoserver

Fayil .map

Haɗuwa da littattafan Taswirar suna cikin abin da Apache yake ɗagawa, wanda ya aika php ta hanyar Taswirar sa'an nan kuma ya wuce ta wannan harsashi. Amma yawancin kimiyya na cikin fayilolin .map, wanda bazai dame shi ba da wadanda Mapinfo, Manifold ko Mobile Mobile Office ya samar da wannan tsawo.

Wadannan .map su ne fayilolin rubutu, wanda ya ƙunshi taswirar ta hanyar rubutun. Ana iya kirkirar waɗannan abubuwa tare da shirye-shiryen bidiyo irin su Quantum GIS, idan an saita su akwai ɗaya domin taswirar maɓallin, ɗaya don Maɓallin Taswirar da biyu don ayyukan OGC wms da wfs. Bari mu ga yadda tasirin ayyukan ke aiki:

MAP

NAME PALENQUE_DEMO
STATUS ON
SIZE 600 450
SYMBOLSET ../etc/symbols.txt
XTUM 604299 1933386 610503 1939300 BABI NA KUMA NA PALENQUE
#EXTENT 605786 1935102 608000 1938800 #SOLO DA HANNAN 01
SABARI METERS
SHAPEPATH "../data"
GASKIYA ON
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt

  • MAP ya nuna farawa rubutun
  • STATUS, ya nuna ko yanayin da aka riga ya kasance a kan ko a'a
  • SIZE shine girman girman nuni
  • SYMBOLSET yana nuna hanyar alamun
  • ƘARANYIN sune halayen nuni. Ana amfani da alamar # don yin bayani
  • Ƙungiyoyi don raka'a
  • SHAPEPATH, hanyar da yadudduka suke
  • Komai a karshen zai ƙare tare da umurnin END

A ciki, lambar ke farawa tare da layin umarni, kuma ƙare tare da END, misali don ƙananan da iyakar sikelin; shugabancin hotuna na wucin gadi:

WEB
MINSCALE 2000000
MANSCALE 50000000

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

mai kula da geoserverA sikelin bar:

SCALEBAR
IMAGECOLOR 255 255 255
LABEL
0 0 0 COLOR
SIZE SMALL
KARSHEN
SIZE 300 5
255 255 255 COLOR
0 0 0 BACKGROUNDCOLOR
0 0 0 SANTAWA
Sassan kilomita
3 INTERVALS
STATUS ON
KARSHEN

mai kula da geoserverA Layer na raster: Wannan ke da asusun, tare da bayanin a cikin listing kamar "Ortofoto", daga tiff located a cikin fayil bayanai:

LAYER
Sunan tsohuwar
METADATA
"Bayyana" "OrtoFoto"
KARSHEN
TYPE KASA
KASHE KASHE
DATA "C: \ OSGeo4W / apps / gis / data / ortofotoGral.tif"
#OFFSITE 0 0 0
KARSHEN

Wani shp Layer na polygons, da aka sanya su bisa ka'idodin, ɗauke da wasu bayanai a kan samfurin html, tare da lakabin rubutu, size 6, launi launi da fari na zanen 5 ...

mai kula da geoserver

LAYER
Sashen NAME02Zone
TYPE POLYGON
KASHE KASHE
50 TRANSPARENCY
EXTENT 607852 1935706 610804 1938807 METADATA
"Bayyana" "Harkokin Kasuwanci ta Ƙimar Ma'aikatar 02"
"RESULT_FIELDS" "MsLink Cve_Mz Cve_Pred prop Tsawon Yanki KYAU"
KARSHEN
DATA PALENQUE_SECTOR01
TEMPLATE "ttt_query.html"
TOLERANCE 5
#TOLERANCEUNITS PIXELS
LABELITEM "WANNA"
CLASSITEM "WANNAN"
LABELCACHE ON
CLASS
1 SYMBOL
128 128 128 COLOR
0 0 0 SANTAWA
NAME "ZonaNULL"
EXPRESSION ([VALUE] = 0)
LABEL
ANGLE AUTO
0 0 0 COLOR
FONT sans
TASHIYAR TSARO
KASHI Cc

BABI NA GASKIYA
BUFFER 5
SIZE 6
200 200 200 SANTAWA
KARSHEN
END #class 0 darajar
CLASS
3 SYMBOL
255 128 128 COLOR
#Color -1 -1 -1 #SIN cika

.... don haka don rufe tare da

KARSHEN
END #Class Value
END # Layer

Don kammala

Saboda haka, yin aiki tare da MapServer, ko da yake shi ne quite sauki, shi ya zama hadaddun da sosai iyaka wajen domin babban jobs saboda duk abin da yake a cikin .map. Babbar Rashin kyaunta shine cewa duk abin da aka yi a kan kafar, kamar ma'ana kowane launi, a wani theming, kuma haka sai ka tashi kayayyakin aiki, kamar CartoWeb, aiki a kan MapServer amma kawo plugins gina da misalai da siffofin da cewa yin wannan m version ya kasance kamar yadda da readme farko:

  • Aiki aiki tare, tare da AJAX domin su sake sabunta su
  • Rubuta lambar, muddin rubutun ya sake rubutun .map bisa la'akari da ma'auni
  • Dynamic baya juyawa ba tare da bukatar sabuntawa, kamar dai shi ne wani haske Layer
  • Lissafi na kundin kan layi, an rubuta cache nan da nan
  • Sauke samfurin a cikin samfurin fom
  • Fitarwa zuwa Google Earth
  • Samar da PDF daga abubuwan da ake ciki

A cikin gaba za mu yi duba CartoWeb, a nan zan bar mahada zuwa manyan misalai.

3 tana nunawa "Ta yaya Tasirin Taswirar ke aiki"

  1. Sannu,

    Ina ƙoƙarin kira wani Layer daga .map, kamar haka:

    LAYER
    Neman test_houses
    TYPE POINT
    GASKIYAR GASKIYA
    Binciken # »virtual.ovf»
    »

    XXXXX
    EXEC .......
    eess_id
    wkbPoint
    WGS84

    »

    Matsalar ita ita ce sabis na DSN yana haifar da matsalolin: lokacin da ake nemo GetCapabilities yana dawo da kalmar sirri daga cikin database ... zan iya sanya kira zuwa fayil don kauce wa "ba da kyauta" kalmar sirrin ko kuskuren DSN ?? Na gode!

  2. Taswirar MapServer wani shiri ne mai mahimmanci wanda aka buƙatar shi don nuna tashoshin sararin samaniya a kan Intanit. Kayan da aka saka shi ne kundin da aka tsara zuwa babban fayil a banza wanda yayi amfani da tsarin fayil na NTFS. Ayyukan sarrafawa kamar yadda sauran masu tafiyarwa suka yi, amma ana sanya su hanyar hanyar motsi maimakon rubutun wasiƙa.

Deja un comentario

Your email address ba za a buga.

Wannan shafin yana amfani da Akismet don rage spam. Koyi yadda aka sarrafa bayanan bayaninka.