Choosing Line Types - Shape & Polish Files?

General discussion about Scenery Design. Questions about SBuilder for Flight Simulator FS2004.
boleyd
Posts: 402
Joined: Sun Sep 19, 2004 10:57 pm
Location: USA

Choosing Line Types - Shape & Polish Files?

Post by boleyd » Sun Oct 31, 2004 10:12 pm

I have just recently began to play with SHP (shape) files from ESRI. While they seem to have all of the data I need they also combine items. As an example:

I can download and process in Sbuilder water polygons to produce proper water bodies - ocean coasts, lakes, and rivers. However, I would like to add a shoreline so the look better in FS2004. If I use the MapEdit function to convert the polygons to lines I do get shorelines that I can work with in Sbuilder. However, since the water elements are actually several polygons each polygon is outLINED which causes shorelines to cross in the middle of water.

I then try to use the Hydrography type shape files. However, they include streams. If I select shorelines as the type in MapEdit the streams also become "shorelines" which I do not want. I only want shorelines of water areas without streams. The ideal would be to have something that differentiates between streams and water elements at the MapEdit level so TWO types of lines can be available for SBuilder.

Horst
Posts: 137
Joined: Sun Sep 19, 2004 5:08 am
Location: Austria

Post by Horst » Mon Nov 01, 2004 1:55 am

Hello,
I hope I understand “outlined”. (Did not get an example of your data)
Try to join the polygons!
Import the polygons with proberties /general/none (to get a undefined poly) to Sbuilder.
Then use join to get away the straight lines.
Then save to bln and import the bln again using:
“Create a closed line for every imported polygon?”
Then I have shorelines to my lakes and rivers.
I never tried, to delete the unused line (the rest) on a big ocean import. To have only the shoreline of a coast.
I know only, that it is not easy to get away lines in polygons inside polygons. And never tried it with Mapedit.

Regards
Horst

boleyd
Posts: 402
Joined: Sun Sep 19, 2004 10:57 pm
Location: USA

Post by boleyd » Mon Nov 01, 2004 5:30 pm

Yes, outlined is the visible line that encompases a polygon in this case. I tried the Join function in SBuilder but had no success. I created two polygons and matched them to properly interface (fully parallel and coincident) at maximum zoom. The, while depressing the CTRL-key I used the Pointer to select each object. While continuing to hold down the CTRL-key I right-clicked on an edge/line of one of the two polygons. The pop-up window did not show Join but continued to show Check Poly.

This seems to be the process prescribed in the Help section. However, not completely sure???

If this does work,once I am trained (grin), the function may not be adequate for my task. I have an MP file with many polygons that have abutting/interfacing segments. The objective is to eliminate the segments/lines of the interface and create one large polygon. Then make this one line around all of the polygons with the Make Line function. This line will then properly outline the total water element and become the shoreline in FS2004. If Sbuilder will only allow joining of two polygons in one operation, and not eliminate the interfacing lines, then it is probably not going to work for me.


Regards,
Dick

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

Post by Luis Sa » Mon Nov 01, 2004 9:06 pm

Hi,

You if you have several polygons join them in first. Note the picture where I separated 2 polygons for the sake of illustration. In the top half, they have the same number of points along their common border. Therefore they will join. In the bottom half, they have a common border but with different points. They will not join unless you delete the culprit point.

Image


Note 1 : you must join 2 polygons at a time! You can not join 3 polygons in 1 go! In order to join 3 polygons A B & C, join A & B and then join the result with C

Note 2 : When Auto Line Joining is off in the Preferences menu, the process to join lines is identical to the process of joining Polygons. The best way to learn is to make several lines and try!

Say you join all polygons until you have 1 polygon of water with 27 points making, for example, a lake with 2 islands. Again points 18 & 27, 19 & 26, 5 & 11 and 4 & 12 should be coincident (or nearer than a LOD21 edge!).

Image

In order to make shorelines for the lake and islands I would "Make Line" and I would set the VTP properties of the line <u>before breaking</u>!

I would set the type of bank (the texture) the width of the bank and I would set the orientation using "Reverse". Remember: waves are on your right hand side when you walk along the line (when you go from point 1 to point 2 then to 3 ...). In the example the line does not need to be reversed.

Only when I am happy with the VTP settings I would break the shoreline as follows:

0) In the Preferences turn off Auto Line Joining. Also, in Line Mode ,hide (display off) Polygons.
1) While pressing I (to insert) click in the midle of the segment 26 27. A point will be inserted in the line. Call it point X. May be it is useful to move this point X slightly so that we can easily pick it up(this point is to be deleted in the end!)
2) While pressing B (for break the line) click on X (in version 2.03 the break works different!). The line is broken in X. One part has X as the starting point. The other part has X as the ending point.
3) Therefore you need to delete this 2 X points. While pressing D (for delete) click twice X.
4) Repeat 1 up to 3 for segments 18 & 19, 5 & 4 and 11 & 12. The shorelines should appear fine!

Regards, Luis

Horst
Posts: 137
Joined: Sun Sep 19, 2004 5:08 am
Location: Austria

Post by Horst » Tue Nov 02, 2004 12:39 am

Hello Luis,
Thanks for the detail instruction.
With Version 2.03 (saved on 26.10.2004), “Make Line” does not connect the first and the last point of the polygon (in your example: Point 27 and Point 1) to a closed line!
It seems brake the line is not working correct therefore.

Kind regards
Horst

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

Post by Luis Sa » Tue Nov 02, 2004 1:07 am

Hi Horst,

I am divided in making the scenery of Portugal and in keeping track of the changes that I introduce in SBuilder. In making the scenery I discover several additions that would be useful to include in SBuilder. When I finish the scenery (it is approaching the end) I will update the SBuilder Help. I will try to have the last compiled EXE available in file sbxxx.zip. I will also try to post here (or avsim) the additions that worth to announce.

The problem with MakeLine (from Poly) is a recursive one. The problem has to do with BLN format or with my interpretation of it. Say that you import a BLN set of N points. This set of points will be a line if Point1 is different from PointN. If Point1 = PointN then the set is a polygon. I saw this in:

http://ioc.unesco.org/oceanteacher/reso ... at_doc.htm

Am I right? When I save a 27-point polygon, I save 28 pairs of coordinates, with Point28 = Point1.

If you have a N-point line with Point1 = PointN and you export to BLN and import again, you will get a polygon! Did you follow me?

Having said that I will change "MakeLine from Poly" to have repeated points! I will make sure that "MakePoly from Line" will not create a duplicate point if the line is closed!

I will be making the change and I will upload sbxxx.zip. Wait until I confirm this.

<font color="red">Edit 5 minutes later!</font id="red">

Horst: there is a switch in the INI file! I forgot I had it!

MakeClosedLineFromPoly=False ; lines will be be closed when using Make Line

Regards, Luis

boleyd
Posts: 402
Joined: Sun Sep 19, 2004 10:57 pm
Location: USA

Post by boleyd » Tue Nov 02, 2004 6:24 pm

From the example it seems that there is no method today of combining many polygons at one go. The shapefiles on the coasts usually have many water polygons so a method of selecting multiple polygons for one "combine/join" operation would be nice. I have never tried to program graphic modifications so I can't suggest any processes.

Anyhow, a wonderful program with a strong future! Lots of fun to use.

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

Post by Luis Sa » Tue Nov 02, 2004 8:45 pm

Hi Dick,

I will consider the option to join several polygons. I must say that I use more often the "manual" functions of SBuilder than the "automatic" ones. Up to 2.02 all integer variables were of the "short" type because I never thought that SBuilder would deal with more than 32,767 points or lines or whatever. I am designing the scenery of Portugal using vector data that I find as a reference. I manually correct any discrepance of data as for example, lakes, rivers against the mesh. But I know that I can only do that for a small country with 500km x 200km. It would be impossible for greater countries.

Returning to the Polygon Join, tell me if the following idea is enough. I could make Poly joining to work exactly as Line joining. I would create a switch/flag called AutoPolyJoin.

If AutoPolyJoin is OFF, you can join polygons as you can today, eg, selecting 2 polys while pressing CNTL, right click for Properties and a click to join.

If AutoPolyJoin is ON, it would work as lines. You go to Poly Mode. Note that entering in Poly mode deselects everything. Then click on a Poly as if you wanted to select it. Say you have 27 polys and you click on poly 11. What I can do (as in lines) is: starting with poly 1 up to 27, skipping 11, find the first that can be joined (say poly 6) and join 6 with 11 and stop.

Then you have 26 polys and poly 6 is now "old 6" plus "old 11". Another click, another join if the joining is possible. This is not fully automatic but you can keep control of what is happening. And it is much faster. One click is one pair that is joined. What do you think?

Luis



Regards, Luis

boleyd
Posts: 402
Joined: Sun Sep 19, 2004 10:57 pm
Location: USA

Post by boleyd » Tue Nov 02, 2004 10:44 pm

Very good - yes, basically following the lines process keeps down confusion.

I wonder if the coast area of Portugal is less detailed (less polygons) than the USA Tiger data. I could not verify this since ESRI could not find the water and coastline data for Portugal. Looking at the map the area around Setubal might use several polygons if it is constructed like the Tiger data.

Onr thought - it would be nice to select all water elements and join them where the computer <u>believes it to be possible</u>. This may be asking too much!

Horst
Posts: 137
Joined: Sun Sep 19, 2004 5:08 am
Location: Austria

Post by Horst » Wed Nov 03, 2004 1:31 am

Hello,
Luis I confirm:
Your instruction is correct.
I checked my system setting: point instead of comma (I forgot to change it) and
MakeClosedLineFromPoly=TRUE
So I can follow your advice also on my system (also for polish, and I do not tried bln yet)

When a polygon is crossing more than one LOD 8 Gridline (one is ok), Make line does not give correct results.

Any idea for joining the polygons automatic or semi automatic for the import or later, would be very nice.

Dick, I fully agree, SBuilder becomes more and more a small GIS – FS Scenery program.
Thanks to Luis.

For the number of polygons we should be very carefully.
On one hand, it is nice to put big areas and data in.
On the other hand, we produce not very nice sceneries.
i.e. to define only one type of shoreline for thousand of kilometer (or miles), looks not very nice!.
And we have to take care: the old fs9.exe gives you an CTD loading these big bgl files!!

Kind regards
Horst

boleyd
Posts: 402
Joined: Sun Sep 19, 2004 10:57 pm
Location: USA

Post by boleyd » Wed Nov 03, 2004 6:22 pm

I agree that too much scenery in one go would produce both visual and computer problems (probably). I would limit my activities to a maximum of a LOD5 area as covered by the scenery BGLs in the regional folders. Right now, with AutoASM, I just block an entire LOD5 water (HL & HP) set of BGLs and fill in the areas of interest. It would be nice to easily work on a LOD5 at one go. Might have to wait for the results from the PC but here in the USA we are becoming used to waiting for results!! Was a long night..

Another note - I can get the JOIN to appear where Check Polygon was. However, when I click on it I am told that the program cannot join the two polygons. Any hints?

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

Post by Luis Sa » Wed Nov 03, 2004 9:25 pm

Hi,

I myself was wake up to 5 am not on the PC but on the TV. Regarding the Join problem, see my post above. Select the 2 polygons and Snap to LOD grid. Then at maximum zoom inspect the commom border. I would save the project, move one of the polygons for better inspection. Then open again the working project.

Luis

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

Post by Luis Sa » Thu Nov 04, 2004 11:58 am

Hi,

The EXE that I just upload has the following features:

- fixed bug in photo scenery (as referred to in AVSIM).
- fixed the bug that crashes SBuilder when Cancelling a change in the BGL Properties in Appending Polish Map.
- added Label View for Polys and Lines
- added Manual Joining of 2 Lines (the lines are forced to Join). Select 2 lines while pressing CNTL and enter the Properties.
- added Automatic Poly joining
- added Automatic Line joining

Auto Join works in a single go! As soon as you click a Line (in Line mode) or a Poly (in Poly mode) every item that can be joined, is joined. It does not join if the items have different labels or different types. In this case only Manual Join will work!

Polygon joining now is less restrictive. 2 points are considered coincident for the purpose of joining if their distance is less than 3 pixels. Before this distance was a LOD21 edge. Now if 2 polygons will not join at hight zoom, they may join at low zoom, because the distance (in pixels) between points decreases as we zoom out.

Regards, Luis

boleyd
Posts: 402
Joined: Sun Sep 19, 2004 10:57 pm
Location: USA

Post by boleyd » Thu Nov 04, 2004 7:35 pm

Need a download link. ptsim/downloads denies me access.

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

Post by Luis Sa » Thu Nov 04, 2004 10:06 pm

Hi,

http://www.ptsim.com/downloads/sbxxx.zip

This is where I update SBuilder.

<font color="red">Please - do not download! There was an error that I am fixing! I will remove this when done!</font id="red">

<font color="green">Now it is OK and you can download. SBuilder is now 2.04! When opening a project it will try to convert to the new 2.04 format. It is better to make a backup of your files!</font id="green">

Luis

Post Reply