$geometry
$geometry
์ฐ์ฐ์ ๋ , ,
$geoWithin
$geoIntersects
$near
๋ฐ ์ง๋ฆฌ ๊ณต๊ฐ์ ์ฟผ๋ฆฌ$geometry
์ฐ์ฐ์์$nearSphere
ํจ๊ป ์ฌ์ฉํ GeoJSON ๊ธฐํ ๋ํ์ ์ง์ ํฉ๋๋ค.$geometry
์(๋)EPSG:4326
๋ฅผ ๊ธฐ๋ณธ๊ฐ ์ขํ ์ฐธ์กฐ ์์คํ (CRS)์ผ๋ก ์ฌ์ฉํฉ๋๋ค.๊ธฐ๋ณธ๊ฐ CRS๋ฅผ ์ฌ์ฉํ์ฌ GeoJSON ๊ฐ์ฒด๋ฅผ ์ง์ ํ๋ ค๋ฉด
$geometry
์ ๋ํด ๋ค์ ํ๋กํ ํ์ ์ ์ฌ์ฉํฉ๋๋ค.$geometry: { type: "<GeoJSON object type>", coordinates: [ <coordinates> ] } ์ฌ์ฉ์ ์ง์ MongoDB CRS๋ฅผ ์ฌ์ฉํ์ฌ ๋จ์ผ ๋ง GeoJSON ๋ค๊ฐํ์ ์ง์ ํ๋ ค๋ฉด ๋ค์ ํ๋กํ ํ์ ์ ์ฌ์ฉํฉ๋๋ค(
$geoWithin
๋ฐ$geoIntersects
์๋ง ์ฌ์ฉ ๊ฐ๋ฅ).$geometry: { type: "Polygon", coordinates: [ <coordinates> ], crs: { type: "name", properties: { name: "urn:x-mongodb:crs:strictwinding:EPSG:4326" } } } ์ฌ์ฉ์ ์ง์ MongoDB ์ขํ ์ฐธ์กฐ ์์คํ ์๋ ์๊ฒฉํ ์๊ณ ๋ฐ๋ ๋ฐฉํฅ ์์ธ๋ฉ ์์๊ฐ ์์ต๋๋ค.
์ค์
์๋ ๋ฐ ๊ฒฝ๋ ์ขํ๋ฅผ ์ง์ ํ๋ ๊ฒฝ์ฐ ๊ฒฝ๋๋ฅผ ๋จผ์ ๋์ดํ ๋ค์ ์๋๋ฅผ ๋์ดํฉ๋๋ค.
์ ํจํ ๊ฒฝ๋ ๊ฐ์
-180
~180
์ ๋๋ค(๋ ๋ชจ๋ ํฌํจ).์ ํจํ ์๋ ๊ฐ์
-90
~90
์ ๋๋ค(๋ ๋ชจ๋ ํฌํจ).