Here's the original problem, guys. And, by the way, thanks for the shared brainpower.
I'm using Lingo (and DOM-Lingo) to generate SVG documents for each of the Guide Star Catalog (GSC) regions within the Tycho-2 Star Catalog. Essentially, I'm generating a TON of very detailed star charts for viewing in the Adobe SVG Viewer. There are 9,537 regions defined by the GSC to cover the whole sky, and the Tycho-2 database uses those regions to primarily identify and catalog its stars. The Tycho-2 Main Catalogue has 2.5 million+ stars, and they are ordered in the database by region (which is nice -- makes things real easy for this phase). I'm generating an SVG chart for each of the regions -- averaging over 200 stars per chart, but up to 600 stars per chart in the regions covering the Milky Way. Lingo reads the delimited database records, parses them, and does all the math for position and magnitude (cx, cy and r attributes for <circle> elements, if you know SVG). DOM-Lingo builds an SVG DOM tree for each region, and the serialized XML is spit back out into a "GSCnnnn.svg" document. The values of the "bounding box" list elements that I detailed are actually the min and max Right Ascension and Declination, expressed in decimal degrees, for each of the 9,537 GSC regions. The R.A. values run from 0.0 to 360.0, and the Decl. values run from -90.0 (South Celetial Pole) to +90.0 (North Celestial Pole). Now that I've progressed past the star plotting phase of this project, it's time to tackle the galaxies (and then, eventually, the nubulae, clusters, radio sources, etc.). The Catalog of Principal Galaxies (PGC) contains positional data for over 77,000 galaxies, but it is NOT cataloged or ordered according to GSC. Therefore, in order to make the appending of the galactic data to the existing SVG documents easier and quicker, I'm going to have to tranform the PGC database into a positionally ordered GSC-compliant format. That way, I can then work with the chunk of galaxies that lie within each region, in order. I have to read and parse the SVG document for the region, use DOM-Lingo to tack on the new galactic elements, and then reserialize. To do this first-step conversion, I need to take the R.A. and Decl. coordinates for each galaxy and match them up to the corresponding GSC region in which they lie. For each galaxy I read from the PGC, I'll append its raw data to the end of the corresponding intermediate region file. I'll then concatenate all those intermediate regions files into a single GSC-compliant database file, which I can then use to modify the existing 9,537 SVG documents. If I were to simply walk through the PGC, line for line, in the order that it is currently in, and open/parse/append/serialize each galaxy into its corresponding SVG region document, it would be take a whole heck of a lot longer to do it than if I had an entire region's worth of galaxies to slap onto them. So that's why I need to determine which GSC region a particular set of coordinates falls within. The GSC regions are only defined by their positional extents in the sky. I have to find where each galaxy goes. Thus, I need a good way to determine that, based on the list of region extents that I have. -Christopher -----Original Message----- From: Colin Holgate [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 11:38 AM To: [EMAIL PROTECTED] Subject: Re: <lingo-l> Numeric Range Search in List >tX = 124.357892 >tY = 20.736474 >tPoint = loc (tX,tY) > >repeat with i = 1 to myBigRectList.count > if tPoint.inside(myBigRectList[i]) then ..... >end repeat This is the approach I would have suggested, except it would still be up to 9500 repeats of the inside test. That's why I'm curious about what the original problem was, because there's a way to do the entire thing in one line. [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
