Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reviewing terralib release 5.5 updating #2332

Merged
merged 28 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5eed9aa
Close #2323 - Review geojson dataset name.
avancinirodrigo Feb 5, 2020
fdc4140
Fix #2225 - Review difference between geojson and shp on Layer:fill().
avancinirodrigo Feb 10, 2020
b894879
Mode operation stops to work on geojson #2327.
avancinirodrigo Feb 10, 2020
ecfc7bb
Coverage operation stops to work on geojson #2326.
avancinirodrigo Feb 10, 2020
771ddef
Updating geojson attributes stop to work #2324.
avancinirodrigo Feb 10, 2020
92e0210
Fix #2322 - Overwrite geojson stops to work.
avancinirodrigo Feb 10, 2020
f7288ee
Some epsgs are not recognized by terralib #2331.
avancinirodrigo Feb 10, 2020
048f670
Problem with geojson exporting #2328.
avancinirodrigo Feb 10, 2020
9909bcb
updating linux logs #2225.
avancinirodrigo Mar 3, 2020
665ae4e
skipping line.
avancinirodrigo Mar 3, 2020
d06c162
removing stderr redirect.
avancinirodrigo Mar 3, 2020
f1e65e3
Close #2334 - Review geometry attribute name.
avancinirodrigo Mar 18, 2020
8398d5e
Problem with geojson exporting #2328.
avancinirodrigo Mar 18, 2020
98af7f4
small change.
avancinirodrigo Mar 18, 2020
96e160f
Fix #2311 - Problem with file name with underscore to create postgis …
avancinirodrigo Mar 18, 2020
7637d07
disabling new added modules from terralib.
avancinirodrigo Mar 18, 2020
9c622e8
corrections #2334.
avancinirodrigo Mar 19, 2020
f996974
Close #2335 - GeoJson supports only 4326 epsg.
avancinirodrigo Mar 19, 2020
d7b75df
small corrections.
avancinirodrigo Mar 19, 2020
112579b
corrections #2334.
avancinirodrigo Mar 26, 2020
6e351ca
small changes.
avancinirodrigo Mar 26, 2020
42f532f
reprojecting data #2330.
avancinirodrigo Mar 31, 2020
779efd1
Close #2336 - Remove fix feature of the Layer:check(), ref. #2329.
avancinirodrigo Mar 31, 2020
3be71b7
problem on linux #2331.
avancinirodrigo Apr 1, 2020
97e39a3
corrections #2330.
avancinirodrigo Apr 1, 2020
fcae490
adding skipping.
avancinirodrigo Apr 3, 2020
8efba4e
adding tests #2334.
avancinirodrigo Apr 3, 2020
ec4aa5a
updating log #2330.
avancinirodrigo Apr 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build/scripts/linux/terralib-conf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ set(TERRALIB_QTPROPERTYBROWSER_ENABLED OFF CACHE BOOL "Qt?" FORCE)
set(TERRALIB_MOD_WS_OGC_WMS_QT_ENABLED OFF CACHE BOOL "Build Qt Components for OGC WMS?" FORCE)
set(TERRALIB_MOD_WS_OGC_WCS_CLIENT_ENABLED OFF CACHE BOOL "Build OGC WCS Client Support?" FORCE)
set(TERRALIB_MOD_METADATA_ENABLED OFF CACHE BOOL "Build Metadata?" FORCE)
set(TERRALIB_MOD_PROCESS_QT_ENABLED OFF CACHE BOOL "Build Process Qt module?" FORCE)
set(TERRALIB_MOD_PROCESS_ENABLED OFF CACHE BOOL "Build Process module?" FORCE)
2 changes: 2 additions & 0 deletions build/scripts/mac/terralib-conf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ set(TERRALIB_QHELP_ENABLED OFF CACHE BOOL "QHelp?" FORCE)
set(TERRALIB_MOD_WS_OGC_WMS_QT_ENABLED OFF CACHE BOOL "Build Qt Components for OGC WMS?" FORCE)
set(TERRALIB_MOD_WS_OGC_WCS_CLIENT_ENABLED OFF CACHE BOOL "Build OGC WCS Client Support?" FORCE)
set(TERRALIB_MOD_METADATA_ENABLED OFF CACHE BOOL "Build Metadata?" FORCE)
set(TERRALIB_MOD_PROCESS_QT_ENABLED OFF CACHE BOOL "Build Process Qt module?" FORCE)
set(TERRALIB_MOD_PROCESS_ENABLED OFF CACHE BOOL "Build Process module?" FORCE)
2 changes: 2 additions & 0 deletions build/scripts/win/terralib-conf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ set(TERRALIB_QHELP_ENABLED OFF CACHE BOOL "QHelp?" FORCE)
set(TERRALIB_MOD_WS_OGC_WMS_QT_ENABLED OFF CACHE BOOL "Build Qt Components for OGC WMS?" FORCE)
set(TERRALIB_MOD_WS_OGC_WCS_CLIENT_ENABLED OFF CACHE BOOL "Build OGC WCS Client Support?" FORCE)
set(TERRALIB_MOD_METADATA_ENABLED OFF CACHE BOOL "Build Metadata?" FORCE)
set(TERRALIB_MOD_PROCESS_QT_ENABLED OFF CACHE BOOL "Build Process Qt module?" FORCE)
set(TERRALIB_MOD_PROCESS_ENABLED OFF CACHE BOOL "Build Process module?" FORCE)
4 changes: 2 additions & 2 deletions jenkins/linux/terrame-package-test-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ fi

