private static FieldImpl makePointObs(FlatField timeStep, DateTime dt)
            throws VisADException, RemoteException {
        if (timeStep == null) {
            return null;
        }
        SampledSet domain    = getSpatialDomain(timeStep);
        int        numPoints = domain.getLength();
        Integer1DSet points = new Integer1DSet(RealType.getRealType("index"),
                numPoints);
        TupleType tt = getParamType(timeStep);
        TupleType rangeType = new TupleType(new MathType[] {
                RealTupleType.LatitudeLongitudeAltitude,
                RealType.Time,
                tt });
        FieldImpl ff = new FieldImpl(
                new FunctionType(
                        ((SetType) points.getType()).getDomain(),
                        rangeType), points);
        float[][] samples  = timeStep.getFloats(false);
        float[][] geoVals  = getEarthLocationPoints((GriddedSet) domain);
        boolean   isLatLon = isLatLonOrder(domain);
        int       latIndex = isLatLon
                ? 0
                : 1;
        int       lonIndex = isLatLon
                ? 1
                : 0;
        boolean   haveAlt  = geoVals.length > 2;
        for (int i = 0; i < numPoints; i++) {
            float lat = geoVals[latIndex][i];
            float lon = geoVals[lonIndex][i];
            float alt = haveAlt
                    ? geoVals[2][i]
                    : 0;
            if ((lat == lat) && (lon == lon)) {
                if ( !(alt == alt)) {
                    alt = 0;
                }
                EarthLocation el = new EarthLocationLite(lat, lon, alt);
                // TODO:  make this  more efficient
                PointObTuple pot = new PointObTuple(el, dt,
                        timeStep.getSample(i), rangeType);
                ff.setSample(i, pot, false, false);
            }
        }
        return ff;
    }
private static FieldImpl makePointObs(FlatField timeStep, DateTime dt)
            throws VisADException, RemoteException {
        if (timeStep == null) {
            return null;
        }
        SampledSet domain    = getSpatialDomain(timeStep);
        int        numPoints = domain.getLength();
        Integer1DSet points = new Integer1DSet(RealType.getRealType("index"),
                numPoints);
        TupleType tt = getParamType(timeStep);
        TupleType rangeType = new TupleType(new MathType[] {
                RealTupleType.LatitudeLongitudeAltitude,
                RealType.Time,
                tt });
        FieldImpl ff = new FieldImpl(
                new FunctionType(
                        ((SetType) points.getType()).getDomain(),
                        rangeType), points);
        float[][] samples  = timeStep.getFloats(false);
        float[][] geoVals  = getEarthLocationPoints((GriddedSet) domain);
        boolean   isLatLon = isLatLonOrder(domain);
        int       latIndex = isLatLon
                ? 0
                : 1;
        int       lonIndex = isLatLon
                ? 1
                : 0;
        boolean   haveAlt  = geoVals.length > 2;
        for (int i = 0; i < numPoints; i++) {
            float lat = geoVals[latIndex][i];
            float lon = geoVals[lonIndex][i];
            float alt = haveAlt
                    ? geoVals[2][i]
                    : 0;
            if ((lat == lat) && (lon == lon)) {
                if ( !(alt == alt)) {
                    alt = 0;
                }
                EarthLocation el = new EarthLocationLite(lat, lon, alt);
               
                PointObTuple pot = new PointObTuple(el, dt,
                        timeStep.getSample(i), rangeType);
                ff.setSample(i, pot, false, false);
            }
        }
        return ff;
    }
private static fieldimpl makepointobs(flatfield timestep, datetime dt) throws visadexception, remoteexception { if (timestep == null) { return null; } sampledset domain = getspatialdomain(timestep); int numpoints = domain.getlength(); integer1dset points = new integer1dset(realtype.getrealtype("index"), numpoints); tupletype tt = getparamtype(timestep); tupletype rangetype = new tupletype(new mathtype[] { realtupletype.latitudelongitudealtitude, realtype.time, tt }); fieldimpl ff = new fieldimpl( new functiontype( ((settype) points.gettype()).getdomain(), rangetype), points); float[][] samples = timestep.getfloats(false); float[][] geovals = getearthlocationpoints((griddedset) domain); boolean islatlon = islatlonorder(domain); int latindex = islatlon ? 0 : 1; int lonindex = islatlon ? 1 : 0; boolean havealt = geovals.length > 2; for (int i = 0; i < numpoints; i++) { float lat = geovals[latindex][i]; float lon = geovals[lonindex][i]; float alt = havealt ? geovals[2][i] : 0; if ((lat == lat) && (lon == lon)) { if ( !(alt == alt)) { alt = 0; } earthlocation el = new earthlocationlite(lat, lon, alt); pointobtuple pot = new pointobtuple(el, dt, timestep.getsample(i), rangetype); ff.setsample(i, pot, false, false); } } return ff; }