Changeset 6084 for geovis


Ignore:
Timestamp:
Mar 1, 2016 1:55:42 PM (8 years ago)
Author:
ldelgass
Message:

Quiet log output from info to trace, now that frame tracing has a separate
define.

Location:
geovis/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • geovis/trunk/Picker.cpp

    r6083 r6084  
    9494    osgEarth::Features::FeatureIndex *index = osgEarth::Registry::objectIndex()->get<osgEarth::Features::FeatureIndex>(id);
    9595    osgEarth::Features::Feature *feature = index ? index->getFeature(id) : 0L;
    96     INFO("Hover hit");
     96    TRACE("Hover hit");
    9797    if (feature) {
    98         INFO("Hit feature ID: %lu (of %d), oid: %lu", feature->getFID(), index->size(), id);
     98        TRACE("Hit feature ID: %lu (of %d), oid: %lu", feature->getFID(), index->size(), id);
    9999        const osgEarth::Features::AttributeTable &attrs = feature->getAttrs();
    100100        for (osgEarth::Features::AttributeTable::const_iterator itr = attrs.begin(); itr != attrs.end(); ++itr) {
    101             INFO(" attr: %s", itr->first.c_str());
     101            TRACE(" attr: %s", itr->first.c_str());
    102102            switch (itr->second.first) {
    103103            case osgEarth::Features::ATTRTYPE_STRING:
    104                 INFO(" value: %s", itr->second.getString().c_str());
     104                TRACE(" value: %s", itr->second.getString().c_str());
    105105                break;
    106106            case osgEarth::Features::ATTRTYPE_INT:
    107                 INFO(" value: %d", itr->second.getInt());
     107                TRACE(" value: %d", itr->second.getInt());
    108108                break;
    109109            case osgEarth::Features::ATTRTYPE_DOUBLE:
    110                 INFO(" value: %g", itr->second.getDouble());
     110                TRACE(" value: %g", itr->second.getDouble());
    111111                break;
    112112            case osgEarth::Features::ATTRTYPE_BOOL:
    113                 INFO(" value: %s", itr->second.getBool() ? "true" : "false");
     113                TRACE(" value: %s", itr->second.getBool() ? "true" : "false");
    114114                break;
    115115            default:
    116                 INFO(" value: unknown type");
     116                TRACE(" value: unknown type");
    117117            }
    118118        }
    119         //INFO("Feature name: %s", feature->getString("name").c_str());
     119        //TRACE("Feature name: %s", feature->getString("name").c_str());
    120120    } else {
    121121        osgEarth::Annotation::AnnotationNode* anno =
     
    129129        }
    130130        if (anno != NULL && anno->getDecoration().empty()) {
    131             INFO("Hit AnnotationNode: %p", anno);
     131            TRACE("Hit AnnotationNode: %p", anno);
    132132#if 0
    133133            if (hovered.find(anno) == hovered.end()) {
     
    153153void HoverCallback::onMiss()
    154154{
    155     INFO("Hover miss");
     155    TRACE("Hover miss");
    156156    std::set<osgEarth::Annotation::AnnotationNode*> toUnHover;
    157157    std::set<osgEarth::Annotation::AnnotationNode*>& hovered = _renderer->getHovered();
     
    189189    osgEarth::Features::FeatureIndex *index = osgEarth::Registry::objectIndex()->get<osgEarth::Features::FeatureIndex>(id);
    190190    osgEarth::Features::Feature *feature = index ? index->getFeature(id) : 0L;
    191     INFO("Select hit oid: %lu at %g,%g", id, _pickPoint.x(), _pickPoint.y());
     191    TRACE("Select hit oid: %lu at %g,%g", id, _pickPoint.x(), _pickPoint.y());
    192192    if (feature) {
    193193        osgEarth::Features::FeatureSourceIndex *fsi = dynamic_cast<osgEarth::Features::FeatureSourceIndex *>(index);
     
    199199            }
    200200        }
    201         INFO("Hit feature ID: %lu (of %d) layer: %s", feature->getFID(), index->size(), layerName.c_str());
     201        TRACE("Hit feature ID: %lu (of %d) layer: %s", feature->getFID(), index->size(), layerName.c_str());
    202202
    203203        _renderer->clearSelection();
     
    213213            osgEarth::Registry::objectIndex()->get<osgEarth::Annotation::AnnotationNode>(id);
    214214        if (anno != NULL) {
    215             INFO("Hit AnnotationNode: %p, \"%s\"", anno, anno->getName().c_str());
     215            TRACE("Hit AnnotationNode: %p, \"%s\"", anno, anno->getName().c_str());
    216216            char mesg[256];
    217217            snprintf(mesg, sizeof(mesg), "nv>select annotation %u {%s}\n", id, anno->getName().c_str());
     
    227227void SelectCallback::onMiss()
    228228{
    229     INFO("Select miss");
     229    TRACE("Select miss");
    230230    _renderer->clearSelection();
    231231
  • geovis/trunk/Placard.cpp

    r5974 r6084  
    6464        placardConf.getEntry(i, name, label);
    6565        oss << label << ": ";
    66         INFO(" attr: %s '%s'", name.c_str(), label.c_str());
     66        TRACE(" attr: %s '%s'", name.c_str(), label.c_str());
    6767        osgEarth::Features::AttributeTable::const_iterator itr = _attrs.find(name);
    6868        if (itr == _attrs.end())
     
    7070        switch (itr->second.first) {
    7171        case osgEarth::Features::ATTRTYPE_STRING:
    72             INFO(" value: %s", itr->second.getString().c_str());
     72            TRACE(" value: %s", itr->second.getString().c_str());
    7373            oss << itr->second.getString() << std::endl;
    7474            break;
    7575        case osgEarth::Features::ATTRTYPE_INT:
    76             INFO(" value: %d", itr->second.getInt());
     76            TRACE(" value: %d", itr->second.getInt());
    7777            oss << itr->second.getInt() << std::endl;
    7878            break;
    7979        case osgEarth::Features::ATTRTYPE_DOUBLE:
    80             INFO(" value: %g", itr->second.getDouble());
     80            TRACE(" value: %g", itr->second.getDouble());
    8181            oss << itr->second.getDouble() << std::endl;
    8282            break;
    8383        case osgEarth::Features::ATTRTYPE_BOOL:
    84             INFO(" value: %s", itr->second.getBool() ? "true" : "false");
     84            TRACE(" value: %s", itr->second.getBool() ? "true" : "false");
    8585            oss << (itr->second.getBool() ? "true" : "false") << std::endl;
    8686            break;
     
    113113        placardConf.getEntry(i, name, label);
    114114        oss << label << ": ";
    115         INFO(" attr: %s '%s'", name.c_str(), label.c_str());
     115        TRACE(" attr: %s '%s'", name.c_str(), label.c_str());
    116116        osgEarth::Features::AttributeTable::const_iterator itr = _attrs.find(name);
    117117        if (itr == _attrs.end())
     
    119119        switch (itr->second.first) {
    120120        case osgEarth::Features::ATTRTYPE_STRING:
    121             INFO(" value: %s", itr->second.getString().c_str());
     121            TRACE(" value: %s", itr->second.getString().c_str());
    122122            oss << itr->second.getString() << std::endl;
    123123            break;
    124124        case osgEarth::Features::ATTRTYPE_INT:
    125             INFO(" value: %d", itr->second.getInt());
     125            TRACE(" value: %d", itr->second.getInt());
    126126            oss << itr->second.getInt() << std::endl;
    127127            break;
    128128        case osgEarth::Features::ATTRTYPE_DOUBLE:
    129             INFO(" value: %g", itr->second.getDouble());
     129            TRACE(" value: %g", itr->second.getDouble());
    130130            oss << itr->second.getDouble() << std::endl;
    131131            break;
    132132        case osgEarth::Features::ATTRTYPE_BOOL:
    133             INFO(" value: %s", itr->second.getBool() ? "true" : "false");
     133            TRACE(" value: %s", itr->second.getBool() ? "true" : "false");
    134134            oss << (itr->second.getBool() ? "true" : "false") << std::endl;
    135135            break;
  • geovis/trunk/Renderer.cpp

    r6083 r6084  
    17481748            pt.y() >= _latMin && pt.y() <= _latMax) {
    17491749            if (_renderer->select(placeNode)) {
    1750                 INFO("Select PlaceNode: %g %g n:'%s' t:'%s'",
     1750                TRACE("Select PlaceNode: %g %g n:'%s' t:'%s'",
    17511751                     pt.x(), pt.y(), placeNode->getName().c_str(),
    17521752                     placeNode->getText().c_str());
     
    19241924    }
    19251925    if (_picker->pick(_viewer.get(), mouseX, mouseY)) {
    1926         INFO("Hover pick queued: %g %g", mouseX, mouseY);
    1927     } else {
    1928         INFO("Failed to queue pick: %g %g", mouseX, mouseY);
     1926        TRACE("Hover pick queued: %g %g", mouseX, mouseY);
     1927    } else {
     1928        TRACE("Failed to queue pick: %g %g", mouseX, mouseY);
    19291929    }
    19301930}
     
    23442344                ext = ts->getProfile()->getExtent();
    23452345            }
    2346             INFO("Image layer %s srs: %s extent: %g %g %g %g",
     2346            TRACE("Image layer %s srs: %s extent: %g %g %g %g",
    23472347                 name, ext.getSRS() ? ext.getSRS()->getName().c_str() : "nil",
    23482348                 ext.xMin(), ext.yMin(), ext.xMax(), ext.yMax());
     
    23692369                ext = ts->getProfile()->getExtent();
    23702370            }
    2371             INFO("Elevation Layer %s srs: %s extent: %g %g %g %g",
     2371            TRACE("Elevation Layer %s srs: %s extent: %g %g %g %g",
    23722372                 name, ext.getSRS() ? ext.getSRS()->getName().c_str() : "nil",
    23732373                 ext.xMin(), ext.yMin(), ext.xMax(), ext.yMax());
     
    24012401                return false;
    24022402            }
    2403             INFO("Model Layer %s srs: %s extent: %g %g %g %g",
     2403            TRACE("Model Layer %s srs: %s extent: %g %g %g %g",
    24042404                 name, ext.getSRS() ? ext.getSRS()->getName().c_str() : "nil",
    24052405                 ext.xMin(), ext.yMin(), ext.xMax(), ext.yMax());
     
    24532453    osgEarth::Units distanceUnits = getMapSRS()->getUnits();
    24542454    if (getMapSRS()->isProjected() && !getMapSRS()->isPlateCarre()) {
    2455         INFO("Projected");
     2455        TRACE("Projected");
    24562456        osg::ref_ptr<const osgEarth::SpatialReference> fromSRS =
    24572457            srs ? srs : osgEarth::SpatialReference::create("wgs84");
     
    24612461        _viewer->getCamera()->getProjectionMatrixAsPerspective(fovy, aspect, near, far);
    24622462        distance = height / (2. * tan(osg::DegreesToRadians(fovy)/2.));
    2463         INFO("fov: %g a: %g n: %g f: %g (%g, %g, %g, %g)", fovy, aspect, near, far, x1, y1, x2, y2);
     2463        TRACE("fov: %g a: %g n: %g f: %g (%g, %g, %g, %g)", fovy, aspect, near, far, x1, y1, x2, y2);
    24642464        x = x1 + (x2 - x1)/2.0;
    24652465        y = y1 + (y2 - y1)/2.0;
    2466         INFO("x: %g y: %g, dist: %g", x, y, distance);
     2466        TRACE("x: %g y: %g, dist: %g", x, y, distance);
    24672467    } else if (getMapSRS()->isGeographic() && !getMapSRS()->isPlateCarre()) {
    24682468        // World coords are ECEF
    2469         INFO("Geocentric");
     2469        TRACE("Geocentric");
    24702470        osg::ref_ptr<const osgEarth::SpatialReference> fromSRS =
    24712471            srs ? srs : osgEarth::SpatialReference::create("wgs84");
    24722472        fromSRS->transformExtentToMBR(getMapSRS(), x1, y1, x2, y2);
    2473         INFO("(%g, %g, %g, %g)", x1, y1, x2, y2);
     2473        TRACE("(%g, %g, %g, %g)", x1, y1, x2, y2);
    24742474        // These are angular units
    24752475        x = x1 + (x2 - x1)/2.0;
     
    24852485        // point on line between top and bottom points
    24862486        world4 = world1 + (world2 - world1)/2.0;
    2487         INFO("world1: %g,%g,%g world2: %g,%g,%g",
     2487        TRACE("world1: %g,%g,%g world2: %g,%g,%g",
    24882488             world1.x(), world1.y(), world1.z(),
    24892489             world2.x(), world2.y(), world2.z());
    2490         INFO("world3: %g,%g,%g world4: %g,%g,%g",
     2490        TRACE("world3: %g,%g,%g world4: %g,%g,%g",
    24912491             world3.x(), world3.y(), world3.z(),
    24922492             world4.x(), world4.y(), world4.z());
     
    24982498        if (distance < 0.0) distance = 0.0;
    24992499        distanceUnits = osgEarth::Units::METERS;
    2500         INFO("fov: %g a: %g n: %g f: %g (%g, %g, %g, %g)", fovy, aspect, near, far, x1, y1, x2, y2);
    2501         INFO("x: %g y: %g, dist: %g", x, y, distance);
     2500        TRACE("fov: %g a: %g n: %g f: %g (%g, %g, %g, %g)", fovy, aspect, near, far, x1, y1, x2, y2);
     2501        TRACE("x: %g y: %g, dist: %g", x, y, distance);
    25022502    } else {
    25032503        assert(getMapSRS()->isPlateCarre());
     
    25052505        return;
    25062506    }
    2507     INFO("Map units: %d", getMapSRS()->getUnits().getType());
     2507    TRACE("Map units: %d", getMapSRS()->getUnits().getType());
    25082508    osgEarth::Viewpoint vpt;
    25092509    vpt.focalPoint()->set(getMapSRS(), x, y, 0.0, osgEarth::ALTMODE_ABSOLUTE);
     
    25252525    osgEarth::Units distanceUnits = extent.getSRS()->getUnits();
    25262526    if (extent.getSRS()->isProjected() && !extent.getSRS()->isPlateCarre()) {
    2527         INFO("Projected");
     2527        TRACE("Projected");
    25282528        double height = y2 - y1;
    25292529        double fovy, aspect, near, far;
    25302530        _viewer->getCamera()->getProjectionMatrixAsPerspective(fovy, aspect, near, far);
    25312531        distance = height / (2. * tan(osg::DegreesToRadians(fovy)/2.));
    2532         INFO("fov: %g a: %g n: %g f: %g (%g, %g, %g, %g)", fovy, aspect, near, far, x1, y1, x2, y2);
     2532        TRACE("fov: %g a: %g n: %g f: %g (%g, %g, %g, %g)", fovy, aspect, near, far, x1, y1, x2, y2);
    25332533        x = x1 + (x2 - x1)/2.0;
    25342534        y = y1 + (y2 - y1)/2.0;
    2535         INFO("x: %g y: %g, dist: %g", x, y, distance);
     2535        TRACE("x: %g y: %g, dist: %g", x, y, distance);
    25362536    } else if (extent.getSRS()->isGeographic() && !extent.getSRS()->isPlateCarre()) {
    25372537        // World coords are ECEF
    2538         INFO("Geocentric");
    2539         INFO("(%g, %g, %g, %g)", x1, y1, x2, y2);
     2538        TRACE("Geocentric");
     2539        TRACE("(%g, %g, %g, %g)", x1, y1, x2, y2);
    25402540        // These are angular units
    25412541        x = x1 + (x2 - x1)/2.0;
     
    25582558        if (distance < 0.0) distance = 0.0;
    25592559        distanceUnits = osgEarth::Units::METERS;
    2560         INFO("fov: %g a: %g n: %g f: %g (%g, %g, %g, %g)", fovy, aspect, near, far, x1, y1, x2, y2);
    2561         INFO("x: %g y: %g, dist: %g", x, y, distance);
     2560        TRACE("fov: %g a: %g n: %g f: %g (%g, %g, %g, %g)", fovy, aspect, near, far, x1, y1, x2, y2);
     2561        TRACE("x: %g y: %g, dist: %g", x, y, distance);
    25622562    } else {
    25632563        assert(extent.getSRS()->isPlateCarre());
     
    30413041        }
    30423042    } else if (proto == "local") {
    3043         INFO("Local protocol: '%s'", getLocalFilePath(url).c_str());
     3043        TRACE("Local protocol: '%s'", getLocalFilePath(url).c_str());
    30443044        std::ostringstream oss;
    30453045        oss << getCacheDirectory() << "/" << getLocalFilePath(url);
    30463046        retStr = oss.str();
    30473047    } else if (proto == "file") {
    3048         INFO("File: '/%s'", osgDB::getServerFileName(url).c_str());
     3048        TRACE("File: '/%s'", osgDB::getServerFileName(url).c_str());
    30493049        std::ostringstream oss;
    30503050        oss << "/" <<  osgDB::getServerFileName(url);
     
    30523052    } else if (proto == "idata") {
    30533053        std::string fileName = osgDB::getServerFileName(url);
    3054         INFO("IData protocol: coll: '%s', '%s'", osgDB::getServerAddress(url).c_str(), fileName.c_str());
     3054        TRACE("IData protocol: coll: '%s', '%s'", osgDB::getServerAddress(url).c_str(), fileName.c_str());
    30553055        int collection = atoi(osgDB::getServerAddress(url).c_str());
    30563056        {
     
    30713071        }
    30723072    } else {
    3073         INFO("Protocol: '%s' url: '%s'", proto.c_str(), url.c_str());
     3073        TRACE("Protocol: '%s' url: '%s'", proto.c_str(), url.c_str());
    30743074        retStr = url;
    30753075    }
  • geovis/trunk/RendererCmd.cpp

    r6075 r6084  
    973973    fullPath << g_renderer->getCacheDirectory() << "/" << dirPath;
    974974    if (!dirPath.empty()) {
    975         INFO("Make dir: %s", fullPath.str().c_str());
     975        TRACE("Make dir: %s", fullPath.str().c_str());
    976976        osgDB::makeDirectory(fullPath.str());
    977977        fullPath << "/";
     
    986986    fclose(fp);
    987987    free(data);
    988     INFO("Wrote %d bytes to %s", bytesWritten, fullPath.str().c_str());
     988    TRACE("Wrote %d bytes to %s", bytesWritten, fullPath.str().c_str());
    989989    return (bytesWritten == size) ? TCL_OK : TCL_ERROR;
    990990}
     
    13881388            osgEarth::Config styleConf("style", Tcl_GetString(objv[12]));
    13891389            styleConf.add("type", "text/css");
    1390             INFO("style CSS: %s", styleConf.value().c_str());
     1390            TRACE("style CSS: %s", styleConf.value().c_str());
    13911391            osgEarth::Config stylesheetConf;
    13921392            stylesheetConf.add(styleConf);
     
    13991399                std::string scripts(Tcl_GetString(objv[13]));
    14001400                if (!scripts.empty()) {
    1401                     INFO("script: %s", scripts.c_str());
     1401                    TRACE("script: %s", scripts.c_str());
    14021402                    osg::ref_ptr<osgEarth::Symbology::StyleSheet::ScriptDef> scriptDef =
    14031403                        new osgEarth::Symbology::StyleSheet::ScriptDef(scripts);
    14041404                    aggOpts.styles()->setScript(scriptDef.get());
    14051405                } else {
    1406                     INFO("no script");
     1406                    TRACE("no script");
    14071407                }
    14081408            }
     
    14261426                        char *value = Tcl_GetString(fields[f+1]);
    14271427                        fieldMap[name] = value;
    1428                         INFO("selector[%s] = %s", name, value);
     1428                        TRACE("selector[%s] = %s", name, value);
    14291429                    }
    14301430                    osgEarth::Symbology::StyleSelector ss;
     
    14391439                    itr = fieldMap.find("styleExpression");
    14401440                    if (itr != fieldMap.end()) {
    1441                         INFO("selector: %s", itr->second.c_str());
     1441                        TRACE("selector: %s", itr->second.c_str());
    14421442                        ss.styleExpression() = osgEarth::Symbology::StringExpression(itr->second);
    14431443                    }
     
    14561456                                return TCL_ERROR;
    14571457                            }
    1458                             INFO("query bounds: %g %g %g %g", xmin, ymin, xmax, ymax);
     1458                            TRACE("query bounds: %g %g %g %g", xmin, ymin, xmax, ymax);
    14591459                            query.bounds() = osgEarth::Bounds(xmin, ymin, xmax, ymax);
    14601460                        }
     
    16801680        osgEarth::Config styleConf("style", Tcl_GetString(objv[10]));
    16811681        styleConf.add("type", "text/css");
    1682         INFO("style CSS: %s", styleConf.value().c_str());
     1682        TRACE("style CSS: %s", styleConf.value().c_str());
    16831683#if 1
    16841684        geomOpts.styles() = new osgEarth::Symbology::StyleSheet();
     
    16941694            osgEarth::Symbology::Style style(blockConf);
    16951695
    1696             INFO("Style: %s", style.getName().c_str());
    1697             INFO("%s", itr->c_str());
     1696            TRACE("Style: %s", style.getName().c_str());
     1697            TRACE("%s", itr->c_str());
    16981698
    16991699            if (style.has<osgEarth::Symbology::IconSymbol>()) {
    1700                 INFO("Found icon symbol");
     1700                TRACE("Found icon symbol");
    17011701                osgEarth::Symbology::IconSymbol *is =
    17021702                    style.get<osgEarth::Symbology::IconSymbol>();
    17031703                if (is->url().isSet()) {
    1704                     INFO("Icon url before: expr: '%s' eval: '%s'",
     1704                    TRACE("Icon url before: expr: '%s' eval: '%s'",
    17051705                         is->url()->expr().c_str(), is->url()->eval().c_str());
    17061706                    // eval() will try to evaluate the expr()
     
    17081708                    //setInfix() to set the expr() string, setLiteral() will quote
    17091709                    is->url()->setLiteral(path);
    1710                     INFO("Icon url after: %s", path.c_str());
     1710                    TRACE("Icon url after: %s", path.c_str());
    17111711                }
    17121712            }
     
    17341734            std::string scripts(Tcl_GetString(objv[11]));
    17351735            if (!scripts.empty()) {
    1736                 INFO("script: %s", scripts.c_str());
     1736                TRACE("script: %s", scripts.c_str());
    17371737                osg::ref_ptr<osgEarth::Symbology::StyleSheet::ScriptDef> scriptDef =
    17381738                    new osgEarth::Symbology::StyleSheet::ScriptDef(scripts);
    17391739                geomOpts.styles()->setScript(scriptDef.get());
    17401740            } else {
    1741                 INFO("no script");
     1741                TRACE("no script");
    17421742            }
    17431743        }
     
    17481748                return TCL_ERROR;
    17491749            }
    1750             INFO("Num Selectors: %d", numSelectors);
     1750            TRACE("Num Selectors: %d", numSelectors);
    17511751            for (int i = 0; i < numSelectors; i++) {
    17521752                int numFields;
     
    17621762                    char *value = Tcl_GetString(fields[f+1]);
    17631763                    fieldMap[name] = value;
    1764                     INFO("selector[%s] = %s", name, value);
     1764                    TRACE("selector[%s] = %s", name, value);
    17651765                }
    17661766                osgEarth::Symbology::StyleSelector ss;
     
    17751775                itr = fieldMap.find("styleExpression");
    17761776                if (itr != fieldMap.end()) {
    1777                     INFO("selector: %s", itr->second.c_str());
     1777                    TRACE("selector: %s", itr->second.c_str());
    17781778                    ss.styleExpression() = osgEarth::Symbology::StringExpression(itr->second);
    17791779                }
     
    17921792                            return TCL_ERROR;
    17931793                        }
    1794                         INFO("query bounds: %g %g %g %g", xmin, ymin, xmax, ymax);
     1794                        TRACE("query bounds: %g %g %g %g", xmin, ymin, xmax, ymax);
    17951795                        query.bounds() = osgEarth::Bounds(xmin, ymin, xmax, ymax);
    17961796                    }
Note: See TracChangeset for help on using the changeset viewer.