Coast Alignment tool
#1

A link to my Coast Alignment tool will be put up shortly in the "Map builders tools" thread. This post is a placeholder for bug reports, comments, etc.

EDIT: See follow-ups. Misunderstood fly_zo. CoastAlign will be put up in the "Map builders tools" thread when in a firm revision.

EDIT: Now in firm revision, see IL2 MAP MODS Tools for building section for download.

EDIT: Version 1.2.0 released, see (The link is inoperative)
Reply
#2

...you've misunderstood me m8 , i'll include it in map tools thread when not in beta phase ....

in the meantime :

Quote:Here's a small application I made that might come in handy, have a look and put it in the Mapbuilders tools thread if you think it's useful. Still beta so you might like to open a discussion thread so bugs get reported.

http://redwulf.adelby.dk/CoastAlign/Coa ... _0.9.1.zip


ok, gents .... please test it out

regards
Z
Reply
#3

I tried to write a similiar program, but yours work! Would have saved weeks and a lot of grey hairs in my Alpen map. - Seems that you set the water to the same height till a special height difference is reached. Would it be possible to lower this difference, best to "1"? I think you change the height of the riverbanks too. If the height jumps were lower, the "canyon-effect" might be lesser and some slope river sections might be corrected.
Reply
#4

fly_zo Wrote:...you've misunderstood me m8 , i'll include it in map tools thread when not in beta phase ....

Z

:oops:
Sorry for the misunderstanding.

If no bugs after a week I'll build 1.0.0
Reply
#5

zipzapp Wrote:I tried to write a similiar program, but yours work! Would have saved weeks and a lot of grey hairs in my Alpen map. - Seems that you set the water to the same height till a special height difference is reached. Would it be possible to lower this difference, best to "1"? I think you change the height of the riverbanks too. If the height jumps were lower, the "canyon-effect" might be lesser and some slope river sections might be corrected.

Here's how it works:
The map_c is inspected in 4X4 squares (200x200m). If a square is "all land" (all 16 pixel values > 127) or "all water" (all 16 pixel values =< 127) nothing is done. If a square is neither "all land" or "all water" (i.e. a coast) the 4 surrounding map_h pixels are set to the lowest value of the 4 (assuming the lowest value represents the water surface). This way inland water level is not pushed to 0m. There is no "fixed height difference", only values in the map_h file are used.

Hint: Do not use "Lake check" in MicroDem when building your map_h file. Doing so will push inland water level to 0m. Use "Lake check" on your map_c file though to get inland water.

FWIW: Made a correction table for MicroDem elevation according to info in this thread viewtopic.php?t=1714&postdays=0&postorder=asc&highlight=microdem+correction+table&start=45 See post by LSA on page 4.

Get it here: http://redwulf.adelby.dk/CoastAlign/Cor ... _map_h.dbf

The value 127 for distinguishing water/land is chosen since quite nice shallow water can be made by "fiddeling" with values just below 128 (land) in the map_c file.
Reply
#6

This is a very nice one, thank you!
I'll test too...
Reply
#7

What does this tool do exactly? Pardon me for asking, as I may have misread your previous post, but it just doesnt seem clear to me.

[Image: sig2.gif]
TEAM PACIFIC
Reply
#8

Skunkmeister Wrote:What does this tool do exactly? Pardon me for asking, as I may have misread your previous post, but it just doesnt seem clear to me.

Sorry for my post being somewhat "brief" :oops: I'll clarify.

Snip from the CoastAlign help file:

When building maps one the most frustrating tasks is to get a coastline height aligned properly to the water. Initially the result is usually land seemingly suspended in midair, looks terrible. Using the FMB+ to align a coast quickly becomes very tedious, boring and error prone. CoastAlign is designed to greatly simply this task by "automagically" aligning coastlines to bodies of water.

CoastAlign does not simply set all water elevation to 0 meters; lakes, rivers and other bodies of water above sealevel are aligned at the proper elevation.

Restrictions and limitations:

Due to the averaging done by the IL2 3D rendering engine, CoastAlign may miss a few segments of a coast, these occurances are rare but you should manually inspect your coastlines in FMB+ just to be sure.

The reference water/land map (map_c) must be in "uncompressed" format, use the Map_c Toolbox to generate a reassembled file if no unformatted map_c file is available.

The map_c and map_h files must be size compatable i.e. map_h scale is 1:4 of the map_c file.

The map_h file is overwritten during the alignment proccess - as always - make a backup of your map_h file before procceeding.
Reply
#9

Well, I'm building a map with an enormous number of islands. When I last looked at it, yesterday, the sea looked more like a switchback and I was dreading manually flattening it all out.

I've just run this tool and WOW!!!! Amazing stuff - it's picked up nearly all of them, I can only find one lump so far, there may be one or two more but when it was in the hundreds if not thousands...

Thankyou so much Redwulf; you've saved me hours and hours of work.

Big Grin Big Grin Big Grin Big Grin Big Grin
Reply
#10

Glad I could help dunkelgrun 8)
Reply
#11

I used a trick to solve water/land holes problems... I extended land for 1 pixel in map_c... or 0 level for 1 pixel in map_h... :wink: on map of big size you can't see it but it solves holes problems

... but I'll try you tool ASAP... much better... :roll:
Reply
#12

delvpier Wrote:I used a trick to solve water/land holes problems... I extended land for 1 pixel in map_c... or 0 level for 1 pixel in map_h... :wink: on map of big size you can't see it but it solves holes problems

... but I'll try you tool ASAP... much better... :roll:

Tried the same thing to start with but I quickly discovered that I have a lot of water above sea level which would mean I'd still have to "hand flatten" using FMB+. Decided to let computers do what they're best at - doing the boring and complicated chores for their human masters 8)
Reply
#13

Hi,
This was one of the first tools I have used.
Fabian Fred made a rough working map of North Aus/PNG and looking around on there were many raised land areas.
Itried this last night and it is a great little tool.
I still have a few areas of water that is above sea level on the land but that's only because I have not adjusted the coast and shallow waters as yet.
I thought I'd try this first to smooth out the coast and sea so its relatively straight.
Now I can play around with the coasts etc.
Just one question what do you do with the c map raw file once it has over written the original map c file.? Can you delete it from the AUS Map folder or not?

Cheers Kirby

Chiang Mai
Reply
#14

farang65 Wrote:Hi,
This was one of the first tools I have used.
Fabian Fred made a rough working map of North Aus/PNG and looking around on there were many raised land areas.
Itried this last night and it is a great little tool.
I still have a few areas of water that is above sea level on the land but that's only because I have not adjusted the coast and shallow waters as yet.
I thought I'd try this first to smooth out the coast and sea so its relatively straight.
Now I can play around with the coasts etc.
Just one question what do you do with the c map raw file once it has over written the original map c file.? Can you delete it from the AUS Map folder or not?

Cheers Kirby

Chiang Mai

Hi Kirby,

Check that your map_h file matches your map_c file i.e. make sure you don't have areas out to sea above sea level, this will "fool" CoastAlign (it does not try to anticipate "Oh, I think he/she means this is water, I'll just go ahead and put it at sea level."). As mentioned earlier, "all water" and "all land" as defined by map_c results in no changes being done to the map_h file, only coastal areas are affected. Another thing to keep in mind is to have inland water at the proper elevation, disregarding this will give you the dreaded "Star Wars Canyons of Certain Death" Tongue

Wrt to deleting the "raw" map_c file I assume you mean after a "cooked" pair have been made (using the Map_c Toolbox or the map_c tools). The "raw" map_c is not used by IL2 and can be deleted from the map folder but you might like to keep it handy for future use (such as with CoastAlign :wink: ) If you've accidentally deleted the "raw" map_c file, no sweat, the Map_c Toolbox or the map_c tools will let you "un-cook" the file pair again. 8)
Reply
#15

Thanks for the info about the .raw file. No I had not deleted it so will save it in a safe place. One thing I noticed that I could not sail a destroyer very close to shore around an island so the map h seems to recognize the coast and shallow water areas which I have not done as yet. I can see a thin transparent large in size area from shore to sea, where the coast should be.


CHEERS KIRBY

CHIANG MAI
.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)