Cultivation from photoscenery?

  • How do I setup JOSM in order to have the option to load a shapefile?

    Hi Dave,


    Sorry about the late reply. I didn't do anything special, I just opened the shape file and saved it as OSM file.


    Some plugins that I use in JOSM:

    building_tools

    CADTools

    opendata

    utilsplugin2


    Paul

    Windows 10 64bit | iCore7-7770K| ASUS STRIX Z270E |KHX2400C15D4 - 32GB | Gigabyte Ge-Force GTX 1080Ti| SSD Intel 520 Series | 40" Philips BDM4065UC/75 4K - Oculus Rift

  • I am frustrated and confused by cultivation!!!



    I was able to get the OSM file for a small test area between the IPACS CH DLC and ORBX LOWI

    I was able to look at the content in JOSM (although it is painfully slow on large or complex map files

    and I am still figuring out the tagging/filtering mechanism)

    At this point I am just cultivating plants.

    When I run scenProc it claims to generate 22,000 plants and the TOC file looks reasonable.



    <[file][][test]

    <[cultivation][][]

    <[string8][coordinate_system][lonlat]>

    <[list_plant][plant_list][]

    <[plant][element][0]

    <[vector3_float64][position][9.769118 47.175264 0]>

    <[vector2_float32][height_range][8.000000 25.000000]>

    <[string8][group][broadleaf]>

    <[string8][species][]>

    >

    ...



    I used Kenneth's AutogenLocator approach in the TSC. (test.txt)


    But when start Aerofly at that location no trees are rendered. It's probably something forehead slapping simple and stupid but after N iterations through the process I don't see what it is.


    Any help would be appreciated.


    cheers

    Stu

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • Stu,


    I had a quick look at your test.txt, and the only thing I could see was the relative positioning (indenting) of an area of the text itself.

    I changed it, and you might want to try to again. No guarantees, but, maybe....


    - Kenneth



  • Hi Kenneth


    No, that made no difference.

    I always assumed that the indentation was an aid for the author to maintain proper object nesting, and the parser would ignore indents.

    Rodeo's Keywest example has indentation irregularities and still works.


    Back to banging my head against the wall.


    thanks anyway

    Stu

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • Do you have the texture files loaded?

  • "texture files?"


    I assumed it would just use default textures. The TOC only specifies "broadleaf"


    /Stu

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • Hi Paul, downloaded and installed JOSM. Seems that it will require a certain degree of study before using it. Do you know or have made yourself a video to learn how to use it in the most efficient way?.

    Cheers, Ed

    Windows 7 Ultimate x64 | i7-5820k | 32GB RAM | 3xSSD Samsung 1TB | MSI GTX 1080Ti Gaming X 11GB | LG 29UC97C UW Curved | Oculus Rift VR | TM FCS HOTAS // Gaming Laptop ASUS ROG Strix Scar II GL704GW | Windows 10 Home | i7-8750H | 32GB RAM | 2TB SSD + 2TB HDD | Nvidia RTX 2070 | TM FCS HOTAS

  • Hi Ed


    When I first started using JOSM on what i thought was a reasonably small test area, there was an incredible clutter in the map and performance was so slow I could not tell what click the map was responding to.

    The most important trick is to define filters so you can eliminate the extraneous detail.


    There is a funnel icon on the left border that enables or disables the Filter panel on the right hand side.

    When I add a filter expression I made them all "add to selection" which is a bit counter intuitive because it means add to filter selection NOT map selection.

    You can pick a preset tag like " Man Made/Power/Power Line". Then control visibility with the tick boxes in the Filter panel


    Once you trim out the extraneous stuff the performance becomes usable and you can see what tags are relevant. There is a baggage tag icon on the left that enables the tag panel on the right.


    Also there is a menu to download satellite imagery so you can compare the map to reality.


    All in all a very useful tool.


    cheers

    Stu

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

    Edited once, last by lenidcamper ().

  • All in all a very useful tool.

    Hi Stu:

    Thanks for your tips. I think this will take me some time before I get used to it, but it'll worth the effort.

    Cheers, Ed

    Windows 7 Ultimate x64 | i7-5820k | 32GB RAM | 3xSSD Samsung 1TB | MSI GTX 1080Ti Gaming X 11GB | LG 29UC97C UW Curved | Oculus Rift VR | TM FCS HOTAS // Gaming Laptop ASUS ROG Strix Scar II GL704GW | Windows 10 Home | i7-8750H | 32GB RAM | 2TB SSD + 2TB HDD | Nvidia RTX 2070 | TM FCS HOTAS

  • Hi Rodeo


    It appears to be the TSC not the TOC

    I added the TOC as an additional cultivation file and increased the size element of the Altenrhein airport TSC and the cultivation elements were rendered.

    I am not sure yet why the AutogenLocator format would not work.


    one step forward


    cheers

    Stu

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • Hi Ed


    When I first started using JOSM on what i thought was a reasonably small test area, there was an incredible clutter in the map and performance was so slow I could not tell what click the map was responding to.

    The most important trick is to define filters so you can eliminate the extraneous detail.



    Hi Stu,

    I fully agree, you need to remove all the stuff AFS2 doesn't need.

    Having a fast pc helps with JOSM, the OSM files can contain a lot info.

    Cheers,

    Paul


    Windows 10 64bit | iCore7-7770K| ASUS STRIX Z270E |KHX2400C15D4 - 32GB | Gigabyte Ge-Force GTX 1080Ti| SSD Intel 520 Series | 40" Philips BDM4065UC/75 4K - Oculus Rift

  • Returning to Phil's original question about cultivation from photoscenery, I thought I'd just put down in writing my own experience so far. However, before I carry on, I must first give credit to Dave whitav8 , who made me realise that this was do-able and gave me some lines of script to put into ScenProc.


    The bottom line is that it's actually pretty easy to produce good forest cultivation this way. You still have to rely on OSM (or some other method) for buildings and roads, but in sparsely populated areas where trees are an important feature this may not matter too much. I've been testing it out on Maine (USA) which fits the aforementioned criteria, and I'm very pleased with the results so far.


    In case anybody wants to give it a go, the procedure is as follows:


    1. Obtain a BMP of the area you want to cultivate using FSET in the normal way. I'm currently working on areas which are the size of a level 11 tile - i.e. roughly 8 x 8 nm - but smaller areas would probably give more precise results. It depends how impatient you are to cover a large area!


    2. Open ScenProc, click Tools (at the top) and select Texture Filter Editor.


    3. Click Add Image (at the top) and select your BMP.


    4. Click the down arrow next to NDVI Filter (on the left) and select Histogram Filter instead.


    5. Repeatedly left-click on different parts of the image that look like woodland. The editor is building up a picture of what range of colours are likely to be woodland, so the more you do this the better.


    6. Click Detect (at the top) and the editor will colour in (in orange) areas of the BMP that it considers to be woodland based on the pixels you have clicked.


    7. Check whether these orange areas cover the woodland satisfactorily. If they don't then left-click some more on areas of woodland that are not covered in orange. Check again by clicking Detect.


    8. If you find that the orange colour is covering areas that are not woodland, then right-click on those areas to remove those colours/pixels, and check again using Detect. There are settings in the lower left-hand panel - such as Buffer Size etc - which have some bearing on the way the filter works. The default settings work pretty well for me, but if you want more info have a look at Arno's video here


    9. Obviously if you are a perfectionist you could carry this process on indefinitely (!) but at some point (after about 5-10 mins in my case) you will say "that's good enough". At that point save the filter as a TFC file by clicking Save (at the top). Give it some name that makes sense to you.


    10. Now go back to ScenProc in its normal mode (the other window) and type/copy the lines of script below (courtesy of whitav8 , and only modified a little by me) into the top panel. Change the file paths and names to suit yourself. The INF file comes from the FSET process - I have renamed it, but obviously that's optional. However don't rename or move the original BMP file. Although it's not directly referred to below it does (apparently) need to keep its original name and location.

    ImportINF|D:\039082E7.inf

    SplitGrid|0.25|*|building="*"

    DetectFeatures|FTYPE="RASTER"|D:\039082E7.tfc|String;veg|trees|NONE

    MergeGrid

    ExportOGR|FTYPE="POLYGON"|ESRI Shapefile|D:\039082E7.shp|woodland


    11. Click Run (at the top) to produce the SHP file. A number of other files will be produced at the same time, with extensions such as PRJ etc etc. Put all of these files into one folder. I have called this folder "data".


    12. Staying with ScenProc in the "normal" mode, type/copy the lines of script below into the top panel modifying the file paths and names to suit yourself. Those of you familar with ScenProc may wish to tweak other things as well. (Credit for this code is due to Spit40 and ultimately Rodeo . It is a stripped down version of Spit40 's script for producing a TOC file from SHP files.)


    ImportOGR|D:\data\039082E7.shp|*|*|AUTODETECT

    PlacePointsInPolygon|*|0.00025;0.00025|1.0;1.0

    CreateAF2Plant|FRAND >= 0.25|8;25|broadleaf

    CreateAF2Plant|FRAND < 0.25|10;20|conifer

    ExportTOC|D:\Cultivation|039082E7


    13. Use the TOC file in the normal way to cultivate your area. Because it's such a small area I have a dummy stripped down airport (with no name) at its centre. In my Maine project this small area of photo-generated cultivation is within a larger area (roughly 60 x 60 nm) cultivated using OSM data. This is how I merge my different cultivations - but you may know of a better method.

  • Hi Ian


    I have just planted trees around EGGP using JOSM, I found it very easy to add a region of trees, just draw a polygon and add the preset forest, but couldn't plant tree's singularly even though JOSM does allow for single vertex and calling it a tree, seems scenproc doesn't understand this only forest. tried tree row too but with no sucess


    Its also possible to add roads to be used as lights as I also needed some of those around the TNT building. When exported as a OSM file scenproc does the rest.


    Steve

  • I haven't tried JOSM yet - but I certainly intend to. If it's quicker/easier/more accurate than the above, that would be great!

  • I haven't tried JOSM yet - but I certainly intend to. If it's quicker/easier/more accuarte than the above, that would be great!

    I have preached the use of JOSM for a while, didnt get much attention.

    Windows 10 64bit | iCore7-7770K| ASUS STRIX Z270E |KHX2400C15D4 - 32GB | Gigabyte Ge-Force GTX 1080Ti| SSD Intel 520 Series | 40" Philips BDM4065UC/75 4K - Oculus Rift

  • I have preached the use of JOSM for a while, didnt get much attention.

    Ultimately I intend to try both methods and compare them. I think the photo-cultivation is a quick and dirty method for producing lots of trees. JOSM is probably more precise though, as I say, I am pretty happy with photo-cultivation as far as it goes.

  • Steve,

    For bulk and single trees use: key = landuse and Value = forest.

    Cheers,

    Paul

    Windows 10 64bit | iCore7-7770K| ASUS STRIX Z270E |KHX2400C15D4 - 32GB | Gigabyte Ge-Force GTX 1080Ti| SSD Intel 520 Series | 40" Philips BDM4065UC/75 4K - Oculus Rift