MCPcopy Create free account
hub / github.com/OSGeo/gdal / Load

Function Load

apps/gdalalg_vector_sort.cpp:97–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 }
96
97 std::unique_ptr<OGRFeature> Load(std::size_t i) override
98 {
99 auto loc = m_locs[i];
100 m_buf.resize(loc.size);
101 if (VSIFSeekL(m_file, loc.offset, SEEK_SET) == -1)
102 {
103 return nullptr;
104 }
105 auto nBytesRead = VSIFReadL(m_buf.data(), 1, loc.size, m_file);
106 if (nBytesRead != loc.size)
107 {
108 return nullptr;
109 }
110
111 auto poFeature = std::make_unique<OGRFeature>(m_defn.get());
112 if (!poFeature->DeserializeFromBinary(m_buf.data(), m_buf.size()))
113 {
114 return nullptr;
115 }
116
117 return poFeature;
118 }
119
120 size_t Size() const override
121 {

Callers 15

GetOverviewFilenameMethod · 0.85
GetSpatialRefMethod · 0.85
SetSpatialRefMethod · 0.85
GetStatisticsMethod · 0.85
SetStatisticsMethod · 0.85
ClearStatisticsMethod · 0.85
GetGeosysMethod · 0.85
GetTransformMethod · 0.85
GetParametersMethod · 0.85
WriteSimpleMethod · 0.85
WriteParametersMethod · 0.85

Calls 7

VSIFReadLFunction · 0.85
DeserializeFromBinaryMethod · 0.80
VSIFSeekLFunction · 0.50
resizeMethod · 0.45
dataMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected