Skip to content

Commit

Permalink
Merge pull request #2125 from avancinirodrigo/master
Browse files Browse the repository at this point in the history
Fixing Layer:fill without overlap - Windows problem
  • Loading branch information
pedro-andrade-inpe authored Jan 26, 2018
2 parents 1af8f61 + a0398ce commit 675eabf
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions packages/gis/lua/TerraLib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ end

local function vectorToVector(fromLayer, toLayer, operation, select, outConnInfo, outType, outDSetName, area)
local propCreatedName
local err
do
local v2v = binding.te.attributefill.VectorToVectorMemory()
v2v:setInput(fromLayer, toLayer)
Expand Down Expand Up @@ -689,27 +690,29 @@ local function vectorToVector(fromLayer, toLayer, operation, select, outConnInfo

v2v:setParams(select, OperationMapper[operation], toDst)

local err = v2v:pRun() -- TODO: OGR RELEASE SHAPE PROBLEM (REVIEW)
err = v2v:pRun() -- TODO: OGR RELEASE SHAPE PROBLEM (REVIEW)

if err ~= "" then
binding.te.da.DataSourceManager.getInstance():detachAll()
customError(err)
end
if err == "" then
propCreatedName = select.."_"..VectorAttributeCreatedMapper[operation]

propCreatedName = select.."_"..VectorAttributeCreatedMapper[operation]
if outType == "OGR" then
propCreatedName = getNormalizedName(propCreatedName)
end

if outType == "OGR" then
propCreatedName = getNormalizedName(propCreatedName)
propCreatedName = string.lower(propCreatedName)
end

propCreatedName = string.lower(propCreatedName)

toDs:close()
outDs:close()
end

collectgarbage("collect")

if err ~= "" then
binding.te.da.DataSourceManager.getInstance():detachAll()
customError(err)
end

return propCreatedName
end

Expand Down

0 comments on commit 675eabf

Please sign in to comment.