Make changes to many polys all at once

This is the Forum to discuss the use of SBuilderX (version 3.10 and above). For previous versions of SBuilder please use the "SBuilder for Flight Simulator FS2004" forum.
lorenzownd145
Posts: 24
Joined: Thu Mar 13, 2014 4:35 pm

Make changes to many polys all at once

Post by lorenzownd145 » Fri Mar 14, 2014 3:34 pm

Hi. I just subscribed to this forum. I'm from Italy, and I'm working on a big project that includes custom mesh, landclass and coastlines, but I have just started so I don't have much experience with SBX. The problem I'm facing now is that when I import a shapefile with 2000+ polys (country borders with many little islands) the program doesn't show the imported polygons until zoom level 6 (if i go to level 7, polys disappear). If i select a poly and then right click it, an option called "Set as outer" appears, and if I click it, the poly becomes "persistent" doesn't disappear anymore. The real issue is that I simply CAN'T repeat this process for 2000 polygons. How can I apply this option to many polys?

EDIT: I also have to mark them as hole to build the coastline
Attachments
Capture14-03-2014-16.37.42.jpg

User avatar
Luis Sa
Posts: 1736
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Make changes to many polys all at once

Post by Luis Sa » Sat Mar 15, 2014 1:55 am

Hello,

Please read this:

http://www.ptsim.com/forum/viewtopic.php?f=18&p=3289

Please tell if that works.

Regards, Luis

Edit - I realize it does not work but that "persistence" related to Zoom level 6 or 7 confuses me. I wonder if you could send me a fraction of your project so that I replicate the behaviour that you describe in my system.

lorenzownd145
Posts: 24
Joined: Thu Mar 13, 2014 4:35 pm

Re: Make changes to many polys all at once

Post by lorenzownd145 » Sat Mar 15, 2014 11:44 am

Thanks a lot for the quick reply. I followed your instructions on how to select multiple polys, and that solved half of the problem :) But in that menu I can't make the changes "set as outer" and "set as hole". For the first problem, it seems to be a problem of my shp, so I attached it as a zip. For the second problem I think I have a solution: to design the coastline, can't I simply mark the polys as "exclude all water polys" instead of marking them as holes of a big water poly? Is it correct? Thanks again for all the replies in future"

EDIT:
I try to describe the disappearing problem: When I load the shp, all polys are shown at zoom level 7. When I go at zoom level 8, many polygons simply disappear, while other remain visible until zoom level 10-11, depending on the size of the polygon. To make them "visible", I have to select them: at that point SBX shows me only the points of the polys, but not the lines connecting the points. To make them fully visible, I have to right click each poly and click on the option "set as outer". The problem is that this option is not present while in "MANY POLYS" menu.

Sorry for the bad english :D
Attachments
Polygons Shapefile.zip
(198.11 KiB) Downloaded 1575 times

User avatar
Luis Sa
Posts: 1736
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Make changes to many polys all at once

Post by Luis Sa » Sat Mar 15, 2014 6:23 pm

Hello,

I appended your shape file to an empty SBuilderX project and I confirm what you refer to regarding the disappearing of polys at certain levels of Zoom. They appear and disappear.

I exported your file as a SBX file and opened it with Notepad++ . I see that it contains a parent poly with all the remaining 538 polys as childs. I removed all the Child references that appear at the begining of this firts poly and changed its number of childs to zero. Therefore the first lines of Poly#1 look like this:

Code: Select all

[Poly.1]
Name=Polygon imported from a shape file
Type=
Guid={9ABCDEF0-FEDC-BA98-7654-3210FEDCB000}
Color=FFFFC0CB
NoOfChilds=0
NoOfPoints=22
Lat1= 59.7547950744629
Lon1=-43.9352722167968
Then on all the remaining polys I changed the property NoOfChilds so that it is now =0 instead of =-1 as it appears on your file. Note that the property NoOfChilds=-1 means that the particular poly is a child (a son) of some parent poly. Also if a poly is son of a parent poly, then the parent poly should designate its son. Sons or childs are dealt with as holes in the parent poly. I suggest that you play a bit - draw a big poly; make 2 or 3 holes on it; and export as an SBX file in order to study the format used by SBuilderX.

So, after making an overall change from NoOfChilds=-1 to NoOfChilds=0 inside Notepad++, all your polys are parent polys with no holes. I saved the SBX file and then I appended it to an empty SBuilderX project. Doing that I could see all your polys at any zoom level.

I do not know if this global change destroys any propriety of your data. Please comment on that.

Regards, Luis

lorenzownd145
Posts: 24
Joined: Thu Mar 13, 2014 4:35 pm

Re: Make changes to many polys all at once

Post by lorenzownd145 » Sun Mar 16, 2014 10:07 pm

Wow, I rarely receive such fast support in a forum, thank you! Other than that, I played a bit with the sbx files and I managed to understand their logic. Then I created an sbx with all my polys turned into childs of a bigger poly, the hydro poly. And here start the problems ... Sorry in advance if I go too much OP, but I think it's better to continue this topic.
So, I imported my hydro poly with the holes in sbuilerx, added an exclusion poly, exported the project and moved the bgl to fsx. In both fsx and tmfcviewer(that program to display bgls in terrain sdk, don't remember the name), the scenery just looks weird, the coastline is inverted (?). Then I remembered I forgot to fill the two polys to qmid11 grids (many grids), so I corrected the polys and exported them. After that I immediately saw that the 'filled' hydro poly messed up the holes (the coastlines), maybe because the coastlines are MUCH more than one qmid 11 grid. So my question is: how can I fill the hydro poly without messing up the holes in it? Sorry again for my english :)

User avatar
Luis Sa
Posts: 1736
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Make changes to many polys all at once

Post by Luis Sa » Mon Mar 17, 2014 12:02 am

Hello,

I am very sorry but my FSX knowledge is very scarce. At this moment I am trying to improve SBuilderX to work on 64-bit platforms and I even do not have a full FSX installation on the computer that I am working right now.

I hope that someone reads this and tries to help you. Also, you can post your problem on FSDeveloper (Terrain section) as there are much more people over there.

If you get a related SBuilderX problem please come back.

Best Regards, Luis

meshman2
Posts: 2
Joined: Sat Nov 16, 2013 5:13 pm

Re: Make changes to many polys all at once

Post by meshman2 » Mon Mar 17, 2014 12:36 am

Hi there! Nice to see the forums back active, even if I'm on a slightly different name.

Based upon the zip file that was attached to an earlier post, the issue of parent poly/holes doesn't apply. All the polys in the SHP file are external to the others, so none need to be holes to a parent. What is missing within the SHP file would be a large water polygon, so that the 539 existing polys could cut holes into the new water polygon.

I'm hoping the upload of a picture works OK, otherwise I'll need to find a site to post the image.

OK, looks like the image is there. You can see in the irregularly shaped lavendar box that it would be the new water polygon or the PARENT polygon. The narrow boxes running left/right are to exclude the previous water and might need to be adjusted for any inland water bodies. The purple outline from your SHP file (all 539 polygons) would become children polygons to the parent polgon, or they would cut HOLES in the parent to let what was there show through and not be covered by the new water polygon. Clear as mud???
Attachments
SBXexample2.jpg

lorenzownd145
Posts: 24
Joined: Thu Mar 13, 2014 4:35 pm

Re: Make changes to many polys all at once

Post by lorenzownd145 » Mon Mar 17, 2014 9:09 am

Ok I quite understanded the process, but I still have some doubts. BTW, you took and old shp, the one with the problems, but in the meantime I adjusted it. Soon I'll upload a zip with my newer shp to show you all my doubts

lorenzownd145
Posts: 24
Joined: Thu Mar 13, 2014 4:35 pm

Re: Make changes to many polys all at once

Post by lorenzownd145 » Mon Mar 17, 2014 5:54 pm

Here is the poly I made yesterday: http://ge.tt/4yE6spQ1/v/0 . The problem, like I said in my previous post, is that I can't make the hydro poly working correctly, because if I "fill to qmid 11" the poly becomes unusable (no more holes, strange contours etc...). Could you explain me what do I have to do to make that water poly I uploaded (the last one) work in FSX? I attached the screenshot of what I get if I try to compile my polys.
Attachments
Desktop 17-03-2014 18-50-46-973.png
And this is what I get in TmfViewer
Desktop 17-03-2014 18-51-22-563.png
This is what it looks like in SBX

User avatar
Luis Sa
Posts: 1736
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Make changes to many polys all at once

Post by Luis Sa » Mon Mar 17, 2014 6:31 pm

Hello,

As I said before I know little on the final result of SBuilderX when you place the BGL files that it generates inside FSX. Also I do not know the region the region you are working on. What does your polygon represent? Is it an island? Is it water? The holes are lakes? What are you trying to get? Please clarify and, may be, I can be more useful.

Regards, Luis

meshman2
Posts: 2
Joined: Sat Nov 16, 2013 5:13 pm

Re: Make changes to many polys all at once

Post by meshman2 » Mon Mar 17, 2014 7:07 pm

I just grabbed the .SBX file and will look at it later on.

For Luis, this is the southern portion of Greenland. A large portion of the southern part of Greenland that stretches across many degrees of lat/lon.

And I'll get my user name straightened out in a little while. :lol:

meshman
Posts: 219
Joined: Sun Jan 01, 2006 11:54 pm

Re: Make changes to many polys all at once

Post by meshman » Mon Mar 17, 2014 8:44 pm

meshman2 wrote:And I'll get my user name straightened out in a little while. :lol:
That didn't take too long! 8)
Lance

lorenzownd145
Posts: 24
Joined: Thu Mar 13, 2014 4:35 pm

Re: Make changes to many polys all at once

Post by lorenzownd145 » Mon Mar 17, 2014 9:44 pm

Oh sorry, I forgot to say something about my project. I'm basically REBUILDING the entire greenland. I'm at a very good point with meshes, landclass and airports coordinates (placed in wrong positions in default fsx), but I have some troubles with the coastline. Then, after the coastlines, I will rebuild the inland waters.

PS: Please, don't make the work for me and upload the finished bgl, just explain me how to do it (not for credit issues, but because I need to know how things work)

meshman
Posts: 219
Joined: Sun Jan 01, 2006 11:54 pm

Re: Make changes to many polys all at once

Post by meshman » Tue Mar 18, 2014 9:41 pm

Looking at the latest changes, I'm not sure anything is going to look correct until the existing water that surrounds the area is excluded, which would allow for the revised work to show. So much of the work within the terrain aspects is based upon "you must exclude what's there before you can replace it". Not all the work goes by that line, but most does. I got the file generated based on the picture I posted earlier and the new poly(s) start to show and that includes excluding out water that might already be there. But those exclusions need to be more "micro" in area and coupled with things like exclusions to rid the default shorelines/wave actions, etc.
Lance

lorenzownd145
Posts: 24
Joined: Thu Mar 13, 2014 4:35 pm

Re: Make changes to many polys all at once

Post by lorenzownd145 » Sat Mar 22, 2014 1:34 pm

Sorry if I didn't reply early. I've tried in these days to make my water poly look normal at least in TmfViewer, but I had no success so far. I need some help, because this "coastline" is making me crazy. The problem is that shp2vec/sbx corrupts my water poly if it has an hole too big or with too much points (in my case the main coastline). If I create a water poly and then create a small hole within it, the compiled bgl looks absolutely normal in TmfViewer, even if I don't put in an exclusion poly, so the problem isn't the presence or not of an exclusion poly. If I try to compile the poly I attached below, It will be somehow corrupted and TmfViewer will screw up the coastlines, like in the attached screenshot I posted some days ago http://www.ptsim.com/forum/download/fil ... &mode=view . Can't someone help me by taking the attached SBX file and making it work? I've tried so many things, so at the moment I ran out of ideas.
Attachments
GL_CL_V4_Test.zip
(221.65 KiB) Downloaded 1574 times

Post Reply