Invert polygons ?

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.
Post Reply
ananda
Posts: 77
Joined: Thu Jun 25, 2009 8:48 pm

Invert polygons ?

Post by ananda » Tue Jun 28, 2011 4:23 pm

I have some SHP files which define land boundaries.

Image

Is there a simple way to invert the polygons to hydro-polys?

George
George

User avatar
luisfeliztirado
Posts: 436
Joined: Sun May 15, 2005 9:15 am
Location: Santo Domingo

Re: Invert polygons ?

Post by luisfeliztirado » Wed Jun 29, 2011 2:03 am

Interesting problem, George. I think I faced that same problem some years ago and did not know how to solve it.

But, perhaps you could try this:

1. draw your enormous hydro poly as usual, over that land poly. Make sure the hydro poly covers the area that will be excluded.

2. select the land poly, right click on the edge and choose Make Hole from the menu.

3. click on the edge of the hydro poly as usual to designate it as the parent poly.

4 see if it worked!

Good luck.
Luis

ananda
Posts: 77
Joined: Thu Jun 25, 2009 8:48 pm

Re: Invert polygons ?

Post by ananda » Wed Jun 29, 2011 8:21 am

Unfortunately there isn't just one land poly Luis, there are 375 of them :shock:

What I would like to be able to do is select all of them with a rubber-band selection and set them all as holes.

However, you have given me a hint. I can make the largest a hole, export as SBX , edit it to set the NoofChilds to 375 followed by Child1 = etc. Of course I would need to write a program to do this.

Image

Thanks,

George
George

ananda
Posts: 77
Joined: Thu Jun 25, 2009 8:48 pm

Re: Invert polygons ?

Post by ananda » Wed Jun 29, 2011 9:07 pm

I was able to create the hydro-poly with holes

Image

But unfortunately I cannot do anything with it.

If I slice to QMid11, SBuilderX crashes.

If I try to compile it, Shp2Vec runs and clocks up 5min CPU but it doesn't create a bgl.

Image

I guess it is just too big :cry:

George
George

User avatar
luisfeliztirado
Posts: 436
Joined: Sun May 15, 2005 9:15 am
Location: Santo Domingo

Re: Invert polygons ?

Post by luisfeliztirado » Thu Jun 30, 2011 1:57 am

There is always something to spoil our day, isn't there?

Is the problem that there are too many vertices? Perhaps you could try smoothing the polygons (all 375!) to reduce the quantity of vertices that are handled.

Good luck.

Luis

ananda
Posts: 77
Joined: Thu Jun 25, 2009 8:48 pm

Re: Invert polygons ?

Post by ananda » Thu Jun 30, 2011 8:29 am

Hello Luis,

I tried reducing the number of vertices using "Sample" with a minimum distance of 500m but that didn't help.

Looking at the SBX, the largest poly has 108922 vertices and there are another 10 polys with between 1000 and 9000 vertices so it is hardly surprising that it is breaking the 32bit memory limit.

So, it is back to generating the coast manually over smaller areas :cry:

It was a nice idea while it lasted :lol:

George
George

GaryGB
Posts: 120
Joined: Sun Jul 01, 2007 5:04 pm
Location: USA

Re: Invert polygons ?

Post by GaryGB » Wed Aug 17, 2011 5:45 pm

Hello:

I've been adding a LARGE_ADDRESS_AWARE flag to 32-bit executables of FS development tools such as SBuilderX, Sketchup, GlobalMapper etc. for use on my Windows XP Pro 32-bit 4GB RAM computer system which has the "/3GB switch" and "USERVA" of 2560 set up in my Boot.ini file as discussed here (...for FS, but the process is similar for other 32-bit *.exe's):

http://forum.simflight.com/topic/55994- ... gb-switch/


Thus far in months of operation, I've seen no problems with having edited the *.exe files in this manner; I anticipate that I might at least get the benefit of better stability, and 'possibly' the windfall of more working memory address space by doing this. :idea:

NOTE: There is a much simpler process to set a LARGE_ADDRESS_AWARE flag in 32-bit executables for systems using 64-bit Windows with, IIUC, 4GB or greater RAM capacity which enables use of up to 4GB per 32-bit task session... by the same author of the "Explorer Suite" NTCore editing utility:

http://www.ntcore.com/4gb_patch.php


Hope these ideas might prove to be of some benefit with "some" SBuilderX stability issues /scenarios ! 8)

GaryGB

Post Reply