This commit is contained in:
Trygve 2024-04-28 22:31:05 +02:00
parent 98a312094e
commit 29a7ddb083

View File

@ -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[])
@ -187,18 +178,6 @@ int main(int argc, const char* argv[])
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");