Search for incoming users around the store in latitude and longitudeMost efficient way to find points within a certain radius from a given pointWhat datatype to use when storing latitude and longitude data in SQL databases?Which data type for latitude and longitude?SQL Server - From longitude and latitude to geometry data typeSearch text in stored procedure in SQL ServerNode.js: Find Nearby Eventsretrieve record from database using latitude longitude distance mysql joinHow to store longitude & latitude as a geography in sql server 2014?DynamoDB Table query items using global secondary indexCan you execute WHERE clauses in a PostgreSQL stored procedure IF clause?Get points within a certain radius
Help me aout with this summation
How to remove threat that antivirus program indicates has to be manually deleted?
Change default layout when create new product
Annotating a table with arrows
Voltage across a resistor
Am I overreacting to my team leader's unethical requests?
Can anybody explain why using multicolumn changes the width of the four-column tabular environment?
Are differences between uniformly distributed numbers uniformly distributed?
Can I not use QM-AM inequality to solve this?
Breadcrumb history decision
Bitcoin successfully deducted on sender wallet but did not reach receiver wallet
is this F 6'9 chord a figured bass or a chord extension?
Visa National - No Exit Stamp From France on Return to the UK
If clocks themselves are based on light signals, wouldn't we expect the measured speed of light to always be the same constant?
If a digital camera can be "hacked" in the ransomware sense, how best to protect it?
Why did the RAAF procure the F/A-18 despite being purpose-built for carriers?
Why is there a large performance impact when looping over an array over 240 elements?
How to remove ambiguity: "... lives in the city of H, the capital of the province of NS, WHERE the unemployment rate is ..."?
Is this n-speak?
How to mark beverage cans in a cooler for a blind person?
Lethal damage while controlling Sower of Discord?
Simplification of numbers
Do beef farmed pastures net remove carbon emissions?
0xF1 opcode-prefix on i80286
Search for incoming users around the store in latitude and longitude
Most efficient way to find points within a certain radius from a given pointWhat datatype to use when storing latitude and longitude data in SQL databases?Which data type for latitude and longitude?SQL Server - From longitude and latitude to geometry data typeSearch text in stored procedure in SQL ServerNode.js: Find Nearby Eventsretrieve record from database using latitude longitude distance mysql joinHow to store longitude & latitude as a geography in sql server 2014?DynamoDB Table query items using global secondary indexCan you execute WHERE clauses in a PostgreSQL stored procedure IF clause?Get points within a certain radius
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am developing a server on node.js. I need to find incoming users within the store in latitude and longitude.
I have a table of stores:
merchant_id | merchant_name | ... | locations |
----------------------------------------------------------------
1 | name 1 | ... | (35.2400874,-80.8438284) |
1 | name 1 | ... | (35.2810371,-80.8285142) |
2 | name 2 | ... | (35.2810371,-80.8285142) |
3 | name 3 | ... | (35.2879564,-80.7948781) |
I also have a user table:
usaer_id | user_name | ... | locations |
----------------------------------------------------------------
1 | name 1 | ... | (35.2358578,-80.8468168) |
1 | name 1 | ... | (35.2366682,-80.8489705) |
2 | name 2 | ... | (35.2433762,-80.8478121) |
3 | name 3 | ... | (35.2632458,-80.8619878) |
4 | name 4 | ... | (35.2778369,-80.8315268) |
Field types:
CREATE TABLE merchants(
merchant_id SERIAL PRIMARY KEY,
merchant_name VARCHAR(220) NOT NULL,
...
location POINT
);
CREATE TABLE users(
user_id SERIAL PRIMARY KEY,
user_name VARCHAR(40) NOT NULL,
...
notification POINT
);
How can I find users who are located within a radius of 3 kilometers from the store?
sql node.js postgresql
add a comment |
I am developing a server on node.js. I need to find incoming users within the store in latitude and longitude.
I have a table of stores:
merchant_id | merchant_name | ... | locations |
----------------------------------------------------------------
1 | name 1 | ... | (35.2400874,-80.8438284) |
1 | name 1 | ... | (35.2810371,-80.8285142) |
2 | name 2 | ... | (35.2810371,-80.8285142) |
3 | name 3 | ... | (35.2879564,-80.7948781) |
I also have a user table:
usaer_id | user_name | ... | locations |
----------------------------------------------------------------
1 | name 1 | ... | (35.2358578,-80.8468168) |
1 | name 1 | ... | (35.2366682,-80.8489705) |
2 | name 2 | ... | (35.2433762,-80.8478121) |
3 | name 3 | ... | (35.2632458,-80.8619878) |
4 | name 4 | ... | (35.2778369,-80.8315268) |
Field types:
CREATE TABLE merchants(
merchant_id SERIAL PRIMARY KEY,
merchant_name VARCHAR(220) NOT NULL,
...
location POINT
);
CREATE TABLE users(
user_id SERIAL PRIMARY KEY,
user_name VARCHAR(40) NOT NULL,
...
notification POINT
);
How can I find users who are located within a radius of 3 kilometers from the store?
sql node.js postgresql
2
Have a look at this stackoverflow.com/questions/36358188/…
– Pavel Smirnov
Mar 27 at 9:11
1
Please consider using PostGIS, so ageometry(point)instead ofpoint.
– JGH
Mar 27 at 11:43
add a comment |
I am developing a server on node.js. I need to find incoming users within the store in latitude and longitude.
I have a table of stores:
merchant_id | merchant_name | ... | locations |
----------------------------------------------------------------
1 | name 1 | ... | (35.2400874,-80.8438284) |
1 | name 1 | ... | (35.2810371,-80.8285142) |
2 | name 2 | ... | (35.2810371,-80.8285142) |
3 | name 3 | ... | (35.2879564,-80.7948781) |
I also have a user table:
usaer_id | user_name | ... | locations |
----------------------------------------------------------------
1 | name 1 | ... | (35.2358578,-80.8468168) |
1 | name 1 | ... | (35.2366682,-80.8489705) |
2 | name 2 | ... | (35.2433762,-80.8478121) |
3 | name 3 | ... | (35.2632458,-80.8619878) |
4 | name 4 | ... | (35.2778369,-80.8315268) |
Field types:
CREATE TABLE merchants(
merchant_id SERIAL PRIMARY KEY,
merchant_name VARCHAR(220) NOT NULL,
...
location POINT
);
CREATE TABLE users(
user_id SERIAL PRIMARY KEY,
user_name VARCHAR(40) NOT NULL,
...
notification POINT
);
How can I find users who are located within a radius of 3 kilometers from the store?
sql node.js postgresql
I am developing a server on node.js. I need to find incoming users within the store in latitude and longitude.
I have a table of stores:
merchant_id | merchant_name | ... | locations |
----------------------------------------------------------------
1 | name 1 | ... | (35.2400874,-80.8438284) |
1 | name 1 | ... | (35.2810371,-80.8285142) |
2 | name 2 | ... | (35.2810371,-80.8285142) |
3 | name 3 | ... | (35.2879564,-80.7948781) |
I also have a user table:
usaer_id | user_name | ... | locations |
----------------------------------------------------------------
1 | name 1 | ... | (35.2358578,-80.8468168) |
1 | name 1 | ... | (35.2366682,-80.8489705) |
2 | name 2 | ... | (35.2433762,-80.8478121) |
3 | name 3 | ... | (35.2632458,-80.8619878) |
4 | name 4 | ... | (35.2778369,-80.8315268) |
Field types:
CREATE TABLE merchants(
merchant_id SERIAL PRIMARY KEY,
merchant_name VARCHAR(220) NOT NULL,
...
location POINT
);
CREATE TABLE users(
user_id SERIAL PRIMARY KEY,
user_name VARCHAR(40) NOT NULL,
...
notification POINT
);
How can I find users who are located within a radius of 3 kilometers from the store?
sql node.js postgresql
sql node.js postgresql
asked Mar 27 at 9:03
MegaRoksMegaRoks
3042 silver badges12 bronze badges
3042 silver badges12 bronze badges
2
Have a look at this stackoverflow.com/questions/36358188/…
– Pavel Smirnov
Mar 27 at 9:11
1
Please consider using PostGIS, so ageometry(point)instead ofpoint.
– JGH
Mar 27 at 11:43
add a comment |
2
Have a look at this stackoverflow.com/questions/36358188/…
– Pavel Smirnov
Mar 27 at 9:11
1
Please consider using PostGIS, so ageometry(point)instead ofpoint.
– JGH
Mar 27 at 11:43
2
2
Have a look at this stackoverflow.com/questions/36358188/…
– Pavel Smirnov
Mar 27 at 9:11
Have a look at this stackoverflow.com/questions/36358188/…
– Pavel Smirnov
Mar 27 at 9:11
1
1
Please consider using PostGIS, so a
geometry(point) instead of point.– JGH
Mar 27 at 11:43
Please consider using PostGIS, so a
geometry(point) instead of point.– JGH
Mar 27 at 11:43
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55373296%2fsearch-for-incoming-users-around-the-store-in-latitude-and-longitude%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55373296%2fsearch-for-incoming-users-around-the-store-in-latitude-and-longitude%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Have a look at this stackoverflow.com/questions/36358188/…
– Pavel Smirnov
Mar 27 at 9:11
1
Please consider using PostGIS, so a
geometry(point)instead ofpoint.– JGH
Mar 27 at 11:43