Files
secondo/Algebras/IMEX/ImEx.examples

484 lines
13 KiB
Plaintext
Raw Normal View History

2026-01-23 17:03:45 +08:00
Sequential: Yes
Database: berlintest
Restore : No
Operator : csvexport
Number : 1
Signature: stream(CVSEXPORTABLE) x text x bool -> stream[t]
Example : query intstream(1,10) csvexport['ten.csv', FALSE] count
Result : 10
Operator : csvexport
Number : 2
Signature: stream(tuple(...)) x text x bool x bool -> stream[t]
Example : query intstream(1,10) transformstream csvexport['ten.csv', FALSE, TRUE] count
Result : 10
Operator : csvexport
Number : 3
Signature: stream(tuple(...)) x text x bool x x bool x string -> stream[t]
Example : query intstream(1,10) transformstream csvexport['ten2.csv', FALSE, TRUE, ";"] count
Result : 10
Operator : db3export
Number : 4
Signature: stream(tuple) x text -> stream(tuple)
Example : query intstream(1,10) transformstream db3export['ten.dbf'] count
Result : 10
Operator : shpexport
Number : 5
Signature: stream(s) x text -> stream(s) , s in {Point, Points, Line }
Example : query Kinos feed projecttransformstream[GeoData] shpexport['kinos.shp'] count
Result : 83
Operator : shpexport
Number : 6
Signature: stream(tuple(...) x text x id -> stream(tuple(...))
Example : query Kinos feed shpexport['kinos.shp',GeoData] count
Result : 83
Operator : shpexport
Number : 7
Signature: stream(s) x text x text -> stream(s) , s in {Point, Points, Line }
Example : query Kinos feed projecttransformstream[GeoData] shpexport['kinos.shp','kinos.idx'] count
Result : 83
Operator : shpexport
Number : 8
Signature: stream(tuple(...) x text x id x text -> stream(tuple(...))
Example : query Kinos feed shpexport['kinos.shp',GeoData,'kinos.idx'] count
Result : 83
Operator : sqlExport
Number : 9
Signature: stream(tuple) x text x string x bool -> bool
Example : query ten feed sqlExport['ten.sql',"Ten",TRUE]
Result : TRUE
Operator : csvimport
Number : 10
Signature : rel(tuple(a_1 t1)..(a_n t_n)) x text x int x string -> stream(tuple(...)), t_i in CSVIMPORTABLE
Example : query ten csvimport['ten.csv',1,""] count
Result : 10
Operator : csvimport
Number : 11
Signature : rel(tuple(a_1 t1)..(a_n t_n)) x text x int x string x string -> stream(tuple(...)), t_i in CSVIMPORTABLE
Example : query ten csvimport['ten2.csv',1,"",";"] count
Result : 10
Operator : csvimport2
Number : 12
Signature : text x int x string x string x bool x bool -> stream(tuple(...)),
Example : query csvimport2('ten.csv',1,"","",FALSE,FALSE) count
Result : 10
Operator : dbtype
Number : 13
Signature: text -> text
Example : query dbtype('ten.dbf')
Result : '[const rel(tuple([Elem : int])) value ()]'
Operator : dbimport
Number : 14
Signature: rel(tuple(...)) x text -> stream(tuple(...))
Example : query [const rel(tuple([Elem : int ] )) value ()] dbimport['ten.dbf'] count
Result : 10
Operator : dbimport2
Number : 15
Signature: text -> stream(tuple(...))
Example : query dbimport2('ten.dbf') count
Result : 10
Operator : shptype
Number : 16
Signature: text -> text
Example : query shptype('kinos.shp')
Result : '[const point value (0 0)]'
Operator : shpimport
Number : 17
Signature: T x text -> stream(T)
Example : query [const point value (0 0)] shpimport['kinos.shp'] count
Result : 83
Operator : shpimport2
Number : 18
Signature: text -> stream(T)
Example : query shpimport2('kinos.shp') count
Result : 83
Operator : saveObject
Number : 19
Signature: T x string x text -> bool
Example : query (3 + 4) saveObject["seven",'seven.obj']
Result : TRUE
Operator : isFile
Number : 20
Signature: string -> bool
Example : query isFile("SecondoTTYBDB")
Result : TRUE
Operator : isFile
Number : 21
Signature: text -> bool
Example : query isFile('SecondoTTYBDB')
Result : TRUE
Operator : createDirectory
Number : 22
Signature: string -> bool
Example : query createDirectory("Blabberblubb.dir")
Result : TRUE
Operator : isDirectory
Number : 23
Signature: string -> bool
Example : query isDirectory("Blabberblubb.dir")
Result : TRUE
Operator : isDirectory
Number : 24
Signature: text -> bool
Example : query isDirectory('Blabberblubb1.dir')
Result : FALSE
Operator : removeFile
Number : 25
Signature: string -> bool
Example : query removeFile("Blabberblubb.dir")
Result : TRUE
Operator : removeFile
Number : 26
Signature: text -> bool
Example : query removeFile('Blabberblubb.dir')
Result : FALSE
Operator : rtf2txtfile
Number : 27
Signature: string -> bool
Example : query rtf2txtfile("test.rtf")
Result : FALSE
Operator : rtf2txtfile
Number : 28
Signature: text -> bool
Example : query rtf2txtfile("test.rtf")
Result : FALSE
Operator : fileSize
Number : 29
Signature: string [ x bool ] -> int
Example : query fileSize("Blabberblubb.dir") >= [const int value undef]
Result : TRUE
Operator : fileSize
Number : 30
Signature: text [ x bool ] -> int
Example : query isdefined(fileSize('Blabberblubb1.dir'))
Result : FALSE
Operator : writeFile
Number : 32
Signature: string x string [ x bool ] -> bool
Example : query writeFile("Hello World!", "writeFileTest")
Result : TRUE
Operator : writeFile
Number : 33
Signature: string x text [ x bool ] -> bool
Example : query writeFile("Hello World!", 'writeFileTest', FALSE)
Result : TRUE
Operator : writeFile
Number : 34
Signature: text x string [ x bool ] -> bool
Example : query writeFile('Hello World!', "writeFileTest", TRUE)
Result : TRUE
Operator : writeFile
Number : 35
Signature: text x text [ x bool ] -> bool
Example : query writeFile("Hello World!", "writeFileTest")
Result : TRUE
Operator : readFile
Number : 36
Signature: string -> text
Example : query length(readFile("ten.csv"))
Result : (platform (linux (int 26)) (linux64 (int 26)) (win32 (int 37))(mac_osx (int 26)))
Operator : readFile
Number : 37
Signature: text -> text
Example : query length(readFile('ten.csv'))
Result : (platform (linux (int 26)) (linux64 (int 26)) (win32 (int 37))(mac_osx (int 26)))
Operator : moveFile
Number : 38
Signature: string x string -> bool
Example : query moveFile("opt","opt2")
Result : TRUE
Operator : moveFile
Number : 39
Signature: string x text -> bool
Example : query moveFile("opt2",'opt3')
Result : TRUE
Operator : moveFile
Number : 40
Signature: text x string -> bool
Example : query moveFile('opt3',"opt4")
Result : TRUE
Operator : moveFile
Number : 41
Signature: text x text -> bool
Example : query moveFile('opt4','opt')
Result : TRUE
Operator : copyFile
Number : 42
Signature: {string,text} x {string,text} -> bool
Example : query copyFile("opt","opt2")
Result : TRUE
Operator : getDirectory
Number : 43
Signature: string [ x int ] -> stream(text)
Example : query (getDirectory(".") count) > 1
Result : TRUE
Operator : getDirectory
Number : 44
Signature: text [ x int ] -> stream(text)
Example : query (getDirectory('.',10) count) > 1
Result : TRUE
Operator : toCSVtext
Number : 45
Signature: CSVEXPORTABLE -> text
Example : query toCSVtext(TRUE)
Result : 'true'
Operator : fromCSVtext
Number : 46
Signature: CSVIMPORTABLE x text -> CSVIMPORTABLE
Example : query fromCSVtext(TRUE, 'TRUE')
Result : TRUE
Operator : fromCSVtext
Number : 47
Signature: CSVIMPORTABLE x string -> CSVIMPORTABLE
Example : query fromCSVtext(TRUE, "")
Result : (bool undefined)
Operator : getPID
Number : 48
Signature: -> int
Example : query getPID() > 0
Result : (bool TRUE)
Operator : getSecondoVersion
Number : 49
Signature: -> string
Example : query fromCSVtext( 1, tostring(replace((totext( getSecondoVersion() ) sentences transformstream extract[Elem]),".","") ) ) >= 3
Result : (bool TRUE)
Operator : getBDBVersion
Number : 50
Signature: -> string
Example : query fromCSVtext( 1, tostring(replace((totext( getBDBVersion() ) sentences transformstream extract[Elem]),".","") ) ) >= 4
Result : (bool TRUE)
Operator : getSecondoPlatform
Number : 51
Signature: -> string
Example : query getSecondoPlatform()
Result : (platform (linux (string "linux")) (linux64 (string "linux64")) (win32 (string "win32")) (mac_osx (string "mac_osx")))
Operator : getPageSize
Number : 52
Signature: -> int
Example : query getPageSize() > 0
Result : (bool TRUE)
Operator : nmeaimport
Number : 53
Signature: text x string -> stream(tuple(...))
Example : query nmeaimport('../Data/import/tripHA_Boeler_Uni.trc',"GGA") count
Result : 441
Operator : nmeaimport_line
Number : 54
Signature: text x string -> stream(tuple(...))
Example : query nmeaimport_line('$GPGGA,094154.384,5131.2913,N,00726.9363,E,0,0,,102.5,M,47.5,M,,*42', "GGA") extract[FixQuality]
Result : 0
Operator : get_lines
Number : 55
Signature: text -> stream(text)
Example : query get_lines('ten.csv') count
Result : 11
Operator : get_lines
Number : 56
Signature: string -> stream(text)
Example : query get_lines("ten.csv") count
Result : 11
Operator : importHGT1
Number : 57
Signature: text -> stream(tuple([R : rect, V : int))
Example : query importHGT1('N51E007.hgt') count
Result : 1442401
Operator : basename
Number : 58
Signature : n -> n , n in {string,text}
Example : query basename("/home/secondo/secondo/makefile")
Result : "makefile"
Operator : removeDirectory
Number : 59
Signature : {text, string} [x bool] -> bool
Example : query removeDirectory("Blub.dir",FALSE)
Result : FALSE
Operator : shpBox
Number : 60
Signature : string | text -> rect
Example : query size(shpBox('kinos.shp'))> 0
Result : TRUE
Operator : shpCollect
Number : 61
Signature : stream({string,text} ) x bool x {string,text} -> stream(tuple)
Example : query getDirectory(".") filter[. endsWith ".shp"] shpCollect[TRUE, 'All.shp'] count > 0
Result : TRUE
Operator : db3Collect
Number : 62
Signature : stream({string,text} ) x {string,text} -> stream(tuple)
Example : query getDirectory(".") filter[. endsWith ".dbf"] db3Collect['All.db3'] count > 0
Result : TRUE
Operator : createShx
Number : 63
Signature : {string,text} x {string,text} -> bool
Example : query createShx("kinos.shp", "Kinos.shx");
Result : TRUE
Operator : noShpRecords
Number : 64
Signature : {string, text] -> int
Example : query noShpRecords("kinos.shp")
Result : 83
Operator : noDB3Records
Number : 65
Signature : {string, text} [ x bool] -> int
Example : query noDB3Records("ten.dbf", TRUE)
Result : 10
Operator : extractShpPart
Number : 66
Signature : {string, text} x int x int x bool x bool x {string, text} -> int
Example : query extractShpPart('kinos.shp', 50, 55, TRUE, TRUE, 'kinos_50_55.shp')
Result : 6
Operator : extractDB3Part
Number : 67
Signature : {string, text} x int x int x {string, text} -> int
Example : query extractDB3Part('ten.dbf', 4, 8, 'ten_4_8.shp')
Result : 5
Operator : splitShp
Number : 68
Signature : {string, text} x int [x bool] -> int
Example : query splitShp('kinos.shp', 9, TRUE)
Result : 10
Operator : splitDB3
Number : 69
Signature : {string, text} x int -> int
Example : query splitDB3('ten.dbf', 3)
Result : 4
Operator : importais
Number : 70
Signature : {string,text} x string -> int
Example : query importais('nothing.txt', "AIS");
Result : 0
Operator : exportBinCSV
Number : 71
Signature : stream(tuple) x {string, text} x IDENT* -> stream(tuple)
Example : query plz feed exportBinCSV['plz.bincsv', PLZ] count = plz count
Result : TRUE
Operator : importBinCSVSimple
Number : 72
Signature : {text, string} x {rel, text} x int -> stream(tuple)
Example : query 'plz.bincsv' importBinCSVSimple[plz, 3] count = plz count
Result : TRUE
Remark : will crash if wrong position or wrong tuple type is given
Operator : geojson2line
Number : 73
Signature: text x bool -> line
Example : query geojson2line('{"geometry":{"coordinates":[[[36.104474200000006,140.09705010000002],[36.104599900000004,140.0968355],[36.103951900000006,140.0952154],[36.103843600000005,140.09518060000002],[36.1037179,140.0951913],[36.103386300000004,140.0952905],[36.104474200000006,140.09705010000002]]],"type":"Polygon"},"id":554450920,"type":"Feature","properties":{"natural":"wood"}}', TRUE)
Result : (line ( (36.1033863 140.0952905 36.1037179 140.0951913) (36.1033863 140.0952905 36.10447420000001 140.0970501) (36.1037179 140.0951913 36.1038436 140.0951806) (36.1038436 140.0951806 36.10395190000001 140.0952154) (36.10395190000001 140.0952154 36.1045999 140.0968355) (36.10447420000001 140.0970501 36.1045999 140.0968355)))
Operator : geojson2line
Number : 74
Signature: text x bool -> line
Example : query geojson2line('{"geometry":{"coordinates":[[36.10,140.097],[37.4,141.4],[34.20,121.53]],"type":"LineString"},"id":554450920,"type":"Feature","properties":{"natural":"wood"}}', FALSE)
Result : (line ( (34.2 121.53 37.4 141.4) (36.1 140.097 37.4 141.4)))
Operator : geojson2point
Number : 75
Signature: text -> point
Example : query geojson2point('{"geometry":{"coordinates":[52.077,-1.09],"type":"Point"},"id":20822819,"type":"Feature","properties":{"natural":"tree"}}')
Result : (point (52.077 -1.09))