Latitude और Longitude वे दो संख्याएं हैं जो पृथ्वी पर हर point को define करती हैं। Latitude बताता है कि आप कितने उत्तर या दक्षिण में हैं। Longitude बताता है कि आप कितने पूर्व या पश्चिम में हैं। मिलकर ये एक coordinate pair बनाते हैं जिसे कोई भी map, GPS device, geocoding API, या AI assistant समझ सकता है।
अधिकतर developers coordinates के बारे में बिना सोचे use करते हैं, जब तक कोई bug नहीं आ जाता। यह गाइड बताती है कि प्रत्येक क्या मापता है, production में मिलने वाले format conventions, और वह swap जो किसी भी अन्य गलती से अधिक map bugs पैदा करता है।
Latitude क्या मापता है
Latitude एक कोण (angle) है, जो degrees में मापा जाता है, पृथ्वी की सतह पर एक बिंदु और equatorial plane के बीच। Equator 0 degrees है। North Pole +90 degrees है। South Pole -90 degrees है। Latitude रेखाएं (जिन्हें parallels कहते हैं) globe के चारों ओर क्षैतिज रूप से चलती हैं और हर जगह एक-दूसरे से समान दूरी पर रहती हैं।
एक degree latitude हमेशा ज़मीन पर लगभग 111 kilometres होता है, चाहे आप कहीं भी हों। यह स्थिरता ही latitude को flight planning से लेकर climate science तक हर काम के लिए उपयोगी बनाती है।
Longitude क्या मापता है
Longitude किसी बिंदु और prime meridian के बीच का कोण है, वह रेखा जो Greenwich, London से 0 degrees longitude पर गुज़रती है। Longitude -180 degrees (पश्चिम) से +180 degrees (पूर्व) तक चलता है। दोनों values ग्रह के दूसरी तरफ antimeridian पर मिलती हैं, जो International Date Line का अधिकांश हिस्सा बनाती है।
Latitude के विपरीत, एक degree longitude द्वारा cover की गई ज़मीन की दूरी इस बात पर निर्भर करती है कि आप कहाँ हैं। Equator पर, एक degree longitude लगभग 111 km है, latitude जितना ही। Helsinki पर यह लगभग 56 km है। Poles पर यह शून्य हो जाता है, क्योंकि सभी longitude रेखाएं वहाँ मिलती हैं।
यही convergence कारण है कि flat map पर distance calculations लंबे routes या poles के पास के points के लिए टूट जाती हैं। Proper distance functions haversine formula या Vincenty's formula use करती हैं, जो पृथ्वी की curvature को account करती हैं।
The Famous Swap (और इससे कैसे बचें)
Production geospatial code में सबसे आम गलती latitude और longitude को swap कर देना है। कारण यह है कि अलग-अलग formats के अलग-अलग conventions हैं:
- Human display, addresses, GPS apps: latitude पहले।
48.8584, 2.2945का मतलब है lat 48.8584, lng 2.2945। - GeoJSON, WKT, अधिकतर geospatial standards: longitude पहले।
[2.2945, 48.8584]वही point है। - MapAtlas Geocoding API और अधिकतर "v1" REST APIs: JSON keys (
lat,lng) में latitude पहले, लेकिन conventions vary होते हैं इसलिए endpoint docs ज़रूर चेक करें।
अगर आप GeoJSON से एक feature निकाल रहे हैं और उसे एक map library में डाल रहे हैं जो [lat, lng] expect करती है, तो आपको swap करना होगा। अगर भूल गए, तो आपका point गलत hemisphere में land करेगा, और अगले दो दिन यह समझने में बर्बाद होंगे कि "Paris" Africa के तट के पास क्यों दिख रहा है।
एक defensive rule: किसी भी function में जो coordinates लेता है, parameters को explicitly name करें। function distance(latA, lngA, latB, lngB) को misuse करना function distance(a, b) से ज़्यादा मुश्किल है जहाँ a और b vague arrays हैं।
Decimal Degrees बनाम DMS
Code में आपको सबसे अधिक दिखने वाला format decimal degrees (DD) है: 48.8584, 2.2945। यही हर modern API और library expect करती है।
कभी-कभी आप degrees-minutes-seconds (DMS) से मिलेंगे: 48 deg 51' 30" N, 2 deg 17' 40" E। DMS पुरानी maritime और aviation परंपरा से आती है, और यह अभी भी official paper maps और कुछ hardware GPS units पर use होती है। DMS को DD में convert करना straightforward है: DD = degrees + (minutes / 60) + (seconds / 3600), South या West के लिए negation के साथ।
Storage के लिए, 5 से 6 digits precision के साथ decimal degrees हर realistic use case cover करता है। 6 से अधिक places precision theatre है, क्योंकि real-world GPS units शायद ही centimetre accuracy से बेहतर deliver करते हैं।
कितने Digits of Precision चाहिए?
Latitude या longitude का प्रत्येक decimal place position को लगभग 10 के factor से refine करता है:
- 0 decimal places (
48): लगभग 111 km, country level - 1 place (
48.8): लगभग 11 km, city level - 2 places (
48.86): लगभग 1.1 km, neighbourhood level - 3 places (
48.858): लगभग 110 metres, street level - 4 places (
48.8584): लगभग 11 metres, building level - 5 places (
48.85844): लगभग 1 metre, doorway level - 6 places (
48.858445): लगभग 11 centimetres, GPS limit - 7+ places: false precision, real-world GPS accuracy से अधिक
वही precision चुनें जो आपके काम से match करे। किसी "deliver to this neighbourhood" use case के लिए 8 decimal places store करना जगह बर्बाद करता है।
Coordinates और Map Projections
Numbers खुद पृथ्वी की surface पर angular measurements हैं, लेकिन screen flat है। हर map projection एक mathematical function है जो latitude और longitude को display के लिए pixel x,y में बदलती है।
Web Mercator (EPSG:3857) वह projection है जिसे Google Maps, OpenStreetMap, और लगभग हर interactive web map use करता है। यह shape और direction preserve करता है लेकिन area distort करता है: Greenland Africa जितना बड़ा दिखता है, जबकि वास्तव में यह चौदह गुना छोटा है। Production maps के लिए, यह distortion तब तक मायने नहीं रखती जब तक users जगहें पहचान सकें। Area compare करने वाले thematic maps के लिए (population, election results, climate), equal-area projection use करें।
आप जो coordinate values store करते हैं वे हमेशा WGS84 latitude और longitude में होते हैं। Projection render time पर apply होती है। Database में projection-space coordinates को WGS84 coordinates के साथ mix करना bugs का एक और classic source है।
Coordinates Store और Index करना
अधिकतर databases में, latitude और longitude को दो numeric columns के रूप में store करें (या geometry(point, 4326) अगर आप PostGIS use कर रहे हैं)। Bounding box के भीतर point lookups के लिए, प्रत्येक column पर B-tree index पर्याप्त है। "Nearest neighbour" queries के लिए, आपको spatial index चाहिए: PostGIS GIST, MySQL SPATIAL, या geohash bucket।
String के रूप में store करना ("48.8584,2.2945") उस पल आपको परेशान करेगा जब आपको filter, sort, या distance compute करना होगा। यह मत करें।
AI Assistants Coordinates कैसे Use करते हैं
Modern AI assistants (ChatGPT, Perplexity, Gemini) places के बारे में उसी तरह coordinates के ज़रिये reason करते हैं जैसे human applications करती हैं। जब कोई user "मेरे पास एक coffee shop ढूंढो" पूछता है, तो assistant user की location को एक coordinate में resolve करता है, places API query करता है, और haversine distance के अनुसार results rank करता है। आपके structured data में properly tagged coordinates (JSON-LD geo property, GeoCoordinates schema) AI assistants को आपकी listing vaguer location data वाले competitor से ऊपर pick करने में मदद करते हैं।
उन listings के लिए जो borders cross करती हैं या कई cities में compete करती हैं, coordinate disambiguator है। "Paris" ambiguous है: एक France में है और एक Texas में। Coordinate नहीं है।
MapAtlas क्यों
MapAtlas AI search era के लिए बनाया गया European mapping platform है। हर geocode, reverse lookup, isochrone, और routing call consistent ordering, GDPR compliance, और EU hosting के साथ clean WGS84 coordinates return करता है। किसी भी address को lat/lng में instantly convert करने के लिए Coordinates Lookup tool try करें, या geocoding APIs production में कैसे काम करते हैं इसकी deeper look के लिए What Is a Geocode guide पढ़ें।
अक्सर पूछे जाने वाले प्रश्न
Longitude और Latitude में क्या अंतर है?
Latitude पृथ्वी पर उत्तर-दक्षिण स्थिति मापता है (South Pole पर -90 से North Pole पर +90 तक), जबकि Longitude पूर्व-पश्चिम स्थिति मापता है (-180 से +180 तक, Greenwich meridian 0 पर)। Latitude की रेखाएं (parallels) क्षैतिज दिशा में चलती हैं और एक-दूसरे के समानांतर होती हैं। Longitude की रेखाएं ऊर्ध्वाधर चलती हैं और poles पर मिलती हैं। दोनों मिलकर एक unique coordinate pair बनाते हैं जो पृथ्वी पर किसी भी स्थान को identify करता है।
पहले कौन आता है, Longitude या Latitude?
यह format पर निर्भर करता है। Human-readable form में (Google Maps, GPS apps, addresses), Latitude पहले लिखा जाता है: 48.8584, 2.2945 का मतलब है lat 48.8584, lng 2.2945। Machine-readable formats जैसे GeoJSON और अधिकतर geospatial standards में Longitude पहले आता है: [2.2945, 48.8584]। यह swap production में map bugs का सबसे आम कारण है। हमेशा उस specific format का convention चेक करें जो आप use कर रहे हैं।
GPS coordinates कितने accurate होते हैं?
छह decimal places (जैसे 48.858444) equator पर लगभग 11 centimetre तक accurate होता है। पाँच places (48.85844) लगभग 1 metre देता है। चार places (48.8584) लगभग 11 metres देता है, जो street-level mapping के लिए पर्याप्त है। अधिकतर production use cases के लिए 6 places ज़रूरत से ज़्यादा है और 5 पर्याप्त है। ज़रूरत से ज़्यादा precision store करना bytes बर्बाद करता है।
Longitude की रेखाएं poles पर क्यों मिलती हैं?
Latitude रेखाएं parallel होती हैं क्योंकि सभी पृथ्वी की axis को reference मानती हैं। इसके विपरीत, Longitude रेखाएं great circles हैं जो North और South Poles से होकर गुज़रती हैं। Poles की ओर बढ़ने पर दो longitude values के बीच पूर्व-पश्चिम दूरी घटती जाती है: equator पर एक degree longitude लगभग 111 km होता है, लेकिन poles पर शून्य हो जाता है। इसीलिए flat coordinates से naive distance calculations high latitudes पर टूट जाती हैं, और proper distance calculations haversine formula या Vincenty's formula use करती हैं।