# Executing unittest
if [ -f "$(pwd)/test.lua" ]; then
terrame -color $TERRAME_COMMANDS -test test.lua 2> /dev/null
terrame -color $TERRAME_COMMANDS -test test.lua
RESULT=$?
else
terrame -color $TERRAME_COMMANDS -test 2> /dev/null
terrame -color $TERRAME_COMMANDS -test
RESULT=$?
fi

Expand Down
Binary file modified packages/base/log/linux/cellspace_visualtable_project.bmp
Binary file not shown.
44 changes: 25 additions & 19 deletions packages/base/lua/CellularSpace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ local function loadPGM(self)
self.ydim = self.yMax
end

local function setCellsByTerraLibDataSet(self, dSet)
local function setCellsByTerraLibDataSet(self, dSet, geom)
self.xMax = 0
self.yMin = 0
self.yMax = 0
Expand Down Expand Up @@ -616,12 +616,18 @@ local function setCellsByTerraLibDataSet(self, dSet)
local cell = Cell{id = tostring(i), x = col, y = row}
self.cObj_:addCell(cell.x, cell.y, cell.cObj_)

for k, v in pairs(dSet[i]) do
if (k == "OGR_GEOMETRY") or (k == "geom") or (k == "ogr_geometry") then
if self.geometry then
cell.geom = gis.TerraLib().castGeomToSubtype(v)
if geom then
for k, v in pairs(dSet[i]) do
if k == geom.name then
if self.geometry then
cell.geom = gis.TerraLib().castGeomToSubtype(v)
end
else
cell[k] = v
end
else
end
else
for k, v in pairs(dSet[i]) do
cell[k] = v
end
end
Expand All @@ -648,7 +654,14 @@ local function loadDataSet(self)
self.cObj_:setLayer(self.layer)
end

setCellsByTerraLibDataSet(self, dset)
local data = {
project = self.project,
layer = self.layer.name,
file = self.file
}
local geom = gis.TerraLib().getGeometryInfo(data)

setCellsByTerraLibDataSet(self, dset, geom)
end

local function loadVector(self)
Expand Down Expand Up @@ -1353,22 +1366,15 @@ CellularSpace_ = {
mandatoryArgument(1, "string", newLayerName)

local dset = gis.TerraLib().getDataSet{project = self.project, layer = self.layer.name, missing = self.missing}
local geomAttrName = self.layer.geometry
if not self.geometry then
for i = 0, #dset do
for k, v in pairs(dset[i]) do
if (k == "OGR_GEOMETRY") or (k == "geom") or (k == "ogr_geometry") then
self.cells[i + 1][k] = v
end
end
self.cells[i + 1][geomAttrName] = dset[i][geomAttrName]
end
elseif dset[0].OGR_GEOMETRY or dset[0].ogr_geometry then
elseif dset[0][geomAttrName] then
for i = 0, #dset do
for k, v in pairs(dset[i]) do
if (k == "OGR_GEOMETRY") or (k == "ogr_geometry") then
self.cells[i + 1].geom = nil
self.cells[i + 1][k] = v
end
end
self.cells[i + 1].geom = nil
self.cells[i + 1][geomAttrName] = dset[i][geomAttrName]
end
end

Expand Down
4 changes: 2 additions & 2 deletions packages/base/tests/database/basics/CellularSpace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ return{

forEachCell(cs, function(c)
unitTest:assertNotNil(c.geom)
unitTest:assertNil(c.OGR_GEOMETRY)
unitTest:assertNotNil(c[layer1.geometry])
end)

cs = CellularSpace{
Expand All @@ -199,7 +199,7 @@ return{

forEachCell(cs, function(c)
unitTest:assertNil(c.geom)
unitTest:assertNil(c.OGR_GEOMETRY)
unitTest:assertNil(c[layer1.geometry])
end)

unitTest:assertEquals(303, #cs.cells)
Expand Down
4 changes: 2 additions & 2 deletions packages/base/tests/functional/basics/CellularSpace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ return{

forEachCell(cs, function(c)
unitTest:assertNil(c.geom)
unitTest:assertNil(c.OGR_GEOMETRY)
unitTest:assertNil(c[layer.geometry])
end)

cs = CellularSpace{
Expand All @@ -261,7 +261,7 @@ return{

forEachCell(cs, function(c)
unitTest:assertNil(c.geom)
unitTest:assertNil(c.OGR_GEOMETRY)
unitTest:assertNil(c[layer.geometry])
end)

proj.file:delete()
Expand Down
8 changes: 4 additions & 4 deletions packages/gis/data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data{
}

data{
file = {"amazonia-prodes.tif", "amazonia-prodes.jgw", "amazonia-prodes.xml", "amazonia-prodes.tif.aux.xml"},
file = {"amazonia-prodes.tif", "amazonia-prodes.jgw"},
summary = "PRODES data with resolution of 5km. This is a simplified version of the data and must be used only for educational purposes.",
source = "http://www.obt.inpe.br/prodes",
attributes = {
Expand Down Expand Up @@ -65,7 +65,7 @@ data{
-- Emas

data{
file = {"emas-accumulation.tif", "emas-accumulation.xml"},
file = "emas-accumulation.tif",
summary = "Land cover accumulation from November 94 to May 2000.",
source = "Rodolfo Almeida (see Reference)",
reference = "Almeida et al. (2008). Simulando padroes de incendios no Parque Nacional das Emas, Estado de Goias, Brasil. In: X Simposio Brasileiro de Geoinformatica, Rio de Janeiro, Brazil",
Expand Down Expand Up @@ -108,7 +108,7 @@ data{
}

data{
file = {"itaituba-deforestation.tif", "itaituba-deforestation.xml"},
file = "itaituba-deforestation.tif",
summary = "Deforestation in Itaituba.",
source = "PRODES/INPE",
attributes = {
Expand All @@ -117,7 +117,7 @@ data{
}

data{
file = {"itaituba-elevation.tif", "itaituba-elevation.xml"},
file = "itaituba-elevation.tif",
summary = "SRTM data within Itaituba.",
source = "HAND (derived from SRTM/NASA)",
attributes = {
Expand Down
Binary file modified packages/gis/data/amazonia-prodes.tif
Binary file not shown.
13 changes: 0 additions & 13 deletions packages/gis/data/amazonia-prodes.xml

This file was deleted.

Binary file modified packages/gis/data/emas-accumulation.tif
Binary file not shown.
13 changes: 0 additions & 13 deletions packages/gis/data/emas-accumulation.xml

This file was deleted.

Binary file modified packages/gis/data/itaituba-deforestation.tif
Binary file not shown.
13 changes: 0 additions & 13 deletions packages/gis/data/itaituba-deforestation.xml

This file was deleted.

Binary file modified packages/gis/data/itaituba-elevation.tif
Binary file not shown.
13 changes: 0 additions & 13 deletions packages/gis/data/itaituba-elevation.xml

This file was deleted.

Binary file not shown.
1 change: 1 addition & 0 deletions packages/gis/data/test/es_limit_epsg4326.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
Binary file added packages/gis/data/test/es_limit_epsg4326.dbf
Binary file not shown.
8 changes: 8 additions & 0 deletions packages/gis/data/test/es_limit_epsg4326.geojson

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/gis/data/test/es_limit_epsg4326.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PROJCS["SIRGAS_2000_Brazil_Polyconic",GEOGCS["GCS_SIRGAS 2000",DATUM["D_SIRGAS_2000",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Polyconic"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["false_easting",5000000],PARAMETER["false_northing",10000000],UNIT["Meter",1]]
1 change: 1 addition & 0 deletions packages/gis/data/test/es_limit_epsg4326.qpj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PROJCS["SIRGAS 2000 / Brazil Polyconic",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],PROJECTION["Polyconic"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["false_easting",5000000],PARAMETER["false_northing",10000000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","5880"]]
Binary file added packages/gis/data/test/es_limit_epsg4326.shp
Binary file not shown.
Binary file added packages/gis/data/test/es_limit_epsg4326.shx
Binary file not shown.
1 change: 1 addition & 0 deletions packages/gis/data/test/es_protected_areas_epsg4326.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
Binary file not shown.
97 changes: 97 additions & 0 deletions packages/gis/data/test/es_protected_areas_epsg4326.geojson

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/gis/data/test/es_protected_areas_epsg4326.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
1 change: 1 addition & 0 deletions packages/gis/data/test/es_protected_areas_epsg4326.qpj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
Binary file not shown.
Binary file not shown.
Loading