SORTING IN EXEL ??

 

If I sort my EXCEL file, What is the best way to sort it
Lat ?
or
Long ?

I kind of want to get them sorted by distance, but not quit sure how Lat/Long work?

Thanks

--
TRACY

they are just two lines,

they are just two lines, east/west and north/south. Lines of lattitude are horizontal lines running east and west, longitude lines run north and south.

So your lattitude puts you............here

while your longitude puts you.
.
.
.
.
here... sort of... but that's the way they work, get an east/west coordinate, and a north south coordinate, draw two lines, one east to west, the other north to south, and where they intersect is your coordinate.

I sorted mine by longitude, then lattitude but still can't get a decent grouping around where I live...

--
. . If I only had a brain....................................... http://www.hugginsnet.com/ilovemymio ..................................................... GPS Units in Use: Mio C310x (primary) and Garmin eTrex Legend for GeoCaching.

sorting

I don't know that it makes much difference, but I usually sort by longitude then latitude when I'm working with data in Excel. This might make sense when you consider the USA mainland is wider East/West than it is North/South. However, if your locations are mostly along the East or West coast, then sorting by Latitude first might be better.

To get good groupings, I use GIS software to map and select areas from larger data sets.

JM

Sorting...

Is there a reason to sort by lat/lon? Once it's in the POI, the GPS unit is going to automatically display them by distance from it's current location.

Am I omitting something w/ the POIs that I'm contributing?

I'm sure enjoying this website and making new POIs. mj

SORTING

To the average person. NO.
But
I am creating/up-dating a file for Paintball Sites in the U.S.
I am currently going back into my Eastern U.S. file, and adding Addresses and Phone Numbers, Then going to branch out to include the Whole U.S. (Big Undertaking).

The reason I'm doing this is in case the file is off slightly, or the person wants to "Call Ahead", and make sure the Paintball Field is open or still operational.

--
TRACY

sorting

It doesn't matter to your GPS if the source file is sorted or not. However, you may want to sort the file to help find duplicates or to attempt to find nearby locations. Even with sorting, these tasks can be hard to accomplish without GIS software.

JM

I sorted to reduce the

I sorted to reduce the amount of POI's in a given file. I have regionalized all of mine as I don't need stuff from the west coast if I'm not going there.

--
. . If I only had a brain....................................... http://www.hugginsnet.com/ilovemymio ..................................................... GPS Units in Use: Mio C310x (primary) and Garmin eTrex Legend for GeoCaching.

gpsbabel does this for

gpsbabel does this for you.

http://www.mousetrap.net/~mouse/gps/poi.html#radius

If you give it a Sufficiently Large Radius it will keep all the waypoints but order them top-bottom nearest-farthest from your specified point.

Here's how I do it in unix, passing the filename and desired radius at runtime:
===script starts====
STUB=$1
RADIUS=$2

gpsbabel \
-i garmin_poi \
-f ${STUB}.csv \
-x radius,distance=${RADIUS}M,lat=33.0,lon=-96.8 \
-o garmin_poi -F ${STUB}local${RADIUS}.csv
===script ends====

--
US-only CoPilot + android Optimus T = cheap, effective nav http://www.mousetrap.net/mouse/gps/

nice tip

I didn't know gpsbabel had that feature. Thanks for sharing.

JM

excel macro

you can also use the macro function in Excel to calculate distances. This is the macro I use to directly calculate distance from the CSV files from a specific inputted point:

Function ArcCos(X As Double) As Double
ArcCos = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
End Function

Sub dist()

LR = ActiveCell.SpecialCells(xlLastCell).Row
'Range("G1").Value = "Miles"
'Range("H1").Value = "KM"

D = InputBox("Enter your Longitude in decimal format", "Longitude")
D = D / 57.29577951 'LONG2 (all converted to radians: degree/57.29577951)
C = InputBox("Enter your Latitude in decimal format", "Latitude")
C = C / 57.29577951 'LAT2

For R = 1 To LR

A = (Range("B" & R).Value) / 57.29577951 'LAT1
B = (Range("a" & R).Value) / 57.29577951 'LONG1

If A = C And B = D Then distance = 0 Else

If (Sin(A) * Sin(C) + Cos(A) * Cos(C) * Cos(B - D)) > 1 Then distance = 3963.1 * ArcCos(1) Else

distance = 3963.1 * ArcCos(Sin(A) * Sin(C) + Cos(A) * Cos(C) * Cos(B - D))
Range("G" & R).Value = distance
Range("H" & R).Value = distance * 1.609344

Next R
End Sub

--
Nuvi 350

MACRO WORKED

I used your MACRO
It worked.

It put the info in Col G and H, so it doesn't effect the saving and POI aspect.

I then sorted by row G, then 2nd Sort by Row C.

The result was a complete list sorted by how close to my house.

Thanks.

It really worked well.

--
TRACY