SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
crsreproject.h
Go to the documentation of this file.
1
14#ifndef CRSREPROJECT_H
15#define CRSREPROJECT_H
16
17#include <QString>
18
20class OGRCoordinateTransformation;
21
22#include <openswmm/engine/openswmm_engine.h>
23
24namespace CRSReproject
25{
26 struct Stats {
27 int nodes = 0;
28 int linkVertices = 0;
29 int polygonVerts = 0;
30 };
31
47 bool reprojectModel(SWMM_Engine engine,
48 const SpatialReferenceSystem &oldSRS,
49 const SpatialReferenceSystem &newSRS,
50 Stats *stats = nullptr,
51 QString *errorOut = nullptr);
52
58 inline constexpr int kTransformChunk = 65536;
59
80 void transformPointsInPlace(OGRCoordinateTransformation *ct,
81 double *xs, double *ys, int n);
82}
83
84#endif // CRSREPROJECT_H
Represents a coordinate reference system backed by a GDAL OGRSpatialReference.
Definition spatialreferencesystem.h:28
const double * xs
Definition mesh2dresultsexport.cpp:424
const double * ys
Definition mesh2dresultsexport.cpp:425
std::size_t n
Definition mesh2dresultsexport.cpp:426
Definition crsreproject.h:25
void transformPointsInPlace(OGRCoordinateTransformation *ct, double *xs, double *ys, int n)
Transform n interleaved scene points in place, in chunks.
Definition crsreproject.cpp:139
constexpr int kTransformChunk
Number of points pushed through OGR per batched call.
Definition crsreproject.h:58
bool reprojectModel(SWMM_Engine engine, const SpatialReferenceSystem &oldSRS, const SpatialReferenceSystem &newSRS, Stats *stats=nullptr, QString *errorOut=nullptr)
Transform every coordinate in the model from oldSRS to newSRS.
Definition crsreproject.cpp:46
void * SWMM_Engine
Definition objectdefaultsapplier.h:19
Definition crsreproject.h:26
int polygonVerts
Definition crsreproject.h:29
int nodes
Definition crsreproject.h:27
int linkVertices
Definition crsreproject.h:28