OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Doubt regarding integrating shapefile with VPB


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> VirtualPlanetBuilder [vpb]
View previous topic :: View next topic  
Author Message
vinothrajendran4
User


Joined: 28 Dec 2016
Posts: 21

PostPosted: Thu Feb 16, 2017 2:10 pm    Post subject:
Doubt regarding integrating shapefile with VPB
Reply with quote

Hi Community,

I have builded a terrain database with shapefiles associated to that terrain region using VPB. I noticed that the generated .osg file has height data for shapefiles. When i load my osg file into osgViewer , it renders only terrain height map data.

command used to generate terrain database is:
Code:
osgdemd -d terrain.tif --building build.shp -o data.osg


Why shapefile data not getting rendered with height ? Below i have mentioned snapshot of osg file with shapefile associated datas

Quote:
Geometry {
UserData {
osgSim::ShapeAttributeList {
int "id" 407943813
string "building" "yes "
string "surface" " "
string "landuse" " "
string "leisure" " "
string "natural" " "
string "NAME" "Building"
}
}
useDisplayList TRUE
useVertexBufferObjects FALSE
PrimitiveSets 2
{
DrawArrays POLYGON 0 4
DrawElementsUByte TRIANGLE_STRIP 10
{
2 4 3 5 0 6 1 7 2 4
}
}
VertexArray Vec3Array 8
{
637137.125 1100359.875 19.50362586975098
637137.75 1100343.5 19.50362586975098
637146.9375 1100343.875 19.50362586975098
637146.3125 1100360.25 19.50362586975098
637146.9375 1100343.875 9.503626823425293
637146.3125 1100360.25 9.503626823425293
637137.125 1100359.875 9.503626823425293
637137.75 1100343.5 9.503626823425293
}
NormalBinding PER_VERTEX
NormalArray Vec3Array 8
{
-0.4397531449794769 0.4558025300502777 0.773861289024353
-0.8702059388160706 -0.280549019575119 0.4050111770629883
0.4397531449794769 -0.4558025300502777 0.773861289024353
0.8702059388160706 0.280549019575119 0.4050111770629883
0.9724705219268799 -0.2330259680747986 0
0.6351727843284607 0.7723701000213623 0
-0.9724705219268799 0.2330259680747986 0
-0.6351727843284607 -0.7723701000213623 0
}
ColorBinding OVERALL
ColorArray Vec4Array 1
{
1 1 1 1
}
}



i further attach my .osg file for reference...

Thank you!

Cheers,
Vinoth
Back to top
View user's profile Send private message
SMesserschmidt (Sebastian Messerschmidt)
Forum Moderator


Joined: 10 Sep 2013
Posts: 725

PostPosted: Thu Feb 16, 2017 3:56 pm    Post subject:
Doubt regarding integrating shapefile with VPB
Reply with quote

Hi Vinoth,
Quote:
osgdemd -d terrain.tif --building build.shp -o data.osg

VPB handles shapes differently. Take a look at the ShapeFilePlacer.cpp
and the use of the osgSim::ShapeAttributeList. From a glance it seems
this data is used to extrude the shape.

Cheers
Sebastian


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
vinothrajendran4
User


Joined: 28 Dec 2016
Posts: 21

PostPosted: Fri Feb 17, 2017 3:52 am    Post subject:
Reply with quote

Hi Sebastian,

Does it mean shapefile with height can't be rendered in my scenario ??

Thank you!

Cheers,
Vinoth
Back to top
View user's profile Send private message
SMesserschmidt (Sebastian Messerschmidt)
Forum Moderator


Joined: 10 Sep 2013
Posts: 725

PostPosted: Fri Feb 17, 2017 11:09 am    Post subject:
Doubt regarding integrating shapefile with VPB
Reply with quote

Hi,

No it simply means you have to put some effort into this on your own. I've pointed you to a possible starting point.

Cheers
Sebastian
--
Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.
Am 17.02.17, 04:52, Vinoth Rajendran <> schrieb:
Quote:
Hi Sebastian, Does it mean shapefile can&apos;t be rendered in my scenario ?? Thank you! Cheers, Vinoth ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70222#70222 _______________________________________________ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
vinothrajendran4
User


Joined: 28 Dec 2016
Posts: 21

PostPosted: Fri Feb 17, 2017 11:18 am    Post subject:
Reply with quote

Hi Sebastian,

Will a possible solution be, to traverse using NodeVistor and get the shapefile data and render myself ??


Thank you!

Cheers,
Vinoth R
Back to top
View user's profile Send private message
SMesserschmidt (Sebastian Messerschmidt)
Forum Moderator


Joined: 10 Sep 2013
Posts: 725

PostPosted: Fri Feb 17, 2017 11:40 am    Post subject:
Doubt regarding integrating shapefile with VPB
Reply with quote

Sorry I'm not at my computer right now, so cannot give your more guidance at this point. I would try to check where the osgSim::Shapeattribute data is generated/read. Can you give me the shapeset used?

Also: what is it that you're after? As I've pointed out: osgEarth already has the means to generate buildings from shapeset data.

Cheers
Sebastian
--
Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.
Am 17.02.17, 12:19, Vinoth Rajendran <> schrieb:
Quote:
Hi Sebastian, Will a possible solution be to traverse using NodeVistor, get the shapefile data and render myself ?? Thank you! Cheers, Vinoth R ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70226#70226 _______________________________________________ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> VirtualPlanetBuilder [vpb] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts problem with shapefile height when lo... vinothrajendran4 General 2 Thu Feb 16, 2017 12:22 pm View latest post
No new posts Error building terrain with shapefile... robertosfield VirtualPlanetBuilder [vpb] 0 Mon Feb 06, 2017 9:11 am View latest post
No new posts Error building terrain with shapefile... vinothrajendran4 VirtualPlanetBuilder [vpb] 0 Mon Feb 06, 2017 6:24 am View latest post
No new posts Moved to BUILD FORUM - Best Pipeline ... dsargrad General 3 Sun Jun 05, 2016 5:03 pm View latest post
No new posts When writing my own software and inte... diwasbhattarai Build system [build] 4 Tue Mar 22, 2016 1:08 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP