Re: [WebDNA] Range calculation w/negative values

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107676
interpreted = N
texte = On Nov 8, 2011, at 6:46 PM, Francisco Hirsch wrote: > Well, the use of negative signs is merely a convention, so it's ok > to exchange negative for positive Yeah, that's true. I just feel like it's cheating in the sense that if this was a worldwide database, I wouldn't have the luxury of being able to convert all the values to positives since there must be cases wherein two places would have the same exact longitude were it expressed as an absolute value. > > Francisco Hirsch > -- > http://www.ayudamac.com.ar > http://www.elasesordevinos.com.ar > http://www.fiscaldemesa.com.ar > > > > On 08/11/2011, at 10:11, Gil Poulsen wrote: > >> Haven't posted to this list in ages, but every so often you run >> into something... Doing a range calculation as part of a distance >> search based on ZIP code (aka Great Circle calculation). For >> whatever reason, I can't get the search to work on negative values, >> and the longitude of every city in the U.S. is expressed as a >> negative value. Using WebCat 5.1e on an old Mac mini G4. >> >> This is the basic search, actually comes from something another >> individual on the list posted years ago: >> >> [search db=zipcodes.db&rnLATdatarq=[lowLat], >> [hiLat]&rnLONGdatarq=[lowLong], >> [hiLong]&LATtype=num&LONGtype=num&asZIPsort=1] >> >> The [lowLong]and [hiLong] values are negative as well. If I remove >> the entire longitude section the search works fine. And if I change >> the values in the db for longitude to positive, the search works, >> but that just seems wrong... >> >> zipcodes.db >> zip city state lat long >> 00501 HOLTSVILLE NY 40.81 -73.04 >> >> >> -- >> Gil Poulsen, Mac Wirehead >> >> ************************ >> AltiM@c Consulting >> P.O. Box 2125 >> Neptune, NJ 07754 >> Voice: 609-359-0103 >> ************************ >> >> >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > -- Gil Poulsen, Mac Wirehead ************************ AltiM@c Consulting P.O. Box 2125 Neptune, NJ 07754 Voice: 609-359-0103 ************************ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Range calculation w/negative values (Gil Poulsen 2011)
  2. Re: [WebDNA] Range calculation w/negative values (Francisco Hirsch 2011)
  3. Re: [WebDNA] Range calculation w/negative values (Gil Poulsen 2011)
  4. Re: [WebDNA] Range calculation w/negative values (Gil Poulsen 2011)
  5. Re: [WebDNA] Range calculation w/negative values (Gil Poulsen 2011)
  6. Re: [WebDNA] Range calculation w/negative values (Francisco Hirsch 2011)
  7. Re: [WebDNA] Range calculation w/negative values (Govinda 2011)
  8. Re: [WebDNA] Range calculation w/negative values (Stuart Tremain 2011)
  9. [WebDNA] Range calculation w/negative values (Gil Poulsen 2011)
On Nov 8, 2011, at 6:46 PM, Francisco Hirsch wrote: > Well, the use of negative signs is merely a convention, so it's ok > to exchange negative for positive Yeah, that's true. I just feel like it's cheating in the sense that if this was a worldwide database, I wouldn't have the luxury of being able to convert all the values to positives since there must be cases wherein two places would have the same exact longitude were it expressed as an absolute value. > > Francisco Hirsch > -- > http://www.ayudamac.com.ar > http://www.elasesordevinos.com.ar > http://www.fiscaldemesa.com.ar > > > > On 08/11/2011, at 10:11, Gil Poulsen wrote: > >> Haven't posted to this list in ages, but every so often you run >> into something... Doing a range calculation as part of a distance >> search based on ZIP code (aka Great Circle calculation). For >> whatever reason, I can't get the search to work on negative values, >> and the longitude of every city in the U.S. is expressed as a >> negative value. Using WebCat 5.1e on an old Mac mini G4. >> >> This is the basic search, actually comes from something another >> individual on the list posted years ago: >> >> [search db=zipcodes.db&rnLATdatarq=[lowLat], >> [hiLat]&rnLONGdatarq=[lowLong], >> [hiLong]&LATtype=num&LONGtype=num&asZIPsort=1] >> >> The [lowLong]and [hiLong] values are negative as well. If I remove >> the entire longitude section the search works fine. And if I change >> the values in the db for longitude to positive, the search works, >> but that just seems wrong... >> >> zipcodes.db >> zip city state lat long >> 00501 HOLTSVILLE NY 40.81 -73.04 >> >> >> -- >> Gil Poulsen, Mac Wirehead >> >> ************************ >> AltiM@c Consulting >> P.O. Box 2125 >> Neptune, NJ 07754 >> Voice: 609-359-0103 >> ************************ >> >> >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > -- Gil Poulsen, Mac Wirehead ************************ AltiM@c Consulting P.O. Box 2125 Neptune, NJ 07754 Voice: 609-359-0103 ************************ Gil Poulsen

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Suffix Mapping (1997) TCPConnect to Telnet (2003) General WebCatalog Questions (1997) Slightly OT: [sendmail] help (2003) WebCatalog2 Feature Feedback (1996) WebCat2.0b15-to many nested [xx] tags (1997) [WebDNA] max in a search (2009) RE: Can a database get stomped by simultaneous access? (1997) Sendmail problem (2002) question: back button prevention (1997) problem with applets embedded in tpl files (1997) Pulling Captions from JPGs (2003) New Webcatalog for Mac (1997) 2nd WebCatalog2 Feature Request (1996) Delete context run amok (2005) Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997) Multiple catalog databases and showcart (1997) WebCat2 - storing unformatted date data? (1997) Merging databases (1997) Need relative path explanation (1997)