Problem at loading images

classic Classic list List threaded Threaded
2 messages Options
Latha Latha
Reply | Threaded
Open this post in threaded view
|

Problem at loading images

Hi gwaldron,
I tried texturing images with the reference of OsgEarthCity loading buildings.Now i am able to load tree textures,I given parks shapefile url to load tree textures but it is loading on the buildings shape file and also along with tree images roof is getting like buldings even not using roofstyle in code. Below code  i am using to load tree texture.

Style style;
style.setName("parks");
ExtrusionSymbol* extrusion = style.getOrCreate<ExtrusionSymbol>();
extrusion->heightExpression() = NumericExpression("10 + (Math.random() * 21)"); extrusion->flatten() = true;
extrusion->wallStyleName() = "tree-wall";
extrusion->roofStyleName() = "tree-roof";
PolygonSymbol* poly = style.getOrCreate<PolygonSymbol>();
poly->fill()->color() = Color::White;
AltitudeSymbol* alt = style.getOrCreate<AltitudeSymbol>();
alt->clamping() = alt->CLAMP_TO_TERRAIN;

Style wallStyle;
wallStyle.setName("tree-wall");
SkinSymbol* wallSkin = wallStyle.getOrCreate<SkinSymbol>();
wallSkin->library() = "cochi_resources";
wallSkin->addTag("tree");
wallSkin->randomSeed() = 1;
StyleSheet* styleSheet = new StyleSheet();
styleSheet->addStyle(wallStyle);
styleSheet->addStyle(style);
ResourceLibrary* reslib = new ResourceLibrary("cochi_resources", RESOURCE_LIB_URL1);
styleSheet->addResourceLibrary(reslib);
FeatureDisplayLayout layout;
layout.tileSizeFactor() = 5.0f;
layout.addLevel(FeatureLevel(0.0f, 5000.0f, "parks"));
FeatureGeomModelOptions fgm_opt;
fgm_opt.featureOptions() = feature_opt;
fgm_opt.styles() = styleSheet;
map->addLayer(new ModelLayer("parks", fgm_opt));

Tree texture(Roof on the top of the tree in white color )Afterloading buliding tree textures attaching to buildings
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Problem at loading images

Latha,
I cannot understand what you are saying. What is your question?
Glenn Waldron / Pelican Mapping