Open pedro-andrade-inpe opened 8 years ago
@avancinirodrigo, could you check if this strategy is executing the same operator of strategy min, please?
No
local OperationMapper = {
intersection = binding.HIGHEST_INTERSECTION,
occurrence = binding.HIGHEST_OCCURRENCE,
}
elseif operation == "mode" then
if area then
operation = "intersection"
else
operation = "occurrence"
end
It looks very strange. In te::attributefill::VectorToVectorMemory::getModeValue
, the returning value is a string, in the same way of RasterToVector
. @avancinirodrigo, can you debug to check which function is really called? The test is in terrame/packages/terralib/tests/shapefile/basics/Layer.lua
, in MODE
.
@pedro-andrade-inpe how could I verify this problem? what are the steps?
In terrame/packages/terralib/tests/shapefile/basics/Layer.lua
, line 91, in cl:fill
, check which terralib operation is being called in its C++ code.
Where is created the municipios
variable in the test?
cl:fill{
operation = "mode",
name = municipios, -- < this
attribute = "polmode",
select = "POPULACAO_",
output = polmodeLayerName
}
In fact, this operation is working like minimum, but the problem happens in terraview as well
@avancinirodrigo, can you replace HIGHEST_OCCURRENCE by MODE? It is necessary to update VectorAttributeCreatedMapper
with the code in the C++ level, and I don't know where is it. I then can see if it is working properly.
Implement strategy "majority" for fillCell with vectorial data. #788. Note that this strategy will use two internal TerraLib functions,HIGHEST_OCCURRENCE and HIGHEST_INTERSECTION.