1 2 3 4 5 6 7 8 9 |
# Creates a fractal surface of 250x250 cells and fractal dimension of 2.01 version(1.0); # Change the directory below to correspond to your file location. baseDir = "c:/Program Files/LandSerf/data/landscriptExamples/"; fracSurf = newraster(1000,1000,10,10,250,250); fractal(fracSurf, 2.01); save(fracSurf,baseDir&"fractal.srf"); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# Creates a fractal surface of 250x250 cells and fractal dimension of 2.01 version(1.0); # Change the directory below to correspond to your file location. baseDir = "c:/Program Files/LandSerf/data/landscriptExamples/"; fracSurf = newraster(1000,1000,10,10,250,250,"A simulated surface"); fractal(fracSurf, 2.01); # Customise the new surface's metadata colouredit(fracSurf,"land1"); edit(fracSurf,"notes","Fractal surface generated by spectral synthesis with d=2.01"); # Save the new surface. save(fracSurf,baseDir&"fractal.srf"); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# Creates an empty vector map. version(1.0); # Change the directory below to correspond to your file location. baseDir = "c:/Program Files/LandSerf/data/landscriptExamples/"; # Boundaries of the new vector map. west = 123000; south = 456000; east = 623000; north = 823000; myVect = newvector(west,south,east,north,"Blank","An empty vector map"); # Set the default colour table and save the new vector. colouredit(myVect,"grey1"); save(myVect,baseDir&"blank.vec"); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# Creates a raster based on a 2d mathematical function version(1.0); # Change the directory below to correspond to your file location. baseDir = "c:/Program Files/LandSerf/data/landscriptExamples/"; nyquist = newraster(-100,-100,1,1,201,201); nyquist = 10* (sin(easting/10) / (easting/10)) * (sin(northing/10) /(northing/10)); # Add metadata. edit(nyquist,"title","Nyquist"); edit(nyquist,"notes", "Nyquist sampling model based on the 2d sinC function "& "((sin PI x / PI x)(sin PI y / PI y) )"); edit(nyquist,"type","elevation"); colouredit(nyquist,"land4"); # Save the new raster map. save(nyquist,baseDir&"nyquist.srf"); |