MCPcopy Create free account
hub / github.com/MariaDB/server / shapes_valid

Method shapes_valid

sql/spatial.cc:4196–4225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4194
4195
4196int Gis_multi_polygon::shapes_valid(int *valid) const
4197{
4198 uint32 n_polygons;
4199 Gis_polygon p;
4200 const char *data= m_data;
4201
4202 if (no_data(data, 4))
4203 return 1;
4204 n_polygons= uint4korr(data);
4205 data+= 4;
4206
4207 *valid= 0;
4208
4209 while (n_polygons--)
4210 {
4211 if (no_data(data, WKB_HEADER_SIZE))
4212 return 1;
4213 data+= WKB_HEADER_SIZE;
4214 p.set_data_ptr(data, (uint32) (m_data_end - data));
4215 if (p.is_valid(valid))
4216 return 1;
4217
4218 if (*valid == 0)
4219 break;
4220
4221 data+= p.get_data_size();
4222 }
4223
4224 return 0;
4225}
4226
4227
4228int Gis_multi_polygon::make_clockwise(String *result) const

Callers

nothing calls this directly

Calls 4

uint4korrFunction · 0.85
set_data_ptrMethod · 0.80
is_validMethod · 0.45
get_data_sizeMethod · 0.45

Tested by

no test coverage detected