Esempio n. 1
0
 bool GeoParser::parsePolygon(const BSONObj &obj, S2Polygon *out) {
     if (isGeoJSONPolygon(obj)) {
         parseGeoJSONPolygon(obj, out);
         return true;
     } else if (isLegacyPolygon(obj)) {
         parseLegacyPolygon(obj, out);
         return true;
     } else {
         return false;
     }
 }
Esempio n. 2
0
 bool GeoParser::parsePolygon(const BSONObj &obj, Polygon *out) {
     if (!isLegacyPolygon(obj)) { return false; }
     parseLegacyPolygon(obj, out);
     return true;
 }