TerraLib and TerraView Wiki Page

This is an old revision of the document!


Pre-Release Tests Guide (under development)

The minimum set of tests to be executed over an installed version of TerraView are described bellow. The ideia is to execute all of then just before releasing a new version of TerraView.

All data are stored at http://www.dpi.inpe.br/terralib5-devel/data_teste/. Other data are available at http://www.dpi.inpe.br/terralib5-devel/data.zip and are used by executable examples and unittests.

DirDatasource description
AMZ_shapes Big shapes of Amazonia
Animation.zip data used to test the Spatial Temporal
Data_TView-4.1.1_to_convert TView4.2.2 datasources to test the converter
ESRIDATA data of North America
PARA_STATE big shapes of Pará State
PA_E_TAPAJOS Postgis datasources of Tapajos
attr_fill data used to test attribute fill function
data_pedro data used to test attribute fill function
dados_queimada some data of Queimada project
images images
KML some KML files
Postgis_bkps Postgis datasources
rasters\rasters_t some rasters files (new)
rasters some rasters files
shps some shapefiles and other vector format like KML, mid/mif files

Each test must have:

Test Case description
Access ThroughMenu option used to access the functionality
Input data one or more datasources or a databases in a datasource
Interface(s) Name(s) specific options chosen in a interface
Expected behavior what should be the behavior
Output Data what should be the output - a new datasource, a new layer, etc
Output Test Report write in a test report comments
Output Error Report write in a error report all misbehavior
Known Issues write the known issues

Optional rules for output names saved in your working directory 'test_report':

What to nameRuleExampledescription
Project name p_<project_name>_<main_func><x>p_df_conv Converting Database Distrito Federal (df)
Database name db_<data>_<func><x>db_df_convDatabase generated by converting DF
Figures f_<func>_<data><x>f_conv_df1 Print screen of some problems
Raster_dir rst_<func>_<data><x>rst_conv_df1 Raster directory generated by converting
Output Layer name t_<func><overdata?><x> t_aggr_mesoregiao_para Test of Aggregation function, using attr mesoregiao do Pará

Plugins | Terralib4 Converter... |

Input Output Data Main Interface Options Results
Select Database from mdb_TView4.2.2_to_convert dir Target DataSource(type/name) / Target Raster Folder Layer Creation [MSG] Theme Creation Results(Layer Explorer) Known issues to be solved from 5.1.4 [Save Project]
DF_MODELO_DADOS.mdb Microsoft Access + <dir>/db_conv_df1 + none Select All Warning with all raster layers Deselect All 7 vector,2 tabular Mapa Pedol?gicop_conv_df1
DF_MODELO_DADOS.mdb Microsoft Access + <dir>/db_conv_df2 + <dir>/rst_df2Select All none Select All 16 rasters, 2 tabulares, 7 shapesMapa Pedol?gico p_conv_df2
BD_RioJaneiro_Original_4_2.mdb Microsoft Access + <dir>/db_conv_rj1 + <dir>/rst_rj1 Select All msg(1) Select All 1 rasters, 3 vector'Bairros' não será convertido - poligonos com centroides no mesmo layer- aviso será dado p_conv_rj1
BH_422.mdb Postgis Select All msg(3)→ OK Deselect All 24 layers
BH_422.mdb Postgis Select All none Deselect All 30 layers used connection CP1252
para_422.mdbMAccess+ <dir>/db_conv_para Select All none Deselect All 1 Layer 143 polVerificar se municipios formados por mais de um polígono são convertidos:munic VISEU,AUGUSTO CORREA,CURUÇÁ, SENADOR JOSÉ PORFÍRIO. Importar shape original para_shp_compare.zip (143 pol)and comparar p_conv_para_munic
AmazL_FILO.mdbMAccess+ <dir>/db_conv_Amz Select All none Deselect All ? Layer, ?Tabular, ?Raster,? CelularSpace p_conv_Amz512
Pratica_celulas.mdb e export_pratica_celulas_setores_censit2000.zipMAccess+ <dir>/db_conv_pratica_cell Select All none Deselect All 6 Layer,2 Raster, 7 layers(temas) same celular Poligonos com furos estão com links duplos ao selecioná-los pelo mapa - ver object id 29,30,44 - exportar o layer 'Setores_Censitarios_2000' do TV4.2.2 e adicioná-lo no TV5.2.x - ocorre o mesmo problema

msg(1):

ImagTM543_RJ: D:/BD_Geograficos/TView_DATABASES/BDRJaneiro/Shapes/ImagTM543_RJ.tif

Voronoi: Layer invalid: table without attributes!

Msg(3) >resolvido

Bairros: Could not execute the prepared query due to the following error: ERRO: sequência de bytes é inválida para codificação “UTF8”: 0xc3 0x4f .

CompanhiasPM: Could not execute the prepared query due to the following error: ERRO: sequência de bytes é inválida para codificação “UTF8”: 0xaa .

Favelas: Could not execute the prepared query due to the following error: ERRO: sequência de bytes é inválida para codificação “UTF8”: 0xf3 0x73 0x69 0x74 .

test_cell_2000: Could not execute the prepared query due to the following error: ERRO: sequência de bytes é inválida para codificação “UTF8”: 0xe3 0x6f 0x20

test_exchange_br_munic_shp: Could not execute the prepared query due to the following error: ERRO: sequência de bytes é inválida para codificação “UTF8”: 0xed

UP: Could not execute the prepared query due to the following error: ERRO: sequência de bytes é inválida para codificação “UTF8”: 0xed 0x6c 0x69 .

Known issues What do to?
Char encoding like 'Mapa Pedol?gico' From 5.1.4 Layer will be converted with other name“Pedologico”, otherwise change layer-name before convert.
Vector Conflit name Remove the target datasource before trying again the conversion
Raster Conflit name Remove the raster directory before trying again the conversion
Char encoding like“sequência de bytes é inválida para codificação “UTF8”: 0xe3 0x6f 0x20” 5.1.x create/update database connection with Client Encoding as CP1252 or LATIN1 to be able to convert the database to Postgis
Char encoding nos TView 5.2.0 foi resolvido para valores layer-name será retirado a acentuação
Dados do TView4.2.2 com mais de uma representação (polig/pontos/lines) somente uma delas será convertida na ordem pol/lin/points outra solução é exportar o dado via TView4.2.2 e adicionar os shapes correspondentes a poligonos/pontos/linhas

Project | Add Layer

Tabular File...

Select from dir 'shps' Main Interface Options Results
Input Layer / see Preview Properties/Geometry/SRID [MSG] Layer Explorer Known issues [Save Project]
Concentracao_CR2010.csv do not change [OK] none1 Tabular Layer p_add_layer
Concentracao_CR2010.csv Change Property type String to Int [OK] none1 Tabular Layer
fire_spot_sp.csv.csv Change LAT and LONG to Double,click Geometry, choose LONG LAT [OK] 1 Vector Layer POINT Tabular icon?

Vector File...

Select from dir 'shps' Results
Input Layer Layer Explorer [Save Project]
br_uf_2010.SHP br_uf_2010 p_add_layer
15MUE250GC_SIR.shp 15MUE250GC_SIR p_add_layer

Raster File...

Select from dir 'rasters_t' Results
Input Layer Layer Explorer [Save Project]
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tifp_add_layer

Project | Add Layer | From Data Source...

Data Source Selector Dataset Selection Results
Type Available Data Sources SelectCheck box all/some Select Layer Explorer [Save Project] Known Issues
Vector Files C:/data_TL/SHPs Select BR_UF_2010 Select BR_UF_2010 p_add_layer
Vector Files (+) Define OGR Connector C:/data_TL/SHPs + OpenSelectbr_uf_2010Select br_uf_2010p_add_layer
Raster Files (+) Define GDAL Connector C:/data_TL/RSTs + OpenSelectraster fileSelect raster filep_add_layer Only raster format allowed at this directory ?? if some shapes or other things CAI

Project | Add Layer | Query Dataset...

Processing | Raster Processing

Mosaic...

Select from dir 'rasters_t' Main Interface Options Results
Layer Search Mosaic Type and Specific Params Output name Layer Explorer Known issues [Save Project]
Path150_RGB765.tif & Path151_RGB765.tif &… Geo Mosaic & Euclidian Distance m_150_151.tif m_150_151.tif with SRID=32724

Arithmetic Operations...

Select from dir 'rasters_t' Results
Layer (…) Band Operation Layer (…) Band Output name Known issues
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif 1 + / CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif 2 + t_arithmetic.tif Check Normalize, the original green circles will result in white circles

Clipping...

Select from dir 'rasters_t' Results
Layer (…) Type Option Operation Output name Known issues
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Region of interest Unique Image Select region in canvas, creating 1 ROI t_clipping.tif -

Compose/Decompose Bands...

Select from dir 'rasters_t' Results
Layer (…) Operation Options Band Output name Known issues
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Compose Bands 3x button (+) 1, 2, 0 t_compose.tif The resultant image will have a reddish aspect.
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Decompose Bands Check all bands - t_decompose.tif The result will be 3 files, namely t_decompose_0.tif, t_decompose_1.tif and t_decompose_2.tif.

Mixture Model...

Select from dir 'rasters_t' Results
Layer (…) Type Options Bands Components Output name Known issues
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Linear None selected. 0 → CBERS4_PAN_RED, 1 → CBERS4_PAN_NIR, 2 → CBERS4_PAN_GREEN vegetation → green color (point selection in tools and select a point in the image), shadow → yellow color, bare_soil → red color t_mixturemodel_linear.tif Observe each output band individually, the brightest pixels in the bare_soil band will be related to pixels similar to bare soil, and so on for the other 2 classes.
FIXME CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif PCA None selected. 0 → CBERS4_PAN_RED, 1 → CBERS4_PAN_NIR, 2 → CBERS4_PAN_GREEN vegetation → green color (point selection in tools and select a point in the image), shadow → yellow color, bare_soil → red color t_mixturemodel_linear.tif Observe each output band individually, the brightest pixels in the bare_soil band will be related to pixels similar to bare soil, and so on for the other 2 classes.

Color transform...

Select from dir 'rasters_t' Results
Layer (…) Type Operation → Bands Min/Max Output name Known issues
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif RGB - IHS Red (0), Green (1), Blue (2) 0, 255 t_colortransform_rgbihs.tif Contrast is needed to view the results
FIXME t_colortransform_rgbihs.tif IHS - RGB Intensity (0), Hue (1), Saturation (2) -DBL_MAX, +DBL_MAX t_colortransform_ihsrgb.tif Weird values (wrong) in Min/Max fields, even using Min/Max → 0/1

Contrast...

Select from dir 'rasters_t' Results
Layer to select Type Histogram Area Min/Max Output name Known issues
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Linear Use All Image Band 0 → 34, 174 (select values in histogram) t_contrast_linear.tif The resultant image get a reddish aspect (contrast was applied mainly in R band)
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Histogram Equalization Use All Image - t_contrast_histogram_equalization.tif The resultant image get a saturated aspect (contrast was applied automatically on the 3 bands)
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Square contrast Use All Image Band 1 → 65, 206 (select values in histogram) t_contrast_square.tif The resultant image get a greenish aspect (contrast was applied mainly in G band)
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Square root contrast Use All Image Use detected values t_contrast_square_root.tif The resultant image gets a foggy aspect.
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Log Use All Image Use detected values t_contrast_log.tif The resultant image gets a very foggy aspect, with good contrast in dark areas.
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Mean and Std Use All Image Band 0, 1, 2 → Mean (127), Std (50) t_contrast_mean_std.tif Result presents a saturated aspect.
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Decorrelation Use All Image - t_contrast_decorrelation.tif The resultant image gets a greenish/bluish aspect.

Classification...

Select from dir 'rasters_t' Results
Layer (…) Type Bands Parameters Output name Known issues
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif ISOSeg 0, 1, 2 Layer of Polygons = INSERT HERE WHEN READY, other parameters default t_classification_isoseg.tif
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif K-Means 0, 1, 2 Number of clusters = 5, other parameters default t_classification_kmeans.tif
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif MAP 0, 1, 2 None t_classification_map.tif Import SHP with samples, t_rois.shp
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif EM 0, 1, 2 Number of clusters = 5, other parameters default t_classification_em.tif
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif SAM 0, 1, 2 None t_classification_sam.tif Import SHP with samples, t_rois.shp
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif ED 0, 1, 2 None t_classification_ed.tif Import SHP with samples, t_rois.shp, the validity of the result should be checked

Filter...

Select from dir 'rasters_t' Results
Layer (…) Type Iterations Output Bands Known issues
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Sobel 2 (only to highlight the results) 0, 1, 2 Check Preview and draw ROI (don't need to save the results in this test case).
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Roberts 5 (only to highlight the results) 0, 1, 2 Check Preview and draw ROI (don't need to save the results in this test case).
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Mean 5 (only to highlight the results) 0, 1, 2 Check Preview and draw ROI (don't need to save the results in this test case). Blur effect in the preview.
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Mode 5 (only to highlight the results) 0, 1, 2 Check Preview and draw ROI (don't need to save the results in this test case). Crispy edges in the preview.
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Median 5 (only to highlight the results) 0, 1, 2 Check Preview and draw ROI (don't need to save the results in this test case). Blur effect, more controled then Mean filter.
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Dilation 5 (only to highlight the results) 0, 1, 2 Check Preview and draw ROI (don't need to save the results in this test case). Big and white edges.
CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif Erosion 5 (only to highlight the results) 0, 1, 2 Check Preview and draw ROI (don't need to save the results in this test case). Dark circles grow, and clear circles shrink.
FIXME CBERS_4_PAN10M_20161028_152_144_CROP2_L4_BANDS_342.tif User defined 5 (only to highlight the results) 0, 1, 2 Check Preview and draw ROI (don't need to save the results in this test case). Use default values to get a equivalent result to Mean filter. Actual results are a white window.

Processing| Attribute Fill| Vector to Vector...

Check the presence and count how many points occur inside each cell. Check the output layer and the 2 new columns generated.

#TestSelect from dir 'shps' Main Interface Options Results - Check report r_attrfill_vp1_2017.txt
Verify?Input Layers Output name Operations Layer Explorer [Save Project]
Test1 localidades_pt.shp & cells12x12_setor_censit.shp t_af_vv_localid_cells12x12_Presence_TotnofValue attr “localidade:Presence” & “localidade:Total number of values”t_af_vv_localid_cells12x12_Presence_TotnofValue p_attfill_vp1_2017test.tview
Test2 localidades_pt.shp & Setores_Censitarios_2000_pol.shp t_af_vv_localid_SetCensit_Presence_TotnofValue attr “localidade:Presence” & “localidade:Total number of values”t_af_vv_localid_SetCensit_Presence_TotnofValue p_attfill_vp1_2017test.tview

Processing| Attribute Fill | Vector to Vector...

#TestSelect from dir 'shps' Main Interface Options Results - Check report r_attrfill_vp2_2017.txt
Verify?Input Layers Output name Operations Layer Explorer [Save Project]
Test1 cells6000x6000_setor_censit.shp & cells12x12_setor_censit.shp t_af_vv_op6primattr “class” & the first 6 operationst_af_vv_op6prim p_attfill_vp2_2017test.tview
Test2 cells6000x6000_setor_censit.shp & cells12x12_setor_censit.shp t_af_vv_op12attr “class”:“Percentage of Tot Area”t_af_vv_op12potarea p_attfill_vp2_2017test.tview
Test3 cells6000x6000_setor_censit.shp & cells12x12_setor_censit.shp t_af_vv_op7attr “class”:“Total Not Null Values”t_af_vv_op7p p_attfill_vp2_2017test.tview
Test4 cells6000x6000_setor_censit.shp & cells12x12_setor_censit.shp t_af_vv_op8attr “class”:“Percentage of each Class by Area”t_af_vv_op8 p_attfill_vp2_2017test.tview

Processing| Attribute Fill | Raster to Vector...

#TestSelect from dir 'shps' & 'rasters_t' Main Interface Options Results - Check report r_attrfill_rv1_2017.txt
Verify?Input Layers Only Selected Bands/Statistics Output name (…) Layer Explorer [Save Project] Status
Test1 MDE_ESP_v2.tif & PalmsSP.shp 0 / Value t_af_rv_value t_af_rv_value p_attrfill_rp1_2017.tview OK
Test2 ESP.img & br_munic_2001.shp 0,1 / Min,Max,Meant_af_rv_3op t_af_rv_3op p_attrfill_rp1_2017.tview Error
Test3 ESP.img & br_munic_2001.shp Previous Selection of SP at br_munic2001 ON MAP Display 0,1 / Min,Max,Meant_af_rv_3op t_af_rv_3op p_attrfill_rp1_2017.tview Error
Test4 ESP.img & onlySP.shp 0 / Min,Meant_af_rv_op2 t_af_rv_op2 p_attrfill_rp1_2017.tview ok

Processing| Attribute Fill| Vector to Raster...

#TestSelect from dir 'shps' Main Interface Options Results - Check report r_attrfill_vr1_2017.txt
Verify?Input Layer Attribute Raster Resolution X/Y Output name Layer Explorer [Save Project]
Test1 cells12x12_setor_censit.shp numeric attr X=10; Y=10 t_af_vr_xxxx t_af_vr_xxxx p_attfil_vr1_2017test.tview

Processing| Vector Processing | Geometric Operations... (Convex Hull, Centroid, MBR, Area, Perimeter)|

#TestSelect from dir 'shps' Main Interface Options Results - Check report r_vp_geoOp2017.txt
Verify?Input Layer Output Attributes Operations Output Repository/Layer Layer Explorer [Save Project]
Test1 cells6000x6000_setor_censit.shp Move all attr from left to rightArea , Perimeter t_vp_geoOp_area_perimt_vp_geoOp_area_perimp_r_vp_geoOp2017.tview
Test2 setores_centitarios_2000_pol.shp Move all attr from left to rightConvex Hull, Centroid, Minimum Bounding BoxOutput Repository/t_vp_geoOp t_vp_geoOp_conver_hull, t_vp_geoOp_centroid, t_vp_geoOp__mbr p_r_vp_geoOp2017.tview

Processing| Vector Processing |

Polygon to Line...

Select from dir 'shps' & 'rasters_t' Main Interface Options Results
Input Layer Only Selected Output Repository/Layer Layer Explorer [Save Project] Know Issues Status
br_uf_2010.shp (AMAZONIA selected on Map Display) Check t_poly2line_only_amazt_poly2line_only_amazp_poly2line.tviewonly Amz lines OK
br_uf_2010.shp t_poly2line_br_uf2010t_poly2line_br_uf2010p_poly2line.tviewClick over a line to select something ok

Line to Polygon...

Select from dir 'shps' Main Interface Options Results
Input Layer Only Selected Output Repository/Layer Layer Explorer [Save Project] Know Issues Status
only_amz.shp or t_poly2line_only_amaz.shp t_line2poly_amazt_line2poly_amazp_poly2line.tviewOK

Identity...

Select from dir 'shps' Main Interface Options Results
Input Layer/Intersection Output Attributes Output Repository/Layer Layer Explorer [Save Project] Know Issues
br_uf_2010.shp & only_amaz.shp Move all/some attr from left to rightt_identity1t_identity1p_identity.tviewAll Brasil
only_amaz.shp & br_uf_2010.shp Move all/some attr from left to rightt_identity2t_identity2p_identity.tviewOnly Amz

Intersection...

Select from dir 'shps' Main Interface Options Results
Input LayerOnly Selected Overlay LayerOnly Selected Attribute Selection Output Repository/Layer Layer Explorer [Save Project] Know Issues
br_munic_2001.shp onlySP.shp Move all/some attr from left to rightt_inters1t_inters1p_inters.tviewOnly SP
br_munic_2001.shp onlySP.shp Move all/some attr from left to rightt_inters1t_inters1p_inters.tviewOnly SP