0

Hello, I'm a student in a summer workshop and i'm trying to make a python table from which people can choose the type , and within a mile radius. It's suppose to be compatible with an Arcgis map.

If anyone knows how to make something similar please tell me how can I make the table make a radius and give the information about the restaurant type.

This Question has been **Answered**

0

The radius is simple math (Pythagorean theorem): the distance between two points (x0,y0) and (x1,y1) is `math.sqrt((x0-x1)**2+(y0-y1)**2)`

(If you want to think about distance along a path, such as a road, then you are working on a much larger problem)

I presume that the Arcgis data contains the restaurant information, so you need to extract that, do the math calculation, and display the results "somehow".

0

The radius is simple math (Pythagorean theorem): the distance between two points (x0,y0) and (x1,y1) is

`math.sqrt((x0-x1)**2+(y0-y1)**2)`

(If you want to think about distance along a path, such as a road, then you are working on a much larger problem)I presume that the Arcgis data contains the restaurant information, so you need to extract that, do the math calculation, and display the results "somehow".

Sounds pretty hard for me. (not to good at math). But i'm the only one who wants to apply some programming in my class. Which means I don't have allot of help.

By the way the points would be the location of a persons house, and the restaurant ?

0

Sounds pretty hard for me. (not to good at math). But i'm the only one who wants to apply some programming in my class. Which means I don't have allot of help.

By the way the points would be the location of a persons house, and the restaurant ?

Well, you have the formula now, so the math is "done". All you need is to fill in the x and y values. And deal with conversions, of course: What coordinate system does Arcgis use? There are basically only three options:

- (Easiest for you) There is some point on earth that is (0,0) and everything is measured from that point by how many (units) east or west and how many (units) north or south. You use the formula I gave, then divide by units per mile (or multiply by miles per unit). This is pretty accurate, barring the fact that the earth's surface is pretty much a sphere; but it is unlikely that the data is in this format.
- (nearly as easy) The locations are in degrees E/W and degrees N/S. For that, you have to do the conversion first: convert the two differences by multiplying by miles per degree
(these conversion factors are likely different numbers for E/W and for N/S), then do*at your latitude and longitude*`math.aqrt(convertedx**2+convertedy**2)`

This works "close enough" as long as the distance is less than a couple hundred miles or so. This also suffers from spherical distortion**and**from the approximation of miles per degree; but the data is somewhat likely to be in this format. - (something proprietary). You will have to figure it out yourself.

*Edited
by griswolf*: n/a

0

Well, you have the formula now, so the math is "done". All you need is to fill in the x and y values. And deal with conversions, of course: What coordinate system does Arcgis use? There are basically only three options:

- (Easiest for you) There is some point on earth that is (0,0) and everything is measured from that point by how many (units) east or west and how many (units) north or south. You use the formula I gave, then divide by units per mile (or multiply by miles per unit). This is pretty accurate, barring the fact that the earth's surface is pretty much a sphere; but it is unlikely that the data is in this format.
- (nearly as easy) The locations are in degrees E/W and degrees N/S. For that, you have to do the conversion first: convert the two differences by multiplying by miles per degree
(these conversion factors are likely different numbers for E/W and for N/S), then doat your latitude and longitude`math.aqrt(convertedx**2+convertedy**2)`

This works "close enough" as long as the distance is less than a couple hundred miles or so. This also suffers from spherical distortionandfrom the approximation of miles per degree; but the data is somewhat likely to be in this format.- (something proprietary). You will have to figure it out yourself.

You know , I felt pretty excited to be in this geosystem ccourse / Arcgis/ Earth science . But now I discovered that the stuff I actually want to do is program , and even though I will lose a credit for this course is better to drop it, I don't like that stuff and it's better if I start doing some lower level or lower skill requirements program.

This question has already been answered. Start a new discussion instead.

Recommended Topics

Sorry for the lousy title, "InterProcess Communication" was too long

Basically, I'm looking to use the native `_winapi`

and `msvcrt`

modules to launch an integrated python interpreter and communicate with ...

hi people

I am building a atm machine but havent actually coding it as yet, just the gui interface part i have done so far because i am doing something ...

HI everyone,

I recently inherited a project that has been in production for a number of years. They want a new field added. Easy peasy - or so you would ...