mirror of
https://gitlab.com/Trygve/contour-creator.git
synced 2024-11-21 14:50:18 +00:00
Cleanup
This commit is contained in:
parent
98a312094e
commit
29a7ddb083
23
src/main.cpp
23
src/main.cpp
@ -165,15 +165,6 @@ void write_output_file(std::vector<CellMap> cellmaps, const char *filepath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GDALClose( poDS );
|
GDALClose( poDS );
|
||||||
/*
|
|
||||||
OGRDataSourceH datasource = OGR_Dr_CreateDataSource(OGRGetDriverByName("GeoJSON"), "contour.geojson", new char*);
|
|
||||||
OGRSpatialReference reference_system = cellmap->reference_system;
|
|
||||||
OGRLayerH layer = OGR_DS_CreateLayer(datasource, "contour", &reference_system, wkbLineString25D, new char*);
|
|
||||||
|
|
||||||
auto feature = OGR_F_Create(OGR_L_GetLayerDefn(static_cast<OGRLayerH>(layer)));
|
|
||||||
|
|
||||||
OGRGeometryH geometry = OGR_G_CreateGeometry(wkbLineString25D);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, const char* argv[])
|
int main(int argc, const char* argv[])
|
||||||
@ -183,22 +174,10 @@ int main(int argc, const char* argv[])
|
|||||||
|
|
||||||
std::cout << "x: " << map.width << " y: " << map.height << "\n";
|
std::cout << "x: " << map.width << " y: " << map.height << "\n";
|
||||||
std::cout << "max: " << map.max << " min: " << map.min << "\n";
|
std::cout << "max: " << map.max << " min: " << map.min << "\n";
|
||||||
|
|
||||||
map.blur(0.8);
|
map.blur(0.8);
|
||||||
|
|
||||||
auto cellmap = produce_cellmap(&map, 40);
|
auto cellmap = produce_cellmap(&map, 40);
|
||||||
/*
|
|
||||||
for (int y = 0; y < cellmap.height; y++)
|
|
||||||
{
|
|
||||||
for (int x = 0; x < cellmap.width; x++)
|
|
||||||
{
|
|
||||||
if (cellmap.get_cell(x, y) && cellmap.get_cell(x, y)!=15) {
|
|
||||||
std::cout << x << ","<< y << "=" << cellmap.get_cell(x, y) << " ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//std::cout << "\n";
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
auto cellmaps = vector_cellmap(&map, 5);
|
auto cellmaps = vector_cellmap(&map, 5);
|
||||||
write_output_file(cellmaps, "out.geojson");
|
write_output_file(cellmaps, "out.geojson");
|
||||||
|
Loading…
Reference in New Issue
Block a user