|
|
|
Návrh extenze JShapePráce hlavního skriptu JShape.Write lze rozdělit na dvě části:
for each t in theView.GetThemes
...
thelayername = t.getname.lcase
thelayersrc = t.GetSrcName
theClass = t.getftab.getshapeclass.getclassname
theRGB=t.GetLegend.GetSymbols.Get(0).GetColor.GetRGBList
...
end
.....
for each pp in 0..kolo '
thewrite = RGBs.get(pp) '**barva v hexa rgb tvaru
theName = LayerNames.get(pp) '**jmeno vrstvy
theSrc = LayerSrcs.get(pp).asstring '**jmeno souboru vrstvy
theClass = myClass.get(pp).asstring '**polygon, linie, bod???
theStatus = myStatus.get(pp).asstring '**on, off
theExt = LayerExt.get(pp).asstring '**extenze shp, grd, csp
theExtDbf = LayerExtDbf.get(pp).asstring '**extenze dbf nebo txt
lf1.writeelt("")
lf1.writeelt("")
lf1.writeelt("")
lf1.writeelt("")
lf1.writeelt("")
lf1.writeelt(" ")
end '**konec for
Spolu s dalšími údaji jsou zapsány do HTML souboru Skript JShape.Fshape provádí vlastní úpravy dat - kompresi /kódování /export dat zkopírovaných na cílové místo voláním utility Fshape.
myfILE = SELF.Get( 0 ) '**získání předávaných parametrů
myCommand = SELF.Get( 1 )
myURL = SELF.Get( 2 )
myFields = SELF.Get( 3 )
FShape = SELF.Get( 4 )
base=FShape.asstring+" "+myfILE.asstring '**celé jméno souboru, s kompletní cestou
if (myCommand="shp") then
Command = " " '** příkaz pro utilitu FShape
elseif (myCommand="dbf") then
Command = " "
elseif (myCommand="csp") then ' zkopmresuje shp
Command = " compress"
elseif (myCommand="ecp") then ' ecp zkopmresuje a zakoduje shp
Command = " compress" + " key:" +myURL
elseif (myCommand="grd") then 'grid
Command =" grid:"+myFields
elseif (myCommand="egd") then
Command =" grid:"+myFields+ " key:" +myURL 'zakoduje grid
elseif (myCommand="list") then
Command =" list"
else (myCommand="txt")
Command =" export " +myFields
end
'MsgBox.Info(base+" "+command,"JShape")
if (Command = " ") then
else
system.execute(base+ Command) '**vlastní spuštění exe utility FShape
end
JShape.translate převádí barvy vyjádřené v desítkové soustavě do soustavy šestnáctkové a zapisuje je jako řetězec použitelný v HTML souboru pro inicializaci apletu JShape Extenze JShape má zatím řadu omezení:
|
|
Copyright (C) VŠB - TU Ostrava,
Institut geoinformatiky, 2001-3. Všechna práva vyhrazena. |