Package com.sosnoski.seismic.common

Examples of com.sosnoski.seismic.common.Quake


            int region = Integer.parseInt(line.substring(0, mark));
            line = line.substring(mark+1).trim();
            int seismic = Integer.parseInt(line);
       
            // create and add quake information
            Quake quake = new Quake(date, millis, lat, lng, mag,
                method, depth, m_regions[region-1]);
            m_seismicInfos[seismic-1].addQuake(quake);
               
        }
    }
View Full Code Here


                    limit = seis.firstQuake(maxdate.getTime()+1);
                }
                for (; index < limit; index++) {
                   
                    // match quake information against query constraints
                    Quake quake = quakes[index];
                    boolean match = true;
                    if (minlng != null) {
                        match = minlng.floatValue() <= quake.getLongitude();
                    }
                    if (match && maxlng != null) {
                        match = maxlng.floatValue() > quake.getLongitude();
                    }
                    if (match && minlat != null) {
                        match = minlat.floatValue() <= quake.getLatitude();
                    }
                    if (match && maxlat != null) {
                        match = maxlat.floatValue() > quake.getLatitude();
                    }
                    if (match && minmag != null) {
                        match = minmag.floatValue() <= quake.getMagnitude();
                    }
                    if (match && maxmag != null) {
                        match = maxmag.floatValue() > quake.getMagnitude();
                    }
                    if (match && mindepth != null) {
                        match = mindepth.floatValue() <= quake.getDepth();
                    }
                    if (match && maxdepth != null) {
                        match = maxdepth.floatValue() > quake.getDepth();
                    }
                   
                    // check matched result
                    if (match) {
                        matches.add(quake);
                        int rcode = quake.getRegion().getRegionCode();
                        if (!rgnhits[rcode-1]) {
                            rgnhits[rcode-1] = true;
                            rgncnt++;
                        }
                    }
View Full Code Here

TOP

Related Classes of com.sosnoski.seismic.common.Quake

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.